Skip to content

feat: a review on every head, and a reviewer outside the session - #108

Merged
lx-0 merged 1 commit into
mainfrom
feat/review-ensured
Nov 28, 2026
Merged

lx-0 merged 1 commit into
mainfrom
feat/review-ensured

Conversation

@lx-0

@lx-0 lx-0 commented Nov 28, 2026

Copy link
Copy Markdown
Member

What

  • ytstack-finish-lane gates and merge fail on a head nobody reviewed. Without --verdict-pattern such a head used to pass the review gate ("none on "). A project that runs no reviews passes --allow-no-review.
  • REVIEW.md can name a reviewer outside the session under ## Reviewed by: login, except globs, a pass pattern, minutes to wait.
  • ytstack-risk reviewer --base --head says whether a change is that reviewer's or the session's own. The policy is read at the base.
  • ytstack-finish-lane wait-review waits for that reviewer's review on the head: exit 0 it passes, 1 it does not, 3 none came or the head moved.
  • finish-lane 0.9.0, Step 6: asks who reviews first. For a named reviewer it waits and commissions nothing; on exit 3 it commissions the independent review itself.
  • gates and merge take --reviewer LOGIN: that account's newest review on the head decides, a review of somebody else does not stand in for it.

Why

Field run in context-mcp, 27 and 28 November 2026: a review app reviews pull requests without UI paths, and the coordinator still commissioned 22 reviews of its own on 15 such pull requests and merged 16 without any review of the app, 6 of them on a head without any review. ytstack had no way to say "this change is reviewed by X, wait for it, and review yourself only when X does not answer".

Known limit

A change the outside reviewer reviewed has no round line, so route says person. With merge_by: risk a person merges such a change.

Verification

  • bash tests/run-all.sh: all suites passed (ytstack-finish-lane 235, ytstack-risk 229).
  • bin/ytstack-check: OK, the 9 warnings are the ones on main. bin/ytstack-spec lint: 0 failures.
  • Not run against a real host: wait-review and --reviewer ran only against the test's stand-in for gh.

🤖 Generated with Claude Code

gates and merge fail on a head nobody reviewed (--allow-no-review for a
project without reviews). REVIEW.md names a reviewer outside the session
under "## Reviewed by"; ytstack-risk reviewer says whose a change is,
ytstack-finish-lane wait-review waits for that review and exits 3 when none
came, and finish-lane then commissions its own. gates and merge take
--reviewer LOGIN.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T11:04:28.195645Z 5c5a01f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c5a01fbe8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/ytstack-finish-lane
# A comment does not lift a changes request of the same reviewer (PR #92 review).
([ .[] | select(.state != "COMMENTED") ] | group_by(.author.login)[] | max_by(.submittedAt) | "review\t\(.state)\t\(.author.login)"),
(max_by(.submittedAt) // empty | "newest\t\(.author.login)", ((.body // "") | split("\n")[] | "body\t" + .)))
([ .[] | select(__BY__) ] | max_by(.submittedAt) // empty | "newest\t\(.author.login)", ((.body // "") | split("\n")[] | "body\t" + .)))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exclude dismissed reviews from the reviewer verdict

When GitHub marks the named review as DISMISSED, the surrounding filter still retains it because it excludes only PENDING; this selector can therefore choose the dismissed review and expose its old body as the newest verdict. As a result, wait-review and gates --reviewer can succeed, and merge can proceed, after the approval was withdrawn. Filter out DISMISSED reviews before selecting the newest review.

Useful? React with 👍 / 👎.

@lx-0
lx-0 merged commit 27e3fd5 into main Nov 28, 2026
3 of 4 checks passed
@lx-0
lx-0 deleted the feat/review-ensured branch November 28, 2026 11:06
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