Skip to content

feat(review): PR summary and committable suggestion blocks (v15) - #13

Merged
dooodledad merged 1 commit into
mainfrom
feat/pr-summary-suggestions
Dec 2, 2026
Merged

dooodledad merged 1 commit into
mainfrom
feat/pr-summary-suggestions

Conversation

@dooodledad

Copy link
Copy Markdown
Owner

What

Two coupled review-quality features, delivered together because they share the
single v15 prompt version and the worker's queued-version enablement fix:

PR summary (matrix #1). The v15 prompt returns an object envelope
{"summary": ..., "findings": [...]} in the SAME billable call (zero extra
RPC, spend attestation untouched). The review body opens with the summary
above the branding, degraded to the static body when absent — a missing
summary never blocks a review.

Committable suggestions (matrix #5). Findings whose fix is a concrete edit
to the anchored added line carry a suggestion; the payload emits it as a
GitHub suggestion block you can apply in one click. Fence-injection and

500-char values are dropped at the trust boundary.

Enablement fix. The delivery worker now runs the durably queued prompt
version via dataclasses.replace instead of the env default (which was v6).
Without this, PROMPT_VERSION (now v15) was stamped on the queue but the
worker executed a different prompt, so the summary/suggestions never fired. Now
the executed prompt always matches the job's cache key.

Why

Both are "all 3 competitors have it" gaps from the feature-matrix plan.

Behavior

  • PROMPT_VERSION bumped v13 → v15; new tolerant parser falls back to the v8
    array path, so a model emitting a bare array (or garbage) still yields
    findings. Every other prompt version is untouched.
  • Summary rides the existing pr-mutation pattern, stored in the review
    result, and survives crash-recovery resume.

Tests

  • v15 parser (object + bare-array fallback), summary threading through review_pr
    and the posted review body + stored dry-run result.
  • suggestion sanitization (kept, fence dropped, oversized dropped) and block
    emission.
  • worker runs the queued prompt version.

Full suite: 554 passed, 2 skipped.

@pascal-reviewer pascal-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pascal approves this change 🐶

The review model now returns an object envelope {summary, findings} in the
same billable call, so the review body opens with a 2-4 sentence PR summary
walkthrough (prepended above the branding, degraded to the static body when
absent). Findings whose fix is a concrete edit to the anchored added line
carry a suggestion that the payload emits as a GitHub committable suggestion
block (fence-injection and >500-char values dropped at the trust boundary).

Also fixes the delivery worker to run the durably queued prompt version via
dataclasses.replace, so PROMPT_VERSION (now v15) is what actually executes and
the executed prompt matches the job's cache key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant