Repository navigation
Judge a conclusion against the whole head, and print the head that was judged (#1112) - #1133
Conversation
…s judged The guard printed a PASS at a tip that no conclusion named yet, twice on #1106: a conclusion written `at abaf938` matched any head beginning with those seven characters, so the check went green on the newest tip before its own PASS existed, and a pull request that was PASSed once could be pushed again and merge with no conclusion at the new head (#1112). A conclusion now names the whole 40-character sha; a shorter tip names no head and is refused with its length in the reason. The guard reads the head, then the comments and the diff, then the head again: a push in the middle of a run is refused instead of judging one head and printing another. The report list carries each comment's id, the printed line carries the full sha, and the summary names the comment the decision used, so the decision is a snapshot a reader can go and look at. Fixes #1112
|
Verdict: PASS at c27a028 Written-by: Reviewer Judged on the merge tree: 8 files onto The fix
Ran: the scripts suite on the merged tree, then the same suite with the sources reverted, to see which cases carry it. Four cases, four failure modes, and each one needs its own source edit to go red. The moved-head case only reddens when The consequence, stated plainly, because it changes how every Verifier writes After this merges, Non-blocking, same bug class, outside this diff
|
Owner: Dev4
Reviewer: Reviewer
Base: d797cbe
Tip SHA: c27a028
Fixes #1112
Reproduce
.github/scripts/review-gate.mjsdecided a tip withheadSha.startsWith(parsed.tip), so a conclusionwritten
Verdict: PASS at abaf938names every head that begins with those seven characters — includingthe newest one, which may have no conclusion of its own yet. The guard printed the head short
(
short(decision.head), 12 characters) and printed no comment id at all, so a reader could not tellwhich text decided. On #1106 both happened together: green at 05:09:22 on a PASS posted at 05:12:24.
What changed
review-gate.mjs: a conclusion counts only when its tip is the head. A shorter tip is refusedwith its length in the reason ("names abaf938 (7 characters), not the full tip …"). The same comparison
in
recordOnlyAt(enqueue-rules.mjs); the deciding entry carries theidandkindof the commentit read.
enqueue-guard.mjs: the report snapshot carries each comment's id; the head is read again after thecomments and the diff and a moved head is refused ("the head moved during this run …; run it again"),
because otherwise the run judges one head and prints another; the printed line carries the full
40-character head from the value judged, and a second line names the conclusion used.
gate-check.mjs: the summary names the comment id and the tip it named.AGENTS.md("One conclusion per tip" — the whole 40 characters) and the Verifier skill's tipstep, since this tightens what a conclusion must name.
names the tip, not the length).
What I ran
TZ=UTC node --test ".github/scripts/*.test.mjs"→ 414 pass, 2 skipped, 0 fail (416 tests).diff -rqagainst ad797cbe4tree: exactly the 8 files above.Red without the source change
Against the pristine
d797cbe4copies of the three sources, the same test file: 4 red, the fournew cases, 59 others green. Each failure mode separately:
Source restored after each knife,
cmpclean.Not run
npm run verify: nocore/change here and noplugins/change, so only the.github/scriptssuiteis in scope;
core/tests never import these files.arch-docs: none of the 8 files is under anowned_pathsprefix;AGENTS.mdanddocs/subsystems/are separate, and the sentence I added is the rule itself, not a subsystem detail.
gh apirun of the guard (needs a token in a job); the fakeghin the tests is the same shapethe workflow uses.
Risk
point, but it fails closed on a report someone wrote short — the reason says the length, and the fix is
one more PASS at the same tip (the feat: nothing starts a turn when a team is created (#645) #681 replacement rule covers the same situation).
instead of judging a stale pair; the check is re-run on the next event anyway. Cost is one extra API
read per run.
legitimate conclusion is unaffected.