fix(pr-review): credit human answers when dispositioning open questions - #7
Merged
Merged
Conversation
An open question raised by the reviewer could never be closed by answering
it. On PR-15 of grafana-dashboard the reviewer asked two open questions, a
maintainer answered both in a PR comment (one with live Prometheus output),
and the very next review round — which had that comment in its conversation
timeline — still returned `disposition: open` for both, reasoning only from
the code delta ("unchanged in the delta"; "not live-verified"). The question
asked for a live-metric check the CI reviewer structurally cannot run (no
Grafana access in the job), so a code-delta pass can never auto-close it; only
crediting the maintainer's answer can.
Root cause is the analysis prompt, not the pipeline: the apply/render code
already flips a question to ✅ Answered when the model returns `answered`. The
contract told the model to "verify factual claims against the code", which it
applied to questions too and so discounted an out-of-CI human answer.
- action.yml (both the main and retry prompts): weigh findings and questions
differently. A defect visible in the code still needs code verification
before dismissal (a comment cannot erase a reproducible finding), but a
question is information the reviewer lacked, so a credible maintainer answer
resolves it — even when it reports a live/runtime check this job cannot
reproduce — unless it contradicts the code. Disposition questions from the
whole discussion, not just the delta.
- review_pipeline.py: make the living status comment's guidance consistent
with the review body (reply to a finding in its thread; answer an open
question in a reply on this PR) instead of the contradictory "answer ... in
the review threads".
- test: lock in the new prompt guidance so it cannot be silently dropped.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GCc8MLBBAp5jAxc2x19swa
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 (Fixes B + C)
The pr-review action's open questions could never be closed by answering them. Concrete case — grafana-dashboard #15:
20684249).count by (server_role, instance) …) proving the concern didn't apply.eaae1731) had that answer in itsconversation.timeline, resolved the 2 findings correctly, but still returneddisposition: openfor both questions, reasoning only from the code delta:The questions asked for a live-metric check the CI reviewer structurally cannot run (no Grafana access in the job), so a code-delta pass can never auto-close them — only crediting the human answer can. Result: questions sat "awaiting an answer" forever, and the review never reflected the maintainer's reply.
Root cause
Not the pipeline — the apply/render code already flips a question to
✅ Answeredwhen the model returnsanswered, and the timeline already includes the human comment. It's the analysis prompt: the contract said "verify factual claims against the code," which the model applied to questions too and so discounted an out-of-CI human answer.Fix
action.yml(main + retry prompts) — weigh findings and questions differently:review_pipeline.py(C) — make the living status comment's guidance consistent with the review body: reply to a finding in its thread; answer an open question in a reply on this PR, replacing the contradictory "answer … in the review threads."test_review_pipeline.py— lock in the new prompt guidance. Full suite green (78 tests).Scope note
This is the correctness half (B + C). The trigger-side change (A — let answering a question without a new push kick off a re-review, gated so the heavy reviewer doesn't run on every comment, reusing the same manifest for full history) is larger and lands as a follow-up PR.
🤖 Generated with Claude Code