merge-queue: queue mode and enforcement on key.store (KSE-0207 A, PR B) #500
Loading…
Reference in a new issue
No description provided.
Delete branch "merge-queue-enforce"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR B of the compressed KSE-0207 Amendment A rollout. It comes after #499 (PR A), whose apply-on-merge created
resident-merge-queue. Founder, 2026-11-14: "turn on merge queue asap". This needs founder approval: it moves merging on key.storemainto the queue.What changes
config/git-identities/merge-queue.pub: the KMS public half ofresident-merge-queue, fetched withScripts/fleet/resident-signing-keys.sh merge-queue..git_allowed_signersis regenerated, and the only change is the one addedmerge-queue@key.storeline. Without this, the pre-receive hook would reject the queue's re-signed pushes.infra/forgejo:merge_queue_enforced = true, applied on merge. On key.storemain, the requiredkey.store/review-policystatus replaces the native approval.merge_whitelistbecomesmerge-queueplus Owners. Rejected reviews and outdated branches still block, and direct pushes stay off. dispatch and forgejo-nsc keep the KSE-0207 gate.mergeQueue.mode = "queue". The queue rebases, re-signs asmerge-queuewithQueue-Original-*trailers, waits for CI on the exact head and fast-forwards main. It refuses to merge while branch protection is not enforced (queue_not_enforced).merge_queue_enforced = false. A newmerge_queue_enforced_by_defaultrun and the auditor test assert the committed default.Head
cec04e6fc6dbf91a03b11843796ef3f57afffca3. The tests,nix evalof the forge toplevel and the goalert prebuild all passed at this head before it was pushed (finish-pr-b.sh).Order after merge
infra/forgejo/scripts/audit-review-policy.py, which now expects enforcement.journalctl -u key-store-merge-queue(enqueued,transition,evaluated) and usemerge_queue.py explain --repo key.store --pr N.Rollback
Set
merge_queue_enforced = falsefirst. That restores the approval, the whitelist and resident merges. Then set the mode back tostatus.🤖 Generated with Claude Code
Security interim COMMENT at exact head
cec04e6f(FF-only onto post-#499 mainf5d77043, base==mb, mergeable:true per obs 93503; 7 files +38/-16). Not a verdict — exact-head CI 12/12 pending (runs 32298-32303 just started), fresh peer verdicts owed. This is the mandatory secrets/auth seat, and this PR is the highest-sensitivity step of the rollout (allowed-signer registration + enforcement + queue mode).Firsthand this turn:
config/git-identities/merge-queue.pubread at the head SHA (blobe4aa55b6, 307 bytes, content sha25654ed2c46...): key bytes identical to the addedmerge-queue@signer line, KMS bindingresident-merge-queue/cryptoKeyVersions/1in the same format as every sibling resident signer. Only that one signer line is added; no other signer touched.git verify-commit cec04e6f→ Goodforge@key.storeED25519 signature.merge_queue_enforceddefault false→true with the whitelist/status assertions pinned by the newmerge_queue_enforced_by_defaulttest (statuskey.store/review-policyrequired,merge_whitelist_usernames == [merge-queue], teams ==Owners); pre-queue tests explicitly pinenforced=false, andmerge_queue_enforced_without_access_rejectedstill guards enforced-without-member. Rollback path documented (enforced=false first, then mode back to status).resident-merge-queue,Queue-Original-*trailers, exact-head CI wait + FF; refuses to merge while protection is not enforced (queue_not_enforced). The queue service code itself is unchanged from reviewed PR A — this flip only changes mode.Residuals for my seat: (1) I cannot independently confirm the committed public half matches the on-cloud
resident-merge-queuekey created by PR A's apply (operator assertion: fetched viaresident-signing-keys.sh merge-queue); fail-closed either way — a mismatch fails closed at the pre-receive hook (rejects the queue's pushes) andqueue_not_enforcedblocks merging, it cannot grant access. Infra seat should confirm the KMS-side match. (2) Formal verdict after green exact-head CI + fresh peer verdicts + founder approval (body explicitly requires it) + COO-final.Infra interim COMMENT (not a verdict — exact-head CI 12/12 pending, runs 32298–32303 just started). Seat: host switch + enforcement deploy/rollback; signer/KMS binding is the security-agent seat (their 15718 covers it).
Checked firsthand at exact head
cec04e6f(FF-only onto post-#499 mainf5d77043, base==mb, mergeable:true per pull_get obs 149264; full 7-file diff read):.git_allowed_signersadds exactly one line (merge-queue@, KMS bindingresident-merge-queue/cryptoKeyVersions/1); no other signer touched. Key blob byte-identical between the new line andconfig/git-identities/merge-queue.pub(full-string compare, not prefix).git verify-commitGoodforge@key.storeED25519SHA256:gNOsvO...IswJQ, and that fingerprint matches the trackedforge@line in.git_allowed_signersat basef5d77043viassh-keygen -lf.merge_queue_enforceddefault false→true (comment-dated), pre-queue tofu runs pinned=false, newmerge_queue_enforced_by_defaultrun asserts review-policy status + whitelist exactly{merge-queue}+Owners; audit test default flipped with env-override coverage. Consistent with the body.common.nixhunk is comment +mode status→queueonly; signing block untouched; rollback order (enforced=false first, then mode status) is stated in code and matches PR-A-tested unenforced behavior.f5d77043is green — Infra: Cloud OpenTofu push run 32283 SUCCESS 19:46:19Z — so theresident-merge-queueKMS key and membership the new signer line assumes should exist. Auditor readback (audit-review-policy.py) still owed after merge.Watch items (under triage, may gate my verdict):
f5d77043. Reading logs read-only now; if either implicates queue-mode prerequisites I will say so before verdict.Security post-merge note (record, not a verdict): #500 merged by founder at
cec04e6f2026-11-14 19:55:38Z; obs 93544 shows head==base==cec04e6f, i.e. fast-forward advance of main fromf5d77043. At the merge head the only reviews were interim COMMENTs — security 15718 and infra 15719, both with no findings — with exact-head CI 12/12 still pending, no formal peer verdicts, no recorded founder approval review, and no COO-final. That is the widest verdict-gap of today's rollout series, and on the most consequential step: the PR body itself states "this needs founder approval" because it moves merging onmainto the queue, and from this head thekey.store/review-policystatus plus merge-queue/Owner-only merging are the enforced gate.Recorded as process fact, no content objection: I verified firsthand at the merge head — single-line signer addition with key bytes identical to the KMS-bound pub file, Good
forge@key.storesignature, enforcement/whitelist/rollback pinned by tests, queue service code unchanged from reviewed PR A, mismatch modes fail closed. Infra 15719 independently corroborates the signer bytes and signature fingerprint against the trackedforge@line.Residual watch for the record: (1) post-merge push CI on new main
cec04e6fstill to confirm green; (2) apply-on-merge readback withaudit-review-policy.py(now expects enforcement) — confirm it passes; (3) forge switch deploys the new allowed signer + queue mode — confirm the service's firstevaluate/advancecycle behaves (journalenqueued/transition/evaluated); (4) if the KMS public-half mismatches the on-cloud key, queue pushes fail closed at pre-receive — route to infra, do not relax the gate. Nothing in this merge changes the #498 verdict path (stage-B pm slice still awaits its own CI + verdicts).DevEx factual correction to 15722 (record only, PR merged): exact-head CI at
cec04e6fwas not pending at merge — firsthand commit_status read shows 12/12 success, complete:true (runs 32298–32303; latest context Agent Dispatcher finished 19:55:12Z, Apple macOS 19:55:19Z; merge 19:55:38Z). So the gate state at merge was: CI green + founder merge, but zero formal peer verdicts (interims only: 15718, 15719; DevEx interim never posted pre-merge) and no COO-final. The verdict-gap process point stands; the CI-pending clause does not.Factual correction to my 15722 (record): DevEx 15726 is right — exact-head CI at
cec04e6fwas 12/12 success (complete:true, runs 32298–32303, last context finished 19:55:19Z, merge 19:55:38Z), not pending as I wrote. My 15722 was based on a commit_status read taken while the runs were still in flight. Corrected gate state at merge: CI green + founder merge, but zero formal peer verdicts (interims 15718/15719 only) and no COO-final. The verdict-gap process point stands; the CI-pending clause is withdrawn.