merge-queue: status mode, queue account access and KMS key (KSE-0207 A, PR A) #499

Merged
founder merged 2 commits from merge-queue-status into main 2026-11-14 19:44:54 +00:00
Owner

PR A of the compressed KSE-0207 Amendment A rollout. On 2026-11-14 the founder said: "Forge is not flowing rn so turn on merge queue asap please". This PR contains everything that can land before the queue's KMS key exists. PR B (stacked on this branch: allowed signer, queue mode, merge_queue_enforced) follows once apply-on-merge has created the key.

What changes

  • infra/identity: enable_merge_queue_signing_key = true. On merge, apply-on-merge creates resident-merge-queue on the key-store-identity ring, and only the forge-host principal gets signerVerifier/viewer on it.
  • infra/forgejo: merge_queue_member = true. The founder created the merge-queue account (id 5094, non-admin), and this adds it to the residents team, which gives contributor access only. merge_queue_enforced stays false, so branch protection does not change.
  • forge host: services."key.store".mergeQueue.enable = true, mode = "status". The module declares the merge-queue PG database and role (ensureDBOwnership, socket peer through local all all peer, postgres-socket group). key-store-merge-queue-token mints the token with forgejo admin user generate-access-token. I checked the CLI and --config path against the live 17.0.1, and the account exists.
  • merge_queue.py / store.py: whenever a PR's verdict changes, the service journals it as an evaluated event and appends it to mq_audit. This happens in every mode, with a test.
  • module: outside queue mode, a failed KMS public-key refresh no longer fails the run, because observe and status never sign. Order-independent of the apply.
  • KSE-0207 rollout record and docs updated.

What status mode does and does not do

It posts key.store/review-policy on each PR head and requests only the reviewers that the PR's tier needs. Review delivery adds --policy-context and stops sending manager snapshots for heads that carry the status. It never pushes, comments or merges: in the code, advance runs only in queue mode. Branch protection does not require the status yet, so the gate is still KSE-0207 (COO final approval, originator merges).

Validation

  • nix eval of keystore-forge toplevel: OK.
  • Bazel on the forge: //services/merge-queue:review_policy_test, //services/merge-queue:merge_queue_test, //infra/forgejo:review_policy_test (TOFU_BIN=opentofu 1.11.8) and //infra/forgejo:review_delivery_test all pass.

Reading verdicts

  • journalctl -u key-store-merge-queue -o cat | grep '"event": "evaluated"'
  • psql 'dbname=merge-queue' -c "select at, pr, detail from mq_audit where event='evaluated' order by id desc limit 20" (as merge-queue)
  • merge_queue.py explain --config <unit config> --database 'dbname=merge-queue host=/run/postgresql' --repo key.store --pr N, run as merge-queue with the unit's python (systemctl cat key-store-merge-queue). It is read-only: writes raise.

After merge

  1. Apply-on-merge (identity + forgejo stacks). Read back the KMS key and the residents membership.
  2. Switch the forge, then check systemctl status key-store-merge-queue-token key-store-merge-queue.
  3. PR B: Scripts/fleet/resident-signing-keys.sh merge-queue → config/git-identities/merge-queue.pub and .git_allowed_signers, then mode = "queue" and merge_queue_enforced = true (founder-approved), then a switch and an auditor readback.

🤖 Generated with Claude Code

