Skip to content

fix: coder's final reply becomes the PR body verbatim — ask for a clean summary#62

Merged
mabry1985 merged 1 commit into
mainfrom
fix/clean-pr-summary
Jul 3, 2026
Merged

fix: coder's final reply becomes the PR body verbatim — ask for a clean summary#62
mabry1985 merged 1 commit into
mainfrom
fix/clean-pr-summary

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Problem

open_pr(..., body=(result or "")[:4000]) uses the coder's raw final ACP reply as the literal PR description — no post-processing, in both the plain single-dispatch path and Max-Mode's winner-reply path. _build_prompt never told the coder its final message would be used this way, so an un-briefed coder (proto or claude) defaults to narrating its whole process — exploration, step-by-step reasoning, restating the task/acceptance criteria — straight into the PR body. Messy PRs.

(coder_seam.dispatch's path — ADR 0064 — already synthesizes its own clean result_text, e.g. [coder.solve rung=best-of-k gens=2] solved by best-of-2, and is unaffected.)

Fix

Add an explicit rule to _build_prompt's Rules block: the final message becomes the PR description verbatim, so end with a short, clean summary for a reviewer (what changed + why, 2-6 sentences or a few bullets) — not scratch reasoning or process narration.

Verification

  • New test: test_build_prompt_asks_for_a_clean_pr_summary_not_raw_reasoning
  • Gate: ruff check . && ruff format --check . && pytest -q — 237 passed (236 + 1 new)
  • Version bumped 0.26.0 → 0.26.1 (patch — prompt tweak, no behavior/API change)

🤖 Generated with Claude Code

…an summary (v0.26.1)

open_pr(..., body=(result or "")[:4000]) uses the coder's raw final ACP reply as
the PR description with zero post-processing, in both the plain single-dispatch
path and Max-Mode's winner. Nothing in _build_prompt ever told the coder its
final message would be used this way, so an un-briefed coder (proto or claude)
defaults to narrating its whole process -- exploration, step-by-step reasoning,
restating the task -- straight into the PR body.

Add an explicit rule: the final message becomes the PR description verbatim, so
end with a short, clean summary for a reviewer (what changed + why, 2-6 sentences
or a few bullets) -- not the coder's scratch reasoning. coder_seam.dispatch's
path (ADR 0064) already synthesizes its own clean result_text and is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jul 3, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@mabry1985 mabry1985 merged commit e4fa579 into main Jul 3, 2026
1 check passed
@mabry1985 mabry1985 deleted the fix/clean-pr-summary branch July 3, 2026 19:49

@protoquinn protoquinn 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.

QA Audit — PR #62 | fix: coder's final reply becomes the PR body verbatim — ask for a clean summary

VERDICT: WARN (CI pending — no blocking findings in code)


CI Status

  • test: queued ⏳ (non-terminal — re-review on completion)

Diff Review

  • loop.py: Clean prompt addition — tells the coder its final message is the PR description verbatim and asks for a short reviewer-facing summary. Precise, no ambiguity.
  • protoagent.plugin.yaml / pyproject.toml: Patch bump 0.26.0 → 0.26.1 — appropriate for a prompt-only change.
  • tests/test_loop.py: New test asserts the prompt contains both key phrases; assertions match the diff string exactly (case-insensitive).

Observations

  • LOW: Clawpatch structural review unavailable for this repo (502 — not in checkout cache). Diff-only review; no structural findings expected given the scope.
  • No unresolved CodeRabbit threads. LGTM once CI is green.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jul 3, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #62.

mabry1985 added a commit that referenced this pull request Jul 4, 2026
… diagnostic string (v0.29.2) (#68)

_WorktreeSolveAdapter.generate() dispatched the coder into its worktree but
discarded the reply, keeping only the worktree path. Every coder dispatch is
promised "your FINAL message becomes the PR description" (loop._build_prompt),
but dispatch() had nothing real to report for a solve()-ladder win, so it fell
back to its own diagnostic string (e.g. "[coder.solve rung=greedy gens=1]
solved 1-shot") — which became the PR body verbatim. Same failure class as
#62, on a different path.

Worse than cosmetic: _verify_goal's NO_TEST_NEEDED escape hatch reads this
same text, so a legitimate no-test-needed change dispatched through the
solve() ladder would always look like a missing test, forcing an unnecessary
re-dispatch/escalation cycle.

Fix: generate() now captures the coder's reply per candidate; dispatch()
uses the WINNING candidate's own reply as the result, falling back to the
diagnostic string only when there isn't one (a fusion win, which returns
file content, not a summary).

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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