Repository navigation
Give the Review stage the producer it never had - #7539
Closed
gunbai-bot[bot] wants to merge 2 commits into
Closed
gunbai-bot[bot] wants to merge 2 commits into
gunbai-bot[bot] wants to merge 2 commits into
Conversation
gunbc.code_change_workflow's decide_code_change_transition already adjudicates a MergeReadinessTally with twelve typed refusal arms -- stale head, missing tally, request-changes, blocking findings, not-mergeable-clean and the rest. Nothing in the corpus BUILDS one. A whole-tree search finds MergeReadinessTally constructed only inside witnesses, decide_code_change_transition called only from its own, and ReviewVerdictParseRequest / ReviewVerdictParseResult / ParsedReport / ParseDeferred / expected_head_sha with zero consumers outside their declaring module. Checked on the Rust side too: no producer there either. So the Review stage is a complete fail-closed judgment that nothing in production can ask a question of -- the same state Publication was in until its observer landed, and the same sentence roadmap_publish's own note used about itself. This is the PURE half, following that precedent exactly: it takes reports a caller already holds and decides everything from them, so every arm is reachable in a hermetic witness with no dashboard, no network and no token. The transport half -- fetching artifacts and parsing bodies into verdicts -- is deliberately not here; it rides the process-observation substrate and is a separate lane. THE TALLY IS WRAPPED, NOT EXTENDED. Excluded stale reviews must be counted, and MergeReadinessTally has no field for them. Extending it would edit a carrier whose consumer is a live twelve-arm adjudicator; wrapping it does not. ReviewTallyObservation carries the tally beside the exclusions and decide_code_change_transition keeps taking exactly what it takes today. That is the shape RemoteBranchObservation already uses one module over. Three decisions worth naming, each with a claim: Approvals count DISTINCT REVIEWERS, not artifacts. One provider re-reviewing the same head produces two approving artifacts; counting artifacts would let a single reviewer satisfy a two-approval bar by reviewing twice -- the bar defeated arithmetically rather than by any decision. A stale review is excluded AND named, never dropped. It was read fine, it is just about another commit. Dropping it would zero the exclusion's frequency by construction so nobody learns reviews are going stale faster than they land. A report about a different PR REFUSES rather than being filtered. A stale review is evidence about this PR at another commit; a foreign report is not evidence about this PR at all, and silently dropping it hands back a confident tally built from whatever happened to match. 12 claims green by execution. The RED control is proven rather than asserted: replacing the distinct-reviewer count with an artifact count fails exactly one claim -- one_reviewer_approving_twice_counts_once -- and leaves the other 11 green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing per portfolio verdict (operator, 2026-08-01). This is the wrong Review phase and I accept that. The ratified Review stage is trigger a review worker -> exact pushed head -> typed findings -> feedback to the implementation worker -> bounded re-review loop. This PR built passive tallying over Two concrete defects, both verified rather than conceded on assertion:
Not merging. The first Review PR should prove one actual round, not tally artifacts. — sent from proud-swift-104 |
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.
The Review stage has a complete, fail-closed judgment that nothing in production can ask a question of. This gives it a producer.
The gap
gunbc.code_change_workflow'sdecide_code_change_transitionadjudicates aMergeReadinessTallyacross twelve typed refusal arms —CodeChangeHeadShaMismatch,MissingReviewTally,TallyRequestChanges,TallyBlockingFindings,NotMergeableClean, and the rest. Verified against the whole tree:MergeReadinessTallyis constructed only inside witnesses.decide_code_change_transitionis called only from its own witness.ReviewVerdictParseRequest,ReviewVerdictParseResult,ParsedReport,ParseDeferred,expected_head_sha— zero consumers outside their declaring module.That is the same state Publication was in before #7498 gave it one, and the same sentence
roadmap_publish's ownend_to_end_noteused about itself — "the adjudicator was a judgment nothing could ask."The shape follows the landed precedent
This is the pure half, exactly as
roadmap_publish/roadmap_publish_observesplit: it takes reports a caller already holds and decides everything from them, so every arm is reachable in a hermetic witness with no dashboard, no network and no token. The transport half — fetching artifacts and parsing bodies into verdicts — is deliberately not here. It rides the process-observation substrate (#7525) and is a separate lane.The tally is wrapped, not extended
Excluded stale reviews have to be counted — §5 says a degradation is typed, located and countable, never absorbed — and
MergeReadinessTallyhas no field for them. Extending it would edit a carrier whose consumer is a live twelve-arm adjudicator. Wrapping it does not:ReviewTallyObservationcarries the tally beside the exclusions, anddecide_code_change_transitionkeeps taking exactly theMergeReadinessTallyit takes today. That is the shapeRemoteBranchObservationalready uses one module over, so it is precedent rather than invention.Three decisions, each with a claim
Approvals count distinct reviewers, not artifacts. One provider re-reviewing the same head produces two approving artifacts. Counting artifacts would let a single reviewer satisfy a two-approval bar by reviewing twice — the bar defeated arithmetically rather than by any decision anyone made. Request-changes counts the same way. Blocking findings count per finding, because two reviewers finding one defect is still one defect, but three defects from one reviewer is three.
A stale review is excluded and named, never dropped. It was read perfectly well; it is simply about another commit — the ordinary state after a worker pushes while a review is in flight. Dropping it would zero the exclusion's frequency by construction, so nobody would ever learn that reviews are going stale faster than they land.
A report about a different PR refuses. A stale review is evidence about this PR at another commit, so excluding and counting it is honest. A foreign report is not evidence about this PR at all, and silently filtering it would hand back a confident tally assembled from whatever happened to match — a wrong answer that looks like a right one.
Verification
12 claims green by execution via
claim_batch— not merely compiled.The RED control is proven, not asserted. Replacing
count(distinct_reviewer_keys(...))withcount(approving)fails exactly one claim —one_reviewer_approving_twice_counts_once— and leaves the other 11 green. Executed, then reverted. That discrimination is the whole point: every other case in the file already has distinct reviewers, so only the intended claim can detect the defect.gunbc compile --target dag: 0 blocking, advisories pre-existing in untouched files.Scope
No existing carrier is modified — this adds one module and one witness file.
MergeReadinessTally,ReviewVerdictReportanddecide_code_change_transitionare untouched.Not included, and stated so the bound is visible: nothing here fetches a review artifact or parses a comment body into a verdict. A change that broke the fetch while leaving
review_tally_ofintact would keep these claims green.