feat(pr-review): track open question status and label the sticky comment - #94
Merged
Merged
Conversation
Give open questions the same durable lifecycle as findings: a stable ID, a hidden marker on the status line, and a manifest entry recording which review asked them. A later round dispositions each one as open, answered, or withdrawn, and the publisher rewrites that line in the original review body so an answered question stops reading as outstanding. A question that is already open is no longer re-asked. Also render the sticky status comment at publish time so it can state that it is rewritten in place on every run, carry an update timestamp, and roll up the questions still awaiting an answer with a link to the review that asked each.
Contributor
Claude review status✅ Review clean Last reviewed: head New this round: 0 · Resolved this round: 0 · Open questions: 0 |
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.
Summary
Two follow-ups to the PR review action, both about telling a reader what state something is in.
Open questions now have a lifecycle. Previously an
Open questionwas rendered once into a review body and forgotten. The author would answer it in a reply, but the original question sat there unchanged with no indication it had been resolved.prior_questionsdisposition (open/answered/withdrawn, with a one-line reason) for every open question, mirroring the existingprior_findingscontract. An omitted question stays open.❓ **Open question · Medium confidence**becomes✅ **Answered** — <reason>. Editing a submitted review body creates no new review and no new notification. The rewrite reproduces the same marker line, so it is idempotent; a GitHub failure leaves the entry pending and the next round retries it, and a question whose asking review cannot be found settles asunavailablerather than retrying forever.The sticky comment says it is a living comment. It is rewritten in place on every run, but nothing said so, which reads as confusing or stale to anyone meeting it mid-thread.
Test plan
python3 -m unittest discover -s .github/actions/claude-pr-review -p 'test_*.py'— 66 tests pass, 14 of them new: marker stability, no-duplicate-question, disposition handling, unknown/omitted dispositions, in-place rewrite, idempotent re-application, missing marker, failure retention, stale-head propagation, sticky banner and roll-up, and skip-mode behaviour.mise run lint— links, markdownlint, and prettier clean../.github/actions/claude-pr-reviewpath, so this PR exercises the new publish path against itself.Note that consumers pin
@main, so this goes live for every consumer repo on merge.