Skip to content

fix(pr-review): credit human answers when dispositioning open questions - #7

Merged
Troublor merged 1 commit into
mainfrom
fix/pr-review-question-reconciliation
Jul 31, 2026
Merged

fix(pr-review): credit human answers when dispositioning open questions#7
Troublor merged 1 commit into
mainfrom
fix/pr-review-question-reconciliation

Conversation

@Troublor

Copy link
Copy Markdown
Collaborator

Problem (Fixes B + C)

The pr-review action's open questions could never be closed by answering them. Concrete case — grafana-dashboard #15:

  1. Reviewer asked 2 open questions (round on 20684249).
  2. A maintainer answered both in a PR comment — one with live Prometheus output (count by (server_role, instance) …) proving the concern didn't apply.
  3. The next round (on fix commit eaae1731) had that answer in its conversation.timeline, resolved the 2 findings correctly, but still returned disposition: open for both questions, reasoning only from the code delta:

    "reason":"Panel 13 query and legend unchanged in the delta; still not live-verified…"

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 ✅ Answered when the model returns answered, 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:
    • A defect visible in the code still needs code verification before dismissal (a comment can't erase a reproducible finding).
    • A question is information the reviewer lacked, so a credible maintainer answer resolves it — even when it reports a live/runtime check this job can't reproduce — unless it contradicts the code. Disposition questions from the whole discussion, not just the delta.
  • 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

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
@Troublor
Troublor merged commit ee140b6 into main Jul 31, 2026
1 check passed
@Troublor
Troublor deleted the fix/pr-review-question-reconciliation branch July 31, 2026 10:14
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