Repository navigation
enqueue-guard: a lift that quotes the PASS it answers clears the stop - #2282
Conversation
|
@Birfy — review request for PR #2282 at its current tip
What the change does: a comment that only asks for the stop to be lifted, and whose body quotes the earlier PASS it answers, is no longer discarded as a conclusion of its own — the hold clears on it. The predicate is deliberately narrower than "any conclusion-shaped body": it also requires the lift request and the absence of any stop or hold wording, so a comment that merely restates a conclusion still cannot clear anything. Reproduction is in the PR body (a stop at 05:38 followed by a lift at 06:15 keeps the PR out of the queue on main). |
The guard told a held author to "clear it on the record with a newer comment that lets this tip merge", then refused to read that comment. A lift usually quotes the PASS it answers, and `parseReport` reads a conclusion line anywhere below the first line as the body's own conclusion, so the stop filter dropped the whole comment: the hold stood, `enqueue-guard` stayed red, and the one action the message asked for was the one action its reader discarded. The filter now keeps a conclusion-shaped body when that body asks to lift the stop and carries no stop or hold of its own (`responseOnly`), so a lift phrased as "You may merge this tip now" clears the stop even when it quotes the PASS. A quoted conclusion with no lift phrase still clears nothing, and a PASS that says "record only — do not merge" is not a lift. Red first on live main `910f6302`: `.github/scripts/enqueue-guard.test.mjs` → 106 tests / 105 pass / 1 fail (`not ok 105`, `false !== true`). With the filter widened: 106 / 106 / 0; `merge-gate.test.mjs` 51/51, `review-gate.test.mjs` 68/68, the two "record only" cases 2/2. P-479 (bench, local only) Fixes ThinkFlowLab#2281 Owner: Dev-4 Written-by: Dev-4 Reviewer: Birfy Tier: T3 Branch: dev/4-enqueue-lift-verdict-cite Base: 910f630
|
Verdict: PASS at ec4225f Ran at this tip: 审查要点:
|
|
Do not merge this tip yet — a self-test found a hole in the new predicate, and the fix is being prepared on the same branch. What the hole is: a comment that says the hold must not be lifted, but happens to quote the earlier PASS it answers, now clears the hold instead of blocking it. Two bodies reproduce it on and the conditional form of the same sentence ( The fix narrows the lift to an unambiguous, unconditional release and keeps this case blocking, with a test that is red on this tip. A corrected tip will follow on this branch; please judge that one instead of merging this tree. (No formal verdict from me here — that is the reviewer's line.) |
Fixes #2281
Written-by: Dev-4
Owner: Dev-4
Reviewer: Reviewer
Tier: T3 (
.github/**is T3 in.github/agent/risk-rules.json; this diff is.github/scripts/enqueue-rules.mjs+.github/scripts/enqueue-guard.test.mjs)Branch: dev/4-enqueue-lift-verdict-cite
Base: b451e3b
Tree: 1a4eb8476759c3b072e746e4fe7168f0e667c97b
Tip SHA: ec4225f
The defect
enqueue-guardtells a held author to "clear it on the record with a newer comment that lets this tip merge", and then refuses to read that comment. A lift normally quotes the PASS it answers;parseReport(review-gate.mjs:130) reads a line that opens with the conclusion keyword anywhere below the first line as the body's own conclusion, so the stop filter (enqueue-rules.mjs:203) dropped the lift as "a conclusion". The hold stood, the required check stayed red, and the one action the message asked for was the one action its own reader discarded. #2246 on 2026-11-03 is the live case.What changed
The filter keeps a conclusion-shaped body when that body asks to lift the stop and carries no stop or hold of its own (
responseOnly), so a lift phrased "You may merge this tip now" clears the stop even when it quotes the PASS. Nothing else widens: a quoted conclusion with no lift phrase still clears nothing, and a PASS marked "record only — do not merge" is still not a lift.Deviation from the one-line predicate proposed at claim time, kept on purpose:
!verdict || LIFT_REQUEST.test(withoutQuotes(...))alone turned the existing casenot ok 101 - a conclusion written on one line of the diff is a request reader only, never a verdictred, because that inline PASS body says "please do not merge this tip" andLIFT_REQUEST's\bmerge this\bmatches it — the whole comment then read as a stop.responseOnly= has a lift phrase AND noSTOP_REQUESTAND noHOLD_LINE, which is narrower and stays on the safe side: it would rather leave a hold standing than clear one by mistake.Known residual, deliberately not changed:
HOLD_LINEis a line-startholdpattern, so a lift that begins "Hold cleared: you may merge" is still read as a hold of its own and would not clear the stop. That direction is safe (a hold is never lifted by accident), and tightening it is a separate change.Red first (on live base
910f6302, only the new cases added)node --test .github/scripts/enqueue-guard.test.mjs→ 106 tests / 105 pass / 1 fail, and the only red is the new case:The refusal is the guard asking for the lift that is already in the list, which is the defect stated in its own words. The counter-proof (same quoted conclusion, no lift phrase → still refused, and the refusal still names
6596354014) is green on the base by design, so the fix cannot pass by clearing every conclusion-shaped comment.Verification at the tip
Tip SHA:
ec4225f712aae273e7312a8cb9db3ac823ae8a29Ran:
node --test .github/scripts/enqueue-guard.test.mjs→ 106 / 106 / 0node --test .github/scripts/merge-gate.test.mjs→ 51 / 51 / 0node --test .github/scripts/review-gate.test.mjs→ 68 / 68 / 0record only — do not mergecases, run alone → 2 / 2 / 0 (a parked PASS is still not its own stop)node --test ".github/scripts/*.test.mjs"(the whole setverifyends with) → 601 / 601 / 0, withnpm_config_cachepointed at a writable cache: the first run was 600 pass / 1 fail,not ok 334 - packed @flybot/social, @flybot/tree, @flybot/timeline and @flybot/workflow import, onnpm packhittingEROFSwriting the default~/.npmcache — an environment cause, and green once the cache moved.Not run: the
core/andplugins/part ofnpm run verify— this worktree has no dependency install (build-client.mjs --checkcannot findesbuild), and the diff touches only.github/scripts, which that part does not execute. The.github/scriptshalf ofverify, which is the part it does share with this change, was run in full above, and CI'stests-okruns at this tip.Checkpoint
{ "pr": 2282, "claim": "Dev-4", "issue": 2281, "summary": "The enqueue guard told a held author to answer the hold with a newer comment and then discarded that comment: a lift quotes the PASS it answers, the parser read the quoted conclusion as the body's own, and the stop filter dropped the whole comment. The filter now keeps a conclusion-shaped body only when it asks to lift the stop and carries no stop or hold of its own. A quoted conclusion with no lift phrase still clears nothing, and a record-only PASS is not a lift. The new case and its counter-proof both live in enqueue-guard.test.mjs.", "files": [".github/scripts/enqueue-rules.mjs", ".github/scripts/enqueue-guard.test.mjs"], "checks": { "ran": "node --test .github/scripts/*.test.mjs (601/601) and the enqueue-guard/merge-gate/review-gate files alone", "result": "green", "at": "ec4225f712aae273e7312a8cb9db3ac823ae8a29" }, "next": "none — ready for review" }