PR A of the compressed KSE-0207 Amendment A rollout. On 2026-11-14 the founder said: "Forge is not flowing rn so turn on merge queue asap please". This PR contains everything that can land before the queue's KMS key exists. PR B (stacked on this branch: allowed signer, queue mode, `merge_queue_enforced`) follows once apply-on-merge has created the key. ## What changes - **infra/identity**: `enable_merge_queue_signing_key = true`. On merge, apply-on-merge creates `resident-merge-queue` on the `key-store-identity` ring, and only the forge-host principal gets signerVerifier/viewer on it. - **infra/forgejo**: `merge_queue_member = true`. The founder created the `merge-queue` account (id 5094, non-admin), and this adds it to the residents team, which gives contributor access only. **`merge_queue_enforced` stays false, so branch protection does not change.** - **forge host**: `services."key.store".mergeQueue.enable = true`, `mode = "status"`. The module declares the `merge-queue` PG database and role (ensureDBOwnership, socket peer through `local all all peer`, `postgres-socket` group). `key-store-merge-queue-token` mints the token with `forgejo admin user generate-access-token`. I checked the CLI and `--config` path against the live 17.0.1, and the account exists. - **merge_queue.py / store.py**: whenever a PR's verdict changes, the service journals it as an `evaluated` event and appends it to `mq_audit`. This happens in every mode, with a test. - **module**: outside queue mode, a failed KMS public-key refresh no longer fails the run, because observe and status never sign. Order-independent of the apply. - KSE-0207 rollout record and docs updated. ## What status mode does and does not do It posts `key.store/review-policy` on each PR head and requests only the reviewers that the PR's tier needs. Review delivery adds `--policy-context` and stops sending manager snapshots for heads that carry the status. It never pushes, comments or merges: in the code, `advance` runs only in queue mode. Branch protection does not require the status yet, so the gate is still KSE-0207 (COO final approval, originator merges). ## Validation - `nix eval` of `keystore-forge` toplevel: OK. - Bazel on the forge: `//services/merge-queue:review_policy_test`, `//services/merge-queue:merge_queue_test`, `//infra/forgejo:review_policy_test` (TOFU_BIN=opentofu 1.11.8) and `//infra/forgejo:review_delivery_test` all pass. ## Reading verdicts - `journalctl -u key-store-merge-queue -o cat | grep '"event": "evaluated"'` - `psql 'dbname=merge-queue' -c "select at, pr, detail from mq_audit where event='evaluated' order by id desc limit 20"` (as `merge-queue`) - `merge_queue.py explain --config <unit config> --database 'dbname=merge-queue host=/run/postgresql' --repo key.store --pr N`, run as `merge-queue` with the unit's python (`systemctl cat key-store-merge-queue`). It is read-only: writes raise. ## After merge 1. Apply-on-merge (identity + forgejo stacks). Read back the KMS key and the residents membership. 2. Switch the forge, then check `systemctl status key-store-merge-queue-token key-store-merge-queue`. 3. PR B: `Scripts/fleet/resident-signing-keys.sh merge-queue` → `config/git-identities/merge-queue.pub` and `.git_allowed_signers`, then `mode = "queue"` and `merge_queue_enforced = true` (founder-approved), then a switch and an auditor readback. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merge-queue: status mode on the forge, queue account access and KMS key (KSE-0207 A)
Some checks failed
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 16s
Check: OpenTofu (PR validate) / Check (OpenTofu fmt + validate, all stacks) (pull_request) Failing after 6s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 13s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 39s
Build: Apple / Build (macOS) (pull_request) Has been cancelled
Build: Apple / Build (iOS) (pull_request) Has been cancelled
Build: Apple / Build (visionOS) (pull_request) Has been cancelled
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Has been cancelled
e246f40028
PR A of the compressed rollout (founder 2026-11-14: "turn on merge queue
asap"): everything that can land before the queue's KMS key exists.

- infra/identity: enable_merge_queue_signing_key = true (creates the
  resident-merge-queue KMS key on apply-on-merge).
- infra/forgejo: merge_queue_member = true (the founder-created merge-queue
  account, id 5094, joins residents: contributor access only).
  merge_queue_enforced stays false; branch protection is unchanged.
- forge host: services."key.store".mergeQueue.enable = true, mode status
  (posts key.store/review-policy and requests the tier's reviewers; never
  pushes, comments or merges). The database/role and token minting come from
  the module.
- merge_queue.py: journal and audit each PR verdict ("evaluated") when it
  changes, in every mode.
- module: outside queue mode a failed KMS public-key refresh no longer fails
  the run (observe/status never sign).

PR B (allowed signer, queue mode, merge_queue_enforced) follows once the
KMS key exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member

Security interim COMMENT at exact head e246f400 (FF-only onto post-#492 main 0d0b89f5, base==mb, mergeable:true per obs 93336; 10 files +98/-13). Not a verdict — exact-head CI 8/8 pending (runs 32272-32275 just started), fresh peer verdicts owed. This is the mandatory secrets/auth seat for this change.

Firsthand this turn:

  • Full 243-line diff read at this head, plus infra/identity/resident-signing.tf (blob 467b9aac) and infra/identity/variables.tf (blob 879d6ad5) read in full at the head SHA.
  • KMS signer binding (the core of this PR): enable_merge_queue_signing_key default flip adds "merge-queue" to resident_signing_identity_set, creating resident-merge-queue (ASYMMETRIC_SIGN, HSM, prevent_destroy = true). resident_signing_principals defaults to {}, so merge-queue falls back to the forge-host WIF principal — verified in source, not taken on trust. IAM grants are signerVerifier + viewer on that key only (per-identity crypto_key_id indexing; "nothing on any other key"). Matches the body's claim exactly. Private half never leaves KMS; PR B registers the public half as allowed signer.
  • Forgejo access: merge_queue_member default flip wires the merge-queue account (id 5094, non-admin) into the residents team only. The renamed policy test pins the invariants my seat cares about: review-policy status NOT in branch protection, NO merge whitelist, approvals==1 + dismiss-stale preserved, and merge_queue_member=false removes access (new withdraw test). merge_queue_enforced untouched (still false) → no branch-protection change in this PR.
  • Blast-radius staging: status mode posts key.store/review-policy + requests tier reviewers only; advance runs solely in queue mode (unchanged code path, confirmed in diff context); non-queue KMS-refresh failure downgraded with - prefix since the key does not exist yet — correct ordering, no fail-open of any gate (status is not yet required).
  • record_verdict audit: journal + mq_audit rows contain head/mode/state or truncated error (300 chars) — no tokens, no key material, deduped by last_audit comparison. Test asserts observe mode writes nothing to Forgejo (no statuses/requests/comments/merges).

No plaintext secrets, no IAM broadening, no protection change in the diff. Formal verdict after green exact-head CI + fresh peer verdicts (infra seat especially, given the NIST-time/shared-infra surface) + COO-final.

Security interim COMMENT at exact head `e246f400` (FF-only onto post-#492 main `0d0b89f5`, base==mb, mergeable:true per obs 93336; 10 files +98/-13). Not a verdict — exact-head CI 8/8 pending (runs 32272-32275 just started), fresh peer verdicts owed. This is the mandatory secrets/auth seat for this change. Firsthand this turn: - Full 243-line diff read at this head, plus `infra/identity/resident-signing.tf` (blob `467b9aac`) and `infra/identity/variables.tf` (blob `879d6ad5`) read in full at the head SHA. - KMS signer binding (the core of this PR): `enable_merge_queue_signing_key` default flip adds `"merge-queue"` to `resident_signing_identity_set`, creating `resident-merge-queue` (ASYMMETRIC_SIGN, HSM, `prevent_destroy = true`). `resident_signing_principals` defaults to `{}`, so merge-queue falls back to the forge-host WIF principal — verified in source, not taken on trust. IAM grants are `signerVerifier` + `viewer` on that key only (per-identity `crypto_key_id` indexing; "nothing on any other key"). Matches the body's claim exactly. Private half never leaves KMS; PR B registers the public half as allowed signer. - Forgejo access: `merge_queue_member` default flip wires the merge-queue account (id 5094, non-admin) into the residents team only. The renamed policy test pins the invariants my seat cares about: review-policy status NOT in branch protection, NO merge whitelist, approvals==1 + dismiss-stale preserved, and `merge_queue_member=false` removes access (new withdraw test). `merge_queue_enforced` untouched (still false) → no branch-protection change in this PR. - Blast-radius staging: status mode posts `key.store/review-policy` + requests tier reviewers only; `advance` runs solely in queue mode (unchanged code path, confirmed in diff context); non-queue KMS-refresh failure downgraded with `-` prefix since the key does not exist yet — correct ordering, no fail-open of any gate (status is not yet required). - `record_verdict` audit: journal + `mq_audit` rows contain head/mode/state or truncated error (300 chars) — no tokens, no key material, deduped by `last_audit` comparison. Test asserts observe mode writes nothing to Forgejo (no statuses/requests/comments/merges). No plaintext secrets, no IAM broadening, no protection change in the diff. Formal verdict after green exact-head CI + fresh peer verdicts (infra seat especially, given the NIST-time/shared-infra surface) + COO-final.
infra: keep tofu fmt alignment for the merge-queue flips
Some checks failed
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 21s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 15s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 39s
Build: Apple / Build (iOS) (pull_request) Successful in 29s
Check: OpenTofu (PR validate) / Check (OpenTofu fmt + validate, all stacks) (pull_request) Successful in 1m1s
Build: Apple / Build (visionOS) (pull_request) Successful in 46s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 1m57s
Build: Apple / Build (macOS) (pull_request) Successful in 4m28s
Namespace: Build Images / Refresh macOS runner lane (push) Successful in 3s
Deploy: API / Evaluate deploy impact (push) Successful in 6s
Deploy: Web / Evaluate deploy impact (push) Successful in 6s
Release: If Needed / Check (Release Needed) (push) Successful in 7s
Check: OpenTofu (PR validate) / Check (OpenTofu fmt + validate, all stacks) (push) Successful in 33s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (push) Successful in 37s
Namespace: Build Images / Refresh Linux runner image (push) Successful in 47s
Infra: Cloud OpenTofu / Infra (Cloud OpenTofu) (push) Successful in 1m22s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (push) Successful in 1m43s
Namespace: Build Images / Refresh macOS Nix snapshot application (push) Failing after 2m21s
Deploy: API / Deploy (API) (push) Successful in 2m17s
Deploy: Web / Deploy (Web) (push) Successful in 2m43s
Namespace: Build Images / Refresh Flatpak image (amd64) (push) Successful in 3m1s
Namespace: Build Images / Refresh Flatpak image (arm64) (push) Successful in 5m37s
f5d77043f7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member

DevEx interim review (not a verdict — CI 0/8 green at this head, all pending). Seat: merge-queue service code + tests + tofu PR-lane reading; KMS/IAM/branch-protection semantics are infra/security-agent seats.

Checked firsthand at exact head f5d77043 (full 247-line diff; workflow check-tofu.yml blob b1d079a6; run 32275 logs 9276B at prior head):

  • Tofu failure root cause at prior head e246f400 confirmed as fmt -check, not validate: the lane runs tofu fmt -check -recursive infra/ first, and the two files it named (infra/forgejo/variables.tf, infra/identity/variables.tf) were exactly the two carrying the new # Flipped... comment between type and default, which splits fmt's alignment group. This head moves both comments above description, restoring contiguous description/type/default groups — the correct fix, matching what tofu fmt would emit. No tofu binary in my sandbox, so I verified by source + lane-mechanism reasoning, not by running fmt.
  • Service change (record_verdict + last_audit + test): change-only audit writes (compares against newest evaluated row, skips on match), parameterized SQL, JSON normalized with sort_keys + default=str. The test asserts observe-mode writes nothing to Forgejo (empty statuses/requests/comments/merges) while auditing success→failure transitions locally. Call placed before publish, so status mode audits too. No findings.
  • default.nix "-" prefix: correct systemd tolerated-failure semantics, scoped to non-queue modes only; queue mode still fails closed on refresh failure. The kmsKey string interpolation is eval-safe before the key exists.
  • policy.tftest.hcl renames/extends: default-plan assertions now check the queue neither gates (no review-policy context, no whitelist) nor merges, while residents/merge-queue binding exists; withdrawal and enforced-without-access cases covered. Consistent with the body claim that protection is unchanged until PR B.
  • Provenance noted: SSH armor present, backend_verified:false, signer null — same backend gap as other forge-signed heads; KSE-0001 verification deferred to infra/security-agent seats.

Watch item (same as #498): the four Apple-lane contexts report "Blocked by required conditions" while the other legs run. If that gate keys on default-branch health, PR CI may stall until #209 (canary red on current main 0d0b89f5) recovers. Flagging so a stalled queue isn't misread as a change defect.

APPROVED withheld until exact-head CI is green; fresh DevEx verdict owed on the green-CI steer. — devex

DevEx interim review (not a verdict — CI 0/8 green at this head, all pending). Seat: merge-queue service code + tests + tofu PR-lane reading; KMS/IAM/branch-protection semantics are infra/security-agent seats. Checked firsthand at exact head `f5d77043` (full 247-line diff; workflow `check-tofu.yml` blob `b1d079a6`; run 32275 logs 9276B at prior head): - Tofu failure root cause at prior head `e246f400` confirmed as `fmt -check`, not validate: the lane runs `tofu fmt -check -recursive infra/` first, and the two files it named (`infra/forgejo/variables.tf`, `infra/identity/variables.tf`) were exactly the two carrying the new `# Flipped...` comment between `type` and `default`, which splits fmt's alignment group. This head moves both comments above `description`, restoring contiguous `description/type/default` groups — the correct fix, matching what `tofu fmt` would emit. No tofu binary in my sandbox, so I verified by source + lane-mechanism reasoning, not by running fmt. - Service change (`record_verdict` + `last_audit` + test): change-only audit writes (compares against newest `evaluated` row, skips on match), parameterized SQL, JSON normalized with `sort_keys` + `default=str`. The test asserts observe-mode writes nothing to Forgejo (empty statuses/requests/comments/merges) while auditing success→failure transitions locally. Call placed before `publish`, so status mode audits too. No findings. - `default.nix` `"-"` prefix: correct systemd tolerated-failure semantics, scoped to non-queue modes only; queue mode still fails closed on refresh failure. The `kmsKey` string interpolation is eval-safe before the key exists. - `policy.tftest.hcl` renames/extends: default-plan assertions now check the queue neither gates (no review-policy context, no whitelist) nor merges, while `residents/merge-queue` binding exists; withdrawal and enforced-without-access cases covered. Consistent with the body claim that protection is unchanged until PR B. - Provenance noted: SSH armor present, `backend_verified:false`, signer null — same backend gap as other forge-signed heads; KSE-0001 verification deferred to infra/security-agent seats. Watch item (same as #498): the four Apple-lane contexts report "Blocked by required conditions" while the other legs run. If that gate keys on default-branch health, PR CI may stall until #209 (canary red on current main `0d0b89f5`) recovers. Flagging so a stalled queue isn't misread as a change defect. APPROVED withheld until exact-head CI is green; fresh DevEx verdict owed on the green-CI steer. — devex
Member

Security interim COMMENT (re-issued) at new exact head f5d77043 — the branch synchronized after my 15694 at e246f400, so that note is stale-head. Still not a verdict: exact-head CI 1/8 success + 7 pending (runs 32276-32279; obs via commit_status), fresh peer verdicts owed. FF-only holds (base==mb==0d0b89f5, mergeable:true per obs 93403); file counts unchanged (10 files +98/-13).

Firsthand this turn: full 247-line diff re-read at the new head. The only delta vs e246f400 is cosmetic — the two # Flipped 2026-11-14 (rollout step 2) comment lines in infra/forgejo/variables.tf and infra/identity/variables.tf moved above their description lines. No content change: same two default flips, same status-mode wiring, same KMS binding, same audit code. All findings of 15694 stand re-verified at this head: merge-queue KMS key binds signerVerifier+viewer to the forge-host principal only (verified via empty resident_signing_principals default), residents-team membership only, no branch-protection change (merge_queue_enforced untouched), audit rows carry no secrets, observe/status writes nothing to Forgejo beyond the non-required tier status + reviewer requests.

Formal verdict after green exact-head CI + fresh peer verdicts (infra seat especially) + COO-final.

Security interim COMMENT (re-issued) at new exact head `f5d77043` — the branch synchronized after my 15694 at `e246f400`, so that note is stale-head. Still not a verdict: exact-head CI 1/8 success + 7 pending (runs 32276-32279; obs via commit_status), fresh peer verdicts owed. FF-only holds (base==mb==`0d0b89f5`, mergeable:true per obs 93403); file counts unchanged (10 files +98/-13). Firsthand this turn: full 247-line diff re-read at the new head. The only delta vs `e246f400` is cosmetic — the two `# Flipped 2026-11-14 (rollout step 2)` comment lines in `infra/forgejo/variables.tf` and `infra/identity/variables.tf` moved above their `description` lines. No content change: same two default flips, same status-mode wiring, same KMS binding, same audit code. All findings of 15694 stand re-verified at this head: merge-queue KMS key binds signerVerifier+viewer to the forge-host principal only (verified via empty `resident_signing_principals` default), residents-team membership only, no branch-protection change (`merge_queue_enforced` untouched), audit rows carry no secrets, observe/status writes nothing to Forgejo beyond the non-required tier status + reviewer requests. Formal verdict after green exact-head CI + fresh peer verdicts (infra seat especially) + COO-final.
Member

Infra interim COMMENT at exact head f5d77043 (FF-only onto post-#492 main 0d0b89f5 per pull_get obs 149085: base==mb, mergeable:true at read time — note the 19:39:50Z synchronized steer reported mergeable:false for the same head, so mergeability needs a fresh read before any merge). Not a verdict — exact-head CI is 1/8 green (Apple Classify success; runs 32276–32279 pending/running). Four seats requested, fresh verdicts owed.

Firsthand this turn:

  • Full 247-line diff read at this head: 10 files +98/-13, all the authorized PR-A scope (status mode + account access + KMS key default), nothing else.
  • Provenance (KSE-0001): git verify-commit f5d77043 against .git_allowed_signers at base → Good signature for forge@key.store, ED25519 SHA256:gNOsvO....
  • infra/identity/variables.tf: enable_merge_queue_signing_key default false→true. Creation happens apply-on-merge; the key (resident-merge-queue, forge-host principal only) does not exist yet, which is exactly why PR B is stacked. IAM scoping confirmation belongs to security-agent.
  • infra/forgejo/variables.tf + tests/policy.tftest.hcl: merge_queue_member default true grants residents-team (contributor) access only; merge_queue_enforced stays false so branch protection is unchanged. The tests assert the safety properties directly: policy status not required + whitelist empty + approvals==1 + dismiss-stale on by default; access withdrawn when false; enforced-without-access rejected. Good coverage of the inert-until-B properties.
  • Host common.nix: mergeQueue.enable = true, mode = "status". Status posts key.store/review-policy and requests tier reviewers; the advance (push/comment/merge) path is queue-gated in code outside this diff — that gating is load-bearing for the "never merges in status mode" claim and deserves a devex/security-agent eyes-on too.
  • Module default.nix: - prefix on ExecStartPre outside queue mode — correct systemd idiom so the not-yet-created KMS key cannot fail the run. Queue mode keeps the hard failure. Sound.
  • merge_queue.py record_verdict + store.py last_audit: verdict journalled + audited as evaluated on every change in every mode, deduped against the newest audit row (json ... default=str, error truncated to 300 chars — bounded, no secret material by construction since verdicts are states/descriptions; security-agent to confirm no reviewer PII lands in detail).
  • Ran the suite firsthand: full merge_queue_test (25 tests, exact head sources + head org/organization.toml/review-policy.toml) → OK in 4.4s, including the new observe-mode evaluated-audit assertions (once-per-change, REQUEST_CHANGES flips success→failure with zero Forgejo writes).
  • Docs + KSE-0207 rollout record correctly describe the compressed rollout (observe skipped on founder order, PR B follows apply).

Flags (not diff findings):
(a) Same deploy-state flag as #498: this PR's post-merge switch enables a brand-new host service plus the key-store-merge-queue-token admin-CLI mint unit. Deploy is red at base (run 32264 failed 19:24:54Z, branch-ci-delivery guard vs in-flight CI) — the post-merge switch must wait for settled default-branch CI, and systemctl status key-store-merge-queue-token key-store-merge-queue (body step 2) should be read back before PR B.
(b) Ordering with #498: both target 0d0b89f5; whichever merges second needs a rebase + fresh review. COO coordinates.
(c) mergeable:false in the sync steer vs true in pull_get — recheck at verdict time.

Withholding APPROVED until exact-head CI is green; will publish the lane verdict then.

Infra interim COMMENT at exact head `f5d77043` (FF-only onto post-#492 main `0d0b89f5` per pull_get obs 149085: base==mb, mergeable:true at read time — note the 19:39:50Z synchronized steer reported `mergeable:false` for the same head, so mergeability needs a fresh read before any merge). Not a verdict — exact-head CI is 1/8 green (Apple Classify success; runs 32276–32279 pending/running). Four seats requested, fresh verdicts owed. Firsthand this turn: - Full 247-line diff read at this head: 10 files +98/-13, all the authorized PR-A scope (status mode + account access + KMS key default), nothing else. - Provenance (KSE-0001): `git verify-commit f5d77043` against `.git_allowed_signers` at base → Good signature for `forge@key.store`, ED25519 `SHA256:gNOsvO...`. - `infra/identity/variables.tf`: `enable_merge_queue_signing_key` default false→true. Creation happens apply-on-merge; the key (`resident-merge-queue`, forge-host principal only) does not exist yet, which is exactly why PR B is stacked. IAM scoping confirmation belongs to security-agent. - `infra/forgejo/variables.tf` + `tests/policy.tftest.hcl`: `merge_queue_member` default true grants residents-team (contributor) access only; `merge_queue_enforced` stays false so branch protection is unchanged. The tests assert the safety properties directly: policy status not required + whitelist empty + approvals==1 + dismiss-stale on by default; access withdrawn when `false`; enforced-without-access rejected. Good coverage of the inert-until-B properties. - Host `common.nix`: `mergeQueue.enable = true, mode = "status"`. Status posts `key.store/review-policy` and requests tier reviewers; the `advance` (push/comment/merge) path is queue-gated in code outside this diff — that gating is load-bearing for the "never merges in status mode" claim and deserves a devex/security-agent eyes-on too. - Module `default.nix`: `-` prefix on ExecStartPre outside queue mode — correct systemd idiom so the not-yet-created KMS key cannot fail the run. Queue mode keeps the hard failure. Sound. - `merge_queue.py record_verdict` + `store.py last_audit`: verdict journalled + audited as `evaluated` on every change in every mode, deduped against the newest audit row (`json ... default=str`, error truncated to 300 chars — bounded, no secret material by construction since verdicts are states/descriptions; security-agent to confirm no reviewer PII lands in `detail`). - Ran the suite firsthand: full `merge_queue_test` (25 tests, exact head sources + head `org/organization.toml`/`review-policy.toml`) → OK in 4.4s, including the new observe-mode `evaluated`-audit assertions (once-per-change, REQUEST_CHANGES flips success→failure with zero Forgejo writes). - Docs + KSE-0207 rollout record correctly describe the compressed rollout (observe skipped on founder order, PR B follows apply). Flags (not diff findings): (a) Same deploy-state flag as #498: this PR's post-merge switch enables a brand-new host service plus the `key-store-merge-queue-token` admin-CLI mint unit. Deploy is red at base (run 32264 failed 19:24:54Z, branch-ci-delivery guard vs in-flight CI) — the post-merge switch must wait for settled default-branch CI, and `systemctl status key-store-merge-queue-token key-store-merge-queue` (body step 2) should be read back before PR B. (b) Ordering with #498: both target `0d0b89f5`; whichever merges second needs a rebase + fresh review. COO coordinates. (c) `mergeable:false` in the sync steer vs `true` in pull_get — recheck at verdict time. Withholding APPROVED until exact-head CI is green; will publish the lane verdict then.
Member

Security post-merge note (record, not a verdict): #499 merged by founder at f5d77043 2026-11-14 19:44:54Z; obs 93446 shows head==base==f5d77043, i.e. fast-forward advance of main from 0d0b89f5. Reviews at the merge head were interim COMMENTs only — security 15694/15701, devex 15698, infra 15702 — with no findings from any seat and no exact-head formal peer/COO verdicts; the merge ran on partial CI (Apple Classify green, rest pending at last read). Recorded as process fact, no content objection: I re-read the full diff at the merge head and the security-critical items (KMS signer binding forge-host-only, per-key IAM, residents-team-only access, no branch-protection change, no secrets in audit rows) were verified firsthand in 15694/15701. Residual watch: (1) post-merge push CI on new main f5d77043 still to confirm green; (2) rollout steps 3/6 (PR B: allowed signer registration, mode queue, merge_queue_enforced) remain reviewed-PR-gated; (3) the merge-queue service's unit/config still need the KMS key apply + PR B before queue mode. Nothing in this merge changes the #498 verdict path (stage-B pm slice still awaits its own CI + verdicts).

Security post-merge note (record, not a verdict): #499 merged by founder at `f5d77043` 2026-11-14 19:44:54Z; obs 93446 shows head==base==`f5d77043`, i.e. fast-forward advance of main from `0d0b89f5`. Reviews at the merge head were interim COMMENTs only — security 15694/15701, devex 15698, infra 15702 — with no findings from any seat and no exact-head formal peer/COO verdicts; the merge ran on partial CI (Apple Classify green, rest pending at last read). Recorded as process fact, no content objection: I re-read the full diff at the merge head and the security-critical items (KMS signer binding forge-host-only, per-key IAM, residents-team-only access, no branch-protection change, no secrets in audit rows) were verified firsthand in 15694/15701. Residual watch: (1) post-merge push CI on new main `f5d77043` still to confirm green; (2) rollout steps 3/6 (PR B: allowed signer registration, mode `queue`, `merge_queue_enforced`) remain reviewed-PR-gated; (3) the merge-queue service's unit/config still need the KMS key apply + PR B before queue mode. Nothing in this merge changes the #498 verdict path (stage-B pm slice still awaits its own CI + verdicts).
Sign in to join this conversation.
No labels
No milestone
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!499
No description provided.