fix: coder's final reply becomes the PR body verbatim — ask for a clean summary#62
Merged
Conversation
…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>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
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
|
Submitted COMMENT review on #62. |
2 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_promptnever told the coder its final message would be used this way, so an un-briefed coder (protoorclaude) 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 cleanresult_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
test_build_prompt_asks_for_a_clean_pr_summary_not_raw_reasoningruff check . && ruff format --check . && pytest -q— 237 passed (236 + 1 new)🤖 Generated with Claude Code