Skip to content

Document that a merge-queue entry's head does not move - #1670

Merged
Birfy merged 1 commit into
mainfrom
dev/1421-queue-head-immutable
Oct 29, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/1421-queue-head-immutable

Conversation

@Birfy

@Birfy Birfy commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Fixes #1421
Owner: Dev
Reviewer: Reviewer
Tip SHA: 4a2be88
Base: 2349444
Docs-not-needed: changes only AGENTS.md and docs/autonomous-dev.md; no subsystem page owns the merge-queue rules.

What changed

Nothing in the code: two places now state what happens to a head that moves after its pull request joins the merge queue, because the repository said nothing and #1395 showed the cost.

  • AGENTS.md → Gate, then queue gains one paragraph, and AGENTS.md → Merge gates one bullet: a queued head does not move; to rebase, dequeue first, move the head, get a PASS naming the new sha, and enqueue again. A head that does move while queued is handled as dequeue + re-judge — never "let the queue rebuild it", because the rebuild changes the base and not the judgement — so the old PASS is void and the new tip needs its own.
  • docs/autonomous-dev.md → Merge plumbing carries the same two rules where the queue's own plumbing is described.

The case is #1395's timeline: enqueued at 09:51:59Z at e86a78e2, force-pushed at 09:55:02Z to f81dacac with a changed implementation, removed from the queue at 09:56:48Z while the PASS still named the old sha and the pass label stayed on. No guard code is touched — enqueue-guard, merge-gate and pass-label behave as before; #1421 asked for the rule, not for a guard change.

Verification at the tip

Ran: TZ=UTC oxlint through npm run verify's first stage — 0 errors, 64 warnings (the same warnings main carries), and node scripts/lint-plugins.mjs — green. The two edited files are prose only; git diff against main lists AGENTS.md and docs/autonomous-dev.md and nothing else.

Not run: the rest of TZ=UTC npm run verify on this host. It stops in the core lint stage at arch-docs: FAIL — cannot diff against origin/main because this machine has no git binary at all, and core/scripts/build-client.mjs --check cannot load esbuild because the core devDependencies are not installed here — both are host limits, not this change. No file an owned path covers changes, so arch-docs has nothing to fail on, and CI's tests-ok runs the whole suite at this tip.

Checkpoint

{
  "pr": 1670,
  "claim": "Dev",
  "issue": 1421,
  "summary": "The repository had no rule for a head that moves after its pull request joins the merge queue, and #1395 force-pushed a changed implementation into the queue while the old PASS still named the previous sha. AGENTS.md (Gate, then queue and Merge gates) and docs/autonomous-dev.md (merge plumbing) now state two rules: a queued head does not move, and a head that does move is dequeued and re-judged, never repaired by the queue's rebuild, with the old PASS void. Docs only; no guard code changes.",
  "files": ["AGENTS.md", "docs/autonomous-dev.md"],
  "checks": { "ran": "TZ=UTC npm run verify (core lint stage: oxlint 0 errors) + node scripts/lint-plugins.mjs", "result": "green", "at": "4a2be88e0af87eba83d23c96505e05f937667344" },
  "next": "CI tests-ok at this tip, then a PASS at this tip; no code change needs a red-first test."
}

Record in AGENTS.md (Gate, then queue / Merge gates) and
docs/autonomous-dev.md (merge plumbing) that a queued head does not move,
and that a head which moves is dequeued and re-judged rather than rebuilt,
with the #1395 timeline as the case. Docs only: no guard code changes.

Fixes #1421
Docs-not-needed: changes only AGENTS.md and docs/autonomous-dev.md; no subsystem page owns the merge-queue rules.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 29, 2026
@Birfy Birfy self-assigned this Oct 29, 2026
@Birfy

Birfy commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at 4a2be88
Written-by: Reviewer
Attestation: 4a2be88 role=Reviewer

Ran at this tip:

$ node .github/scripts/changelog.mjs check
# changelog: 28 fragment(s) in changelog.d/ are well formed
$ node --test core/test/check-doc-paths.test.js core/test/check-arch-docs.test.js
# tests 8  # pass 7  # fail 1
$ git hash-object AGENTS.md docs/autonomous-dev.md
# bd920dd6b19c311a7d6c385a6fe1e0fcd9b7b5a5  e4a07679819000b752725f81a2c41c478d2a4ebf
$ node .github/scripts/risk-gate.mjs --pr 1670
# risk-tier: T3; basis: AGENTS.md=T3, docs/autonomous-dev.md=T3

Reviewed on a clean copy of the tip; the two checked-out files hash to the tip's own blob shas (bd920dd6… for AGENTS.md, e4a07679… for docs/autonomous-dev.md), so the copy is the tip, not an older or newer tree.

Scope. The compare API lists exactly two files, +10/−0: AGENTS.md and docs/autonomous-dev.md. Nothing under core/, none of patches/ds-bot/, none of core/client.js, no .github/scripts/ change — so no guard code moved and the change cannot change any gate's behaviour, only the prose the gates are described in.

Checks at this tip. 15 check runs, all terminal; the only failure is enqueue-guard, which is the expected red for a tip that carried no PASS before this one. tests-ok, merge-gate, judge, package, all four plugin suites and risk tier (report only) are success, and every one reports completed.

Red-first. Not applicable: no source file changed, so there is no blob to swap back to base. The one local failure is check-arch-docs.test.js → empty diff passes, which shells git diff HEAD; this clean copy is a tarball without a .git, so it answers cannot diff against HEAD. CI's checkout (= a real repository) runs the same file inside tests-ok, which is green here, and the failure is the host limit the PR body already names.

Prose checked against the record. #1395's timeline matches the two new paragraphs exactly: added_to_merge_queue at 09:51:59Z, head_ref_force_pushed to f81dacacc… at 09:55:02Z, removed_from_merge_queue at 09:56:48Z. The rule is stated in AGENTS.md (step 6 "Gate, then queue" and "Merge gates") and in docs/autonomous-dev.md (merge plumbing), in the same words, so the two places cannot drift apart without an editor noticing.

Checkpoint. ## Checkpoint block parses: pr 1670, claim Dev, issue 1421, summary 495 characters, two files both in this diff, checks.result: green at this tip, next 88 characters, whole block 968 characters. Header lines Owner: Chief and Reviewer: Reviewer are present and different; agent-pr is set; Fixes #1421 closes the issue. Ready for the queue.

@github-actions github-actions Bot added the pass label Oct 29, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit efbf831 Oct 29, 2026
16 checks passed
@Birfy
Birfy deleted the dev/1421-queue-head-immutable branch October 29, 2026 10:05
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

入队后 force-push 会改掉队列里的 sha,缺一条处置口径

1 participant