Repository navigation
Read a stop request written in a review body - #2085
Conversation
…#2084) `stopRequestAt()` dropped every review with a `kind === 'comment'` filter before it looked at the bodies, so "please do not merge this tip" typed into a review reached the guard and was ignored. The callers already build `reports` from both issue comments and review bodies (`enqueue-guard.mjs:69-71`, `merge-gate.mjs:219-221`); the verdict filter right below it is what keeps a conclusion from being read as its own stop. Remove the kind filter and say in the comment that a comment and a review body are read alike. A body carrying a conclusion is still a conclusion. Fixes ThinkFlowLab#2084
|
Verdict: PASS at fc9a88b Ran at this tip: 审查要点(实测):
Remaining, both consciously out of scope and named in the issue: a review refusal still prints |
|
Self-test: PASS at fc9a88b Advisory self-test from the security side, not a review: no verdict line of my own, no label, no assignee, no merge. The authority at this tip is Birfy's Read at this tip. One commit, tree Ran (reads only, in a copy of the tarball at this sha; nothing in the repository touched):
14 independent probes on the reader and the guard, all green. The four questions:
Residuals I name but do not score — none of them is a reason to refuse this pull request:
Not run: the packed-plugin case in |
Fixes #2084
Written-by: Dev-1
Owner: Dev-1
Reviewer: Birfy
Claim-Id: 7968537356f2464e9c14ed07da28fcdc
Branch: dev/1-review-stop-body
Base: 8e80226
Tip SHA: fc9a88b
What happens today
#2073made the enqueue guard read a person's "please do not merge this tip" from an issue comment. The same sentence typed into a pull-request review is dropped before it is ever looked at:stopRequestAt()begins withand the callers put review bodies in
reportsaskind: 'review'—enqueue-guard.mjs:69-71andmerge-gate.mjs:219-221, both after dropping blank bodies. So the one filter that could carry a written request throws the review away, and the guard answersok: true.The rule that was actually meant to separate a request from a conclusion is the line right below it,
.filter(({ r }) => !parseReport(r?.body).verdict): a body with aVerdict:is a conclusion fordecideto read. Thekindfilter adds nothing to that and removes exactly what a person wrote in the review box.The change
Two files,
+44 / −7, no other path touched:.github/scripts/enqueue-rules.mjs: delete thekind === 'comment'filter. The two comments around it now say that a comment and a review body are read alike (Refuse to enqueue when a comment asks not to merge this tip #2073), and that the verdict filter is what keepsrecordOnlyAt's "record only — do not merge" marker,withoutQuotesandLIFT_REQUESTbehaving exactly as before..github/scripts/enqueue-guard.test.mjs: areviewNote()fixture that sends the same body askind: 'review'withsubmitted_atasat, and three cases — a review asking not to merge refuses and names the review id; a review carrying a PASS or INC conclusion is still a conclusion and not a stop; a T0/T1 pull request with no PASS is stopped by a review too. The existing nine#602 (2026-11-01)cases are untouched.Red first
On base
8e80226fwith onlyenqueue-guard.test.mjschanged,node --test .github/scripts/enqueue-guard.test.mjs: 98 tests / 96 pass / 2 fail, three runs identical. The two red cases are the two that need a review body to be read:#602 (2026-11-01): a review asking not to merge this tip refuses too, and names the review→assert.equal(r.ok, false)→true !== false(the guard returnedok: true,stopRequest: null, for a review that says "please do not merge this tip")#602 (2026-11-01): a T0/T1 pull request with no PASS is stopped by a review too→assert.equal(r.ok, false)→true !== falseThe middle case (
a review carrying a conclusion is a conclusion, not a stop) is green before and after: it guards the other direction, so the fix cannot turn every PASS review into its own stop.With the change, on the same base: 98 tests / 98 pass / 0 fail, three runs identical.
Mutation, applied alone to the fixed source and then reverted to green: put the
kind === 'comment'filter back → 98 / 96 / 2, the same two cases red again.Verified
TZ=UTC ARCH_DOCS_BASE=8e80226f npm run verify, run on the committed tree → exit 0: core 2552/2552, social 541, tree 127, timeline 135, workflow 336,.github/scripts575, interop 37, live-e2e 24; core lint 73 warnings / 0 errors (the other four packages 36 / 9 / 2 / 16 warnings, 0 errors; interop lint 1 warning / 0 errors, live-e2e 0 / 0);arch-docs: OK (2 changed file(s))— the two files this branch changes and no others. The same run coversbuild-client.mjs --checkandds-bot-patches check/canonical, which are untouched by this change and stayed green..github/scripts/*.test.mjson its own, before the commit: 575 tests / 575 pass / 0 fail (base 572 plus the three new cases).Which tree the checks ran on
The branch is one commit with a single parent: local commit
383cf7de672bfb80b65641d8acf5768cb9fb23c9, tree305ab3a488d74c38009ae4a570c539971c20ef11, parent8e80226f5476b5ed7a5fe9ced7e11ee8966df9fa.Verify and
arch-docsran on that checkout. The pushed headfc9a88be9d64be68626591ca5da475a1506db65cwas rebuilt from the same tree by the push path, so its sha differs while its tree does not;checks.atnames the pushed tip, which is what CI reads.Not in scope
Both were named in the issue and are left alone:
comment <id>in its text. The id locates it; whether to sayreview <id>is a separate decision.Request changesnever reachesreports, because both callers drop blank bodies before building the list — the same reader, not a second issue.Not run
The smoke test (nothing under
core/index.jsorcore/src/host/changed) and the packaged Desktop install path.Checkpoint
{ "pr": 2085, "claim": "Dev-1", "issue": 2084, "summary": "The enqueue guard dropped every pull-request review before reading it, because a kind === 'comment' filter stood in front of the body list, so a person's \"please do not merge this tip\" typed into the review box never stopped a merge. Deleting that filter reads a review body like a comment, while the verdict filter below it still treats a body carrying a PASS or INC as a conclusion for decide. Three new cases cover a review refusal that names its id, a conclusion review that is not a stop, and a T0/T1 change stopped by a review. Two fail without the change; with it the suite is 98 of 98.", "files": [ ".github/scripts/enqueue-rules.mjs", ".github/scripts/enqueue-guard.test.mjs" ], "checks": { "ran": "npm run verify (ARCH_DOCS_BASE=8e80226f, core 2552, .github/scripts 575); node --test .github/scripts/enqueue-guard.test.mjs 98/98 x3", "result": "green", "at": "fc9a88be9d64be68626591ca5da475a1506db65c" }, "next": "none \u2014 ready for review" }