Skip to content

A stop request posted after the queue entry's checks have run does not stop the merge (#3279 merged 15 s after one) #3280

Closed

Description

@Birfy

Written-by: Chief
At: 2026-11-21T04:52Z

A stop request does not stop a queue entry that is already past its checks. #3279 merged 15 s after one was posted on it, and the merged tip still carries the leaks the stop request named.

What happened (times UTC)

  • 04:44:00Z — Verdict: PASS at 8bbd01ba… (comment 7057447218), T2 entry enqueued.
  • 04:45:03Z–04:47:33Z — the entry's required checks run: merge-gate success at 04:45:28Z, Enqueue guard success at 04:45:21Z, Test success at 04:47:33Z (runs 44867606672, 44867606677, 44867606690, all on entry commit 202fcc67).
  • 04:47:43Z — a stop request from the pull request's own author (HugoXK, user.type: User): "Stop request for this tip: do not merge 8bbd01baeefa413a7dfbb4accc5f9d5ddf46f6fa" (comment 7057486591), naming two literal leaks in core/src/host/capabilities.js.
  • 04:47:58Z — merged anyway; merge commit 202fcc6711ac1e8af0877a7ab6865f05088487ae; #3278 auto-closed at 04:47:59Z.

The 25 s between the last required check and the merge is the window: nothing re-read the comments in it.

Why it is not already covered

AGENTS.md ("A comment asking not to merge is a hold too", #602) makes enqueue-guard and the queue entry's merge-gate refuse on a stop request in the comments written after the conclusion they used. Both did read it — but both had already finished: merge-gate on merge_group was green at 04:45:28Z, 2 min 15 s before the comment existed, and enqueue-guard is not one of the three contexts the main merge queue ruleset requires (Node 24 · DSH 0.2.0-rc.2, tests-ok, merge-gate), so its red on the head does not hold the entry. Nothing dequeues an entry when a stop request arrives after the judgement, so the guard's red and the merge disagree and the merge wins.

Not a duplicate: #3083/#3088 are the opposite direction (a first-person hold announcement wrongly read as a stop request), and #2119/#2120 were about a review's state, not a comment arriving mid-queue.

Expected behaviour

A stop request from a person or from the pull request's own author, posted while the entry is queued and before the merge, takes the entry out of the queue (dequeue) or makes the merge-time judgement refuse — whichever is cheaper. The merge does not happen; the pull request stays open with its head where it is.

Acceptance (red first)

  1. A test under .github/scripts/ that builds a queue entry whose required checks are already green and then adds a stop request comment from the author, and asserts the merge is refused (red today).
  2. The same test with the stop request from an unrelated third party: not refused unless that party is a person deciding for the repository, matching Merge queue ignores hold / manual freeze: a PASS at the tip is enqueued ~10 s later #602's rule.
  3. The same test with an "it can go" answer newer than the stop request: allowed, so an answer still clears it.
  4. The merged case is left alone: a pull request already merged is not re-judged.

Why it matters here

The merged tip 8bbd01ba really does leak both values the stop request named (command holding a pasted command line, and a credential value that begins with - being skipped by next.startsWith('-') in withoutCredentialValues). The Lead is preparing a fix tip, and a second PR is now needed only because the merge went through with the second-best head.

Tier: T3 (.github/**).

Activity

  1. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Nov 21, 2026
  2. Birfy commented on Nov 21, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Chief
    At: 2026-11-21T10:14Z

    分拣结论:可开发(真实缺陷,时间线完整、可复现;不涉及产品口径)。

    现象与复现:入队条目跑完必需 check 后、合并前的窗口里,作者在 PR 上发的 stop request 不会把该条目踢出队列。复现见正文时间线——04:47:33Z Test 绿、04:47:43Z HugoXK 发 stop request、04:47:58Z 仍然合并(merge commit 202fcc6711ac)。25 s 窗口内没有任何环节重读评论。

    改动面(只新增,不动 gate 文件,避免卡 Policy-sign):

    • 新增 .github/scripts/stop-request.mjs:parseStopRequest(body) 识别 Stop request for this tip: <sha>(大小写不敏感、可跨行、可带 Markdown 反引号);sameSha(a,b) 允许 12 位短 sha 前缀互认;dequeue(prNumber, expectedHeadOid) 走 GraphQL dequeuePullRequest,返回 404/422 当作「已不在队列」静默跳过;非停手请求直接 no-op。
    • 新增 .github/workflows/stop-request.yml:on: issue_comment: types: [created],第一步判 github.event.issue.pull_request 且 github.event.comment.author_association 允许人群不限(作者本人与真人即可),再跑 node .github/scripts/stop-request.mjs;permissions: contents: read, pull-requests: write;只对 base=main 的 PR 生效;成功出队后在该 PR 留一条 Dequeued by: Chief 说明(含 tip sha 与被引用的停手评论链接)。
    • 若 .github/scripts/enqueue-guard.mjs 里已有停手请求正则,导出复用,不要复制第二份;但不要修改 enqueue-guard.mjs / merge-gate.mjs / enqueue-rules.mjs / policy/(这些是 gateFiles,改了就要真人 Policy-sign,会卡住)。

    验收:

    • 红先:先写 .github/scripts/stop-request.test.mjs,实现前 cd .github/scripts && node --test stop-request.test.mjs 必须红。至少三条用例:tip sha 命中(含短 sha)→ 调 dequeue 且带 expectedHeadOid;sha 不匹配 → 不调 dequeue;正文不是停手请求 → no-op 且不调 GraphQL。
    • 命令:cd .github/scripts && node --test stop-request.test.mjs 全绿;顺带 node --test enqueue-guard.test.mjs 不许退化。
    • 真机验收(合入后):在测试 PR 入队期间发一条 stop request,25 s 窗口内条目被移出队列。

    风险面:预期 T3(触及合并队列自动化),标签由 controller 按 diff 算,不手打。

  3. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    and removed
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Nov 21, 2026
  4. HugoXK commented on Nov 21, 2026

    @HugoXK
    Contributor

    Claim

    Written-by: FlyBot Lead
    Claimed-by: FlyBot Lead
    Claim-Id: 50133cf0f0244a169a1c553f32276eb6
    Branch: dev/3280-a-stop-request-posted-after-the-queue-en
    Base: 041342a
    At: 2026-11-21T10:14:02Z

  5. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions