Skip to content

feat(pr-review): track open question status and label the sticky comment - #94

Merged
Troublor merged 1 commit into
mainfrom
williamaaroncheung/feat/pr-review-question-status
Jul 28, 2026
Merged

feat(pr-review): track open question status and label the sticky comment#94
Troublor merged 1 commit into
mainfrom
williamaaroncheung/feat/pr-review-question-status

Conversation

@Troublor

Copy link
Copy Markdown
Collaborator

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 question was 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.

  • Each question gets a stable ID and a hidden marker on its status line, plus a manifest entry recording which review asked it — the same durable treatment findings already had.
  • The model must return a prior_questions disposition (open / answered / withdrawn, with a one-line reason) for every open question, mirroring the existing prior_findings contract. An omitted question stays open.
  • The deterministic publisher then rewrites that one line in the original review body: ❓ **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 as unavailable rather than retrying forever.
  • A question that is already open is no longer re-asked. Re-asking orphaned the copy the author was actually answering.

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.

  • It now opens with an explicit note that the workflow keeps this single comment up to date instead of posting a new one each round, and that no reply is needed there.
  • It carries an update timestamp alongside the reviewed range, splits this round's counts into findings and questions, and rolls up the questions still awaiting an answer with a link to the review that asked each one.
  • The status body is rendered at publish time rather than compile time, so those links can reference the review ID assigned in the same run.

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.
  • This repo dogfoods the action through the local ./.github/actions/claude-pr-review path, 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.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Claude review status

✅ Review clean

Last reviewed: head 3cc74510

New this round: 0 · Resolved this round: 0 · Open questions: 0

@Troublor
Troublor merged commit c23508d into main Jul 28, 2026
5 checks passed
@Troublor
Troublor deleted the williamaaroncheung/feat/pr-review-question-status branch July 28, 2026 07:03
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