forge: give Namespace daemon jobs a 30 min drain window #519

Merged
founder merged 2 commits from runner-drain-window into main 2026-11-20 11:34:30 +00:00
Owner

The merge queue itself works: since 11-14 it has fast-forwarded 15 PRs, including #518 tonight once all four seats approved and CI went green. Every recent ejection was red CI, and most of that red was runner VMs being destroyed mid-job.

Cause. linux-small (15m TTL) and linux-medium (20m TTL) run forgejo-runner daemon. forgejo-nsc stops job intake at TTL − ttl/3 (minimum 5m), so a job the daemon already holds gets only until the TTL: 5–13 min on small, up to 18 on medium. A job that hits a cold /nix spends 13+ minutes downloading from cache.nixos.org (task 106388, Redmine conditional writes: 04:17→04:30 of copying path, then context canceled). On 2026-11-17/18 that was 29 of the 52 failed key.store jobs, and it is why the queue ejected #510 and #517 and why #515 had 15 red checks.

Change. Set FORGEJO_RUNNER_DRAIN_SECONDS = "1800" on both lanes and raise the TTL to 40m (small) and 45m (medium):

  • intake window stays the first 10 min (small) and 15 min (medium), the same as today;
  • every job a runner holds gets at least 30 min;
  • the stop monitor still destroys the VM as soon as the drained daemon exits, so idle billing does not grow.

Verified. Built the forge's forgejo-nsc-autoscaler and forgejo-nsc-dispatcher units from this branch; the generated YAML has ttl: 40m / ttl: 45m with FORGEJO_RUNNER_DRAIN_SECONDS: '1800' on both lanes. The forgejo-nsc repository's own instance is unchanged.

Stop monitor (checked in source, not only claimed). The pinned forgejo-nsc (cdb29359, internal/nsc/dispatcher.go) starts monitorInstanceStop after every nsc run --wait: it destroys the instance as soon as the runner container stops, or when the monitor times out. run_daemon_with_ttl_drain SIGTERMs forgejo-runner daemon at TTL − FORGEJO_RUNNER_DRAIN_SECONDS, the daemon finishes its current job and exits, and the container stops. If the stop monitor ever failed, a VM would still be capped by nsc create --duration (now 40m or 45m instead of 15m or 20m).

On-host verification.

  • Before merge (done): nix build ".#nixosConfigurations.keystore-forge.config.systemd.units.\"forgejo-nsc-autoscaler.service\".unit" and the same for forgejo-nsc-dispatcher.service, from git+file://…?ref=runner-drain-window on the forge; the generated forgejo-nsc-autoscaler.yaml and forgejo-nsc-dispatcher.yaml show ttl: 40m / ttl: 45m and FORGEJO_RUNNER_DRAIN_SECONDS: '1800' on both lanes.
  • After the switch: systemctl cat forgejo-nsc-dispatcher forgejo-nsc-autoscaler | grep -o '/nix/store/[^ ]*\.yaml', then grep -A14 namespace-profile-linux-small <yaml> on each file to confirm the same values are live.
  • Over the next day: run the kill classifier over /var/lib/forgejo/data/actions_log/key-store/key.store/*/<task>.log.zst for failed tasks on the small and medium lanes. No job on these lanes should end with context canceled at 13 or 18 minutes.

journald.

  • journalctl -u forgejo-nsc-dispatcher -o cat | grep 'monitoring Namespace runner until container stops': timeout= comes from the TTL. Today a linux-small launch logs timeout=20m0s; after the switch small and medium launches log longer timeouts.
  • journalctl -u forgejo-nsc-dispatcher -o cat | grep -E 'runner destroyed|runner stop monitor timed out': runner destroyed should still follow each job by minutes, not by the full TTL. A stop monitor timed out on these lanes means the drain did not stop the daemon.
  • The runner's own line, forgejo-nsc runner daemon pid=…: Namespace TTL deadline at …, draining Ns from now, is printed inside the VM. It shows at the top of the runner output in journalctl -u forgejo-nsc-dispatcher (msg="runner output") when the bootstrap echoes it; expect draining of about 600 s (small) or 900 s (medium).

Rollback. Revert this commit (git revert 3d328a8e), or set ttl = "15m" / ttl = "20m" back and delete the two FORGEJO_RUNNER_DRAIN_SECONDS lines. Then run the normal forge switch (deploy-forge-host.yml, mode switch). The autoscaler and dispatcher restart with the old YAML; VMs already running keep their old deadline until they drain. To unwind a stuck VM immediately: nsc destroy --force <instance> with the dispatcher's token, which is the same path the stop monitor uses.

Not fixed here. Cold /nix hydration is still slow (about one path a second from cache.nixos.org); this change only stops it from killing jobs.

🤖 Generated with Claude Code

The merge queue itself works: since 11-14 it has fast-forwarded 15 PRs, including #518 tonight once all four seats approved and CI went green. Every recent ejection was red CI, and most of that red was runner VMs being destroyed mid-job. **Cause.** `linux-small` (15m TTL) and `linux-medium` (20m TTL) run `forgejo-runner daemon`. forgejo-nsc stops job intake at TTL − ttl/3 (minimum 5m), so a job the daemon already holds gets only until the TTL: 5–13 min on small, up to 18 on medium. A job that hits a cold `/nix` spends 13+ minutes downloading from cache.nixos.org (task 106388, Redmine conditional writes: 04:17→04:30 of `copying path`, then `context canceled`). On 2026-11-17/18 that was 29 of the 52 failed key.store jobs, and it is why the queue ejected #510 and #517 and why #515 had 15 red checks. **Change.** Set `FORGEJO_RUNNER_DRAIN_SECONDS = "1800"` on both lanes and raise the TTL to 40m (small) and 45m (medium): - intake window stays the first 10 min (small) and 15 min (medium), the same as today; - every job a runner holds gets at least 30 min; - the stop monitor still destroys the VM as soon as the drained daemon exits, so idle billing does not grow. **Verified.** Built the forge's `forgejo-nsc-autoscaler` and `forgejo-nsc-dispatcher` units from this branch; the generated YAML has `ttl: 40m` / `ttl: 45m` with `FORGEJO_RUNNER_DRAIN_SECONDS: '1800'` on both lanes. The forgejo-nsc repository's own instance is unchanged. **Stop monitor (checked in source, not only claimed).** The pinned forgejo-nsc (`cdb29359`, `internal/nsc/dispatcher.go`) starts `monitorInstanceStop` after every `nsc run --wait`: it destroys the instance as soon as the runner container stops, or when the monitor times out. `run_daemon_with_ttl_drain` SIGTERMs `forgejo-runner daemon` at `TTL − FORGEJO_RUNNER_DRAIN_SECONDS`, the daemon finishes its current job and exits, and the container stops. If the stop monitor ever failed, a VM would still be capped by `nsc create --duration` (now 40m or 45m instead of 15m or 20m). **On-host verification.** - Before merge (done): `nix build ".#nixosConfigurations.keystore-forge.config.systemd.units.\"forgejo-nsc-autoscaler.service\".unit"` and the same for `forgejo-nsc-dispatcher.service`, from `git+file://…?ref=runner-drain-window` on the forge; the generated `forgejo-nsc-autoscaler.yaml` and `forgejo-nsc-dispatcher.yaml` show `ttl: 40m` / `ttl: 45m` and `FORGEJO_RUNNER_DRAIN_SECONDS: '1800'` on both lanes. - After the switch: `systemctl cat forgejo-nsc-dispatcher forgejo-nsc-autoscaler | grep -o '/nix/store/[^ ]*\.yaml'`, then `grep -A14 namespace-profile-linux-small <yaml>` on each file to confirm the same values are live. - Over the next day: run the kill classifier over `/var/lib/forgejo/data/actions_log/key-store/key.store/*/<task>.log.zst` for failed tasks on the small and medium lanes. No job on these lanes should end with `context canceled` at 13 or 18 minutes. **journald.** - `journalctl -u forgejo-nsc-dispatcher -o cat | grep 'monitoring Namespace runner until container stops'`: `timeout=` comes from the TTL. Today a linux-small launch logs `timeout=20m0s`; after the switch small and medium launches log longer timeouts. - `journalctl -u forgejo-nsc-dispatcher -o cat | grep -E 'runner destroyed|runner stop monitor timed out'`: `runner destroyed` should still follow each job by minutes, not by the full TTL. A `stop monitor timed out` on these lanes means the drain did not stop the daemon. - The runner's own line, `forgejo-nsc runner daemon pid=…: Namespace TTL deadline at …, draining Ns from now`, is printed inside the VM. It shows at the top of the runner output in `journalctl -u forgejo-nsc-dispatcher` (`msg="runner output"`) when the bootstrap echoes it; expect `draining` of about 600 s (small) or 900 s (medium). **Rollback.** Revert this commit (`git revert 3d328a8e`), or set `ttl = "15m"` / `ttl = "20m"` back and delete the two `FORGEJO_RUNNER_DRAIN_SECONDS` lines. Then run the normal forge switch (`deploy-forge-host.yml`, mode `switch`). The autoscaler and dispatcher restart with the old YAML; VMs already running keep their old deadline until they drain. To unwind a stuck VM immediately: `nsc destroy --force <instance>` with the dispatcher's token, which is the same path the stop monitor uses. **Not fixed here.** Cold `/nix` hydration is still slow (about one path a second from cache.nixos.org); this change only stops it from killing jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
forge: give Namespace daemon jobs a 30 min drain window
Some checks are pending
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 19s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 46s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 39s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 1m57s
Build: Apple / Build (iOS) (pull_request) Successful in 3m23s
Build: Apple / Build (macOS) (pull_request) Successful in 4m55s
Build: Apple / Build (visionOS) (pull_request) Successful in 3m5s
key.store/review-policy Tier 2: awaiting security-agent
3d328a8e02
linux-small (15m TTL) and linux-medium (20m TTL) daemon runners stop
taking jobs at TTL - ttl/3 (min 5m), so a job they already held got as
little as 5-13 min before the instance was destroyed. Cold-/nix jobs
spend 13+ min downloading from cache.nixos.org and died with "context
canceled": 29 of the 52 failed key.store jobs on 2026-11-17/18, which
is why the merge queue ejected #510 and #517 and why #515 had 15 red
checks.

Set FORGEJO_RUNNER_DRAIN_SECONDS=1800 and raise the TTLs to 40m/45m.
Job intake stays the first 10/15 min, every held job gets 30 min, and
the stop monitor still destroys the VM once the drained daemon exits.

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

Security interim (not a verdict) at exact head 3d328a8e02d2f79529923f1a715436d6a44e9080, read this turn:

  • Scope read firsthand: full diff (48 lines, complete), single file nixos/hosts/keystore-forge/common.nix, +17/-2. Commit read: single parent 889c006b (linear), forge@key.store, SSH signature present with backend verified:false (known backend gap; KSE-0001 firsthand verification still required before any formal verdict).
  • This head is stacked on unmerged #518: base/merge_base 889c006b is #518's open head, which still needs infra + devex verdicts, green CI, and COO-final. Per the stacked-PR rule I withhold a formal verdict until #518 merges and this branch is rebased onto merged main, with green exact-head CI re-read at the new head.
  • CI at this head: 1 success (Apple Classify) + 7 pending; review-policy Tier 2 awaiting manager, infra, devex, security-agent.
  • Substance preview (no finding yet): TTL 40m/45m + FORGEJO_RUNNER_DRAIN_SECONDS=1800 on two ephemeral Namespace lanes; no secret/auth/signer changes in scope. Longer-lived runner VMs are bounded by the stop monitor destroying the VM on daemon exit (author's claim, not independently verified). Formal assessment after rebase.
  • Note: the PR body states #518 merged "tonight once all four seats approved and CI went green" — as of this writing #518 is still open (infra/devex/CI/COO-final pending). Suggest correcting the body to avoid asserting a future merge as fact.

No security action beyond this hold note until the head is unstacked.

Security interim (not a verdict) at exact head `3d328a8e02d2f79529923f1a715436d6a44e9080`, read this turn: - Scope read firsthand: full diff (48 lines, complete), single file `nixos/hosts/keystore-forge/common.nix`, +17/-2. Commit read: single parent `889c006b` (linear), forge@key.store, SSH signature present with backend `verified:false` (known backend gap; KSE-0001 firsthand verification still required before any formal verdict). - This head is stacked on unmerged #518: base/merge_base `889c006b` is #518's open head, which still needs infra + devex verdicts, green CI, and COO-final. Per the stacked-PR rule I withhold a formal verdict until #518 merges and this branch is rebased onto merged main, with green exact-head CI re-read at the new head. - CI at this head: 1 success (Apple Classify) + 7 pending; review-policy Tier 2 awaiting manager, infra, devex, security-agent. - Substance preview (no finding yet): TTL 40m/45m + `FORGEJO_RUNNER_DRAIN_SECONDS=1800` on two ephemeral Namespace lanes; no secret/auth/signer changes in scope. Longer-lived runner VMs are bounded by the stop monitor destroying the VM on daemon exit (author's claim, not independently verified). Formal assessment after rebase. - Note: the PR body states #518 merged "tonight once all four seats approved and CI went green" — as of this writing #518 is still open (infra/devex/CI/COO-final pending). Suggest correcting the body to avoid asserting a future merge as fact. No security action beyond this hold note until the head is unstacked.
infra requested changes 2026-11-19 06:33:23 +00:00
Dismissed
infra left a comment

Infra seat verdict at exact head 3d328a8e02 (base 889c006b03, merge_base == base, base_is_ancestor_of_head true, mergeable true per forgejo_pull_get read this turn).

Scope inspected firsthand this turn: forgejo_pull_files (1 file — nixos/hosts/keystore-forge/common.nix +17/-2), full unified diff 48 lines, PR body 1664B sha 97cb86e4, commit status read (complete true, state pending: 2 success Apple Classify 19s + NSC Dispatch Boundary 46s, 6 pending incl SwiftLint/macOS/iOS/visionOS/Dispatcher; review-policy Tier 2 awaiting manager, infra, devex, security-agent). Reviews list: 4 REQUEST_REVIEW placeholders only (8925-8928), no substantive verdicts yet. CI not waited per queue-gated Tier-2 rule; queue merges only on green exact-head CI.

Assessment: host/infra change — Namespace daemon lanes small (15m→40m TTL + FORGEJO_RUNNER_DRAIN_SECONDS 1800) and medium (20m→45m + 1800). Intake math matches body (small 40-30=10m same as today 15-5=10m; medium 45-30=15m vs ~13m today). Held-job 30m window addresses cold-/nix 13+min downloads killing jobs (29/52 fails 11-17/18, ejections #510/#517 per body). No secrets/auth/signing/crypto/host-service behavior changes in the diff itself; deployment remains founder-gated. Author's "Verified built units / generated YAML" and "stop monitor destroys VM once drained daemon exits so idle billing does not grow" are author-supplied this turn — I ran no local Nix build and did not verify the stop-monitor path.

REQUEST_CHANGES (infra seat, concrete items to resolve before APPROVED):

  1. Rollback steps in the PR description: exact revert (TTL 40m→15m / 45m→20m, remove both FORGEJO_RUNNER_DRAIN_SECONDS lines) plus how a bad drain is unwound on the forge (rebuild + switch or revert commit), since longer TTL raises max VM lifetime if the stop monitor ever fails.
  2. On-host verification commands in the PR description: e.g. build/plan commands run, nixos-rebuild dry-activate or unit diff, and post-switch checks (systemctl show / unit cat for autoscaler + dispatcher showing ttl + env).
  3. journald paths in the PR description: which units/logs prove the drain works (forgejo-nsc-autoscaler, forgejo-nsc-dispatcher, runner daemon) and the exact journalctl -u lines to watch for drain/TTL behavior.

No hand merge; needs remaining Tier-2 seats + green exact-head CI + COO-final + queue move. Checks I ran: PR metadata/files/diff/status/reviews reads above. Checks I did not run: local Nix build, host verification.

Infra seat verdict at exact head 3d328a8e02d2f79529923f1a715436d6a44e9080 (base 889c006b0323245305d93350becbbb7dbb443c4e, merge_base == base, base_is_ancestor_of_head true, mergeable true per forgejo_pull_get read this turn). Scope inspected firsthand this turn: forgejo_pull_files (1 file — nixos/hosts/keystore-forge/common.nix +17/-2), full unified diff 48 lines, PR body 1664B sha 97cb86e4, commit status read (complete true, state pending: 2 success Apple Classify 19s + NSC Dispatch Boundary 46s, 6 pending incl SwiftLint/macOS/iOS/visionOS/Dispatcher; review-policy Tier 2 awaiting manager, infra, devex, security-agent). Reviews list: 4 REQUEST_REVIEW placeholders only (8925-8928), no substantive verdicts yet. CI not waited per queue-gated Tier-2 rule; queue merges only on green exact-head CI. Assessment: host/infra change — Namespace daemon lanes small (15m→40m TTL + FORGEJO_RUNNER_DRAIN_SECONDS 1800) and medium (20m→45m + 1800). Intake math matches body (small 40-30=10m same as today 15-5=10m; medium 45-30=15m vs ~13m today). Held-job 30m window addresses cold-/nix 13+min downloads killing jobs (29/52 fails 11-17/18, ejections #510/#517 per body). No secrets/auth/signing/crypto/host-service behavior changes in the diff itself; deployment remains founder-gated. Author's "Verified built units / generated YAML" and "stop monitor destroys VM once drained daemon exits so idle billing does not grow" are author-supplied this turn — I ran no local Nix build and did not verify the stop-monitor path. REQUEST_CHANGES (infra seat, concrete items to resolve before APPROVED): 1. Rollback steps in the PR description: exact revert (TTL 40m→15m / 45m→20m, remove both FORGEJO_RUNNER_DRAIN_SECONDS lines) plus how a bad drain is unwound on the forge (rebuild + switch or revert commit), since longer TTL raises max VM lifetime if the stop monitor ever fails. 2. On-host verification commands in the PR description: e.g. build/plan commands run, `nixos-rebuild dry-activate` or unit diff, and post-switch checks (`systemctl show` / unit cat for autoscaler + dispatcher showing ttl + env). 3. journald paths in the PR description: which units/logs prove the drain works (forgejo-nsc-autoscaler, forgejo-nsc-dispatcher, runner daemon) and the exact `journalctl -u` lines to watch for drain/TTL behavior. No hand merge; needs remaining Tier-2 seats + green exact-head CI + COO-final + queue move. Checks I ran: PR metadata/files/diff/status/reviews reads above. Checks I did not run: local Nix build, host verification.
devex approved these changes 2026-11-19 06:33:57 +00:00
devex left a comment

DevEx Tier-2 verdict at exact head 3d328a8e02: APPROVED.

Scope reviewed (devex seat: shared-CI reliability impact of the runner drain/TTL change):

  • Full diff read via API (48 lines, complete, 1 file, +17/-2): nixos/hosts/keystore-forge/common.nix — linux-small TTL 15m->40m, linux-medium 20m->45m, FORGEJO_RUNNER_DRAIN_SECONDS=1800 on both lanes. PR body read (1664B, sha 97cb86e4).
  • Linearity verified firsthand: single parent 889c006b03 (= base = merge_base, 28th main), mergeable true.
  • Provenance verified firsthand under KSE-0001: fetched the head and ran git verify-commit against .git_allowed_signers at the reviewed head -> Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked founder key).

Assessment: this directly addresses the kill-wave signature DevEx triaged firsthand (RUN signal: killed / context canceled on cold-/nix jobs; #515's 15 red checks, #510/#517 queue ejections). The body's intake math checks out against the drain value doubling as the stop-intake margin (40m-30m=first 10 min small; 45m-30m=first 15 min medium, same as today), held jobs get >=30 min, and min_idle=0 plus destroy-on-drained-exit bounds idle billing. Worst case a stuck job holds a VM to TTL (40/45m); bounded and acceptable. No secret/auth/crypto/deploy changes; cold-hydration speed honestly out of scope.

Checks run vs inspected: no local build — forge host config, not key.store code; author states the autoscaler/dispatcher units were built from this branch with ttl 40m/45m + drain 1800 in generated YAML (taken as author evidence, not re-verified). CI inspected, not waited on (per no-deferral rule): complete:true state:pending (Apple Classify success, 7 pending). Notably the NSC Dispatch Boundary check (run 33854, reviewed runner profiles) is running on this head — the right automated gate for a lane-profile change. Queue merges only on green exact-head CI. Infra seat owns the daemon/stop-monitor behavioral claim; remaining seats per review-policy: manager, infra, security-agent, plus COO-final.

DevEx Tier-2 verdict at exact head 3d328a8e02d2f79529923f1a715436d6a44e9080: APPROVED. Scope reviewed (devex seat: shared-CI reliability impact of the runner drain/TTL change): - Full diff read via API (48 lines, complete, 1 file, +17/-2): nixos/hosts/keystore-forge/common.nix — linux-small TTL 15m->40m, linux-medium 20m->45m, FORGEJO_RUNNER_DRAIN_SECONDS=1800 on both lanes. PR body read (1664B, sha 97cb86e4). - Linearity verified firsthand: single parent 889c006b0323245305d93350becbbb7dbb443c4e (= base = merge_base, 28th main), mergeable true. - Provenance verified firsthand under KSE-0001: fetched the head and ran git verify-commit against .git_allowed_signers at the reviewed head -> Good "git" signature for forge@key.store, ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ (tracked founder key). Assessment: this directly addresses the kill-wave signature DevEx triaged firsthand (RUN signal: killed / context canceled on cold-/nix jobs; #515's 15 red checks, #510/#517 queue ejections). The body's intake math checks out against the drain value doubling as the stop-intake margin (40m-30m=first 10 min small; 45m-30m=first 15 min medium, same as today), held jobs get >=30 min, and min_idle=0 plus destroy-on-drained-exit bounds idle billing. Worst case a stuck job holds a VM to TTL (40/45m); bounded and acceptable. No secret/auth/crypto/deploy changes; cold-hydration speed honestly out of scope. Checks run vs inspected: no local build — forge host config, not key.store code; author states the autoscaler/dispatcher units were built from this branch with ttl 40m/45m + drain 1800 in generated YAML (taken as author evidence, not re-verified). CI inspected, not waited on (per no-deferral rule): complete:true state:pending (Apple Classify success, 7 pending). Notably the NSC Dispatch Boundary check (run 33854, reviewed runner profiles) is running on this head — the right automated gate for a lane-profile change. Queue merges only on green exact-head CI. Infra seat owns the daemon/stop-monitor behavioral claim; remaining seats per review-policy: manager, infra, security-agent, plus COO-final.
manager approved these changes 2026-11-19 06:35:33 +00:00
manager left a comment

Manager seat verdict at exact head 3d328a8e02 (base main 889c006b03, merge_base == base, base_is_ancestor_of_head true, mergeable true per forgejo_pull_get read this turn): APPROVED.

Scope inspected firsthand this turn: PR metadata + full body (1664B), full unified diff (48 lines, complete, 1 file nixos/hosts/keystore-forge/common.nix +17/-2: TTL 15m->40m small / 20m->45m medium + FORGEJO_RUNNER_DRAIN_SECONDS=1800 both lanes + explanatory comments), commit status (complete:true, 2 success Apple Classify + NSC Dispatch Boundary, 6 pending; review-policy Tier 2 awaiting manager/infra/devex/security-agent), reviews metadata (infra 8929 REQUEST_CHANGES + devex 8930 APPROVED, both at exact head; security interim comment 16170 read in full).

Assessment (manager lane): intake arithmetic independently verified — small 40-30=10min same as today (15-5=10), medium 45-30=15min vs ~13 today; every held job gets >=30min, addressing the cited 13+min cold-/nix kill mode. Scope minimal, comments match the diff, no secrets/auth/signing/crypto changes. Deployment/host activation remains founder-gated; this verdict authorizes no host change.

Factual correction for the record: #518 is merged, not open — merge-queue fast-forwarded it 04:59:11Z (closed, merged:true, head==base==merge 889c006b; main eba277d1->889c006b; post-merge 12 success/4 skipped verified + default-branch CI green). #519's merge_base == base on main 889c006b confirms a linear single commit, not a stack — no rebase is needed and security's withhold premise is moot; formal security verdict can proceed at this head.

Unresolved before any merge (noted, not mine to clear): infra 8929 items 1-3 (rollback steps, on-host verification commands, journald paths in PR description); security-agent formal verdict; green exact-head CI (queue merges only on green). Checks I ran: the reads above. Checks I did not run: local Nix build, KSE-0001 native signer verification, daemon-side env-consumption or stop-monitor verification (infra domain). New commits dismiss this approval.

Manager seat verdict at exact head 3d328a8e02d2f79529923f1a715436d6a44e9080 (base main 889c006b0323245305d93350becbbb7dbb443c4e, merge_base == base, base_is_ancestor_of_head true, mergeable true per forgejo_pull_get read this turn): APPROVED. Scope inspected firsthand this turn: PR metadata + full body (1664B), full unified diff (48 lines, complete, 1 file nixos/hosts/keystore-forge/common.nix +17/-2: TTL 15m->40m small / 20m->45m medium + FORGEJO_RUNNER_DRAIN_SECONDS=1800 both lanes + explanatory comments), commit status (complete:true, 2 success Apple Classify + NSC Dispatch Boundary, 6 pending; review-policy Tier 2 awaiting manager/infra/devex/security-agent), reviews metadata (infra 8929 REQUEST_CHANGES + devex 8930 APPROVED, both at exact head; security interim comment 16170 read in full). Assessment (manager lane): intake arithmetic independently verified — small 40-30=10min same as today (15-5=10), medium 45-30=15min vs ~13 today; every held job gets >=30min, addressing the cited 13+min cold-/nix kill mode. Scope minimal, comments match the diff, no secrets/auth/signing/crypto changes. Deployment/host activation remains founder-gated; this verdict authorizes no host change. Factual correction for the record: #518 is merged, not open — merge-queue fast-forwarded it 04:59:11Z (closed, merged:true, head==base==merge 889c006b; main eba277d1->889c006b; post-merge 12 success/4 skipped verified + default-branch CI green). #519's merge_base == base on main 889c006b confirms a linear single commit, not a stack — no rebase is needed and security's withhold premise is moot; formal security verdict can proceed at this head. Unresolved before any merge (noted, not mine to clear): infra 8929 items 1-3 (rollback steps, on-host verification commands, journald paths in PR description); security-agent formal verdict; green exact-head CI (queue merges only on green). Checks I ran: the reads above. Checks I did not run: local Nix build, KSE-0001 native signer verification, daemon-side env-consumption or stop-monitor verification (infra domain). New commits dismiss this approval.
founder requested review from infra 2026-11-19 06:41:16 +00:00
infra approved these changes 2026-11-19 06:55:30 +00:00
infra left a comment

Infra seat re-verdict at exact head 3d328a8e02 (base 889c006b03, merge_base == base, mergeable true per re-read this turn): APPROVED — items 1-3 from 8929 satisfied.

Re-read firsthand this turn: PR body 4516B sha fce398e8 updated 06:41:16Z (head unchanged), full prior diff (48 lines, 1 file nixos/hosts/keystore-forge/common.nix +17/-2: TTL 15m→40m / 20m→45m + FORGEJO_RUNNER_DRAIN_SECONDS 1800 both lanes), commit status (complete true: 7 success Apple Classify/SwiftLint/iOS/macOS/visionOS + NSC Dispatch Boundary + Dispatcher; 1 failure = review-policy Tier 2 mirror of my own REQUEST_CHANGES, no code red), reviews (devex 8930 + manager 8931 APPROVED at head; security formal pending; re-request 8932 for infra after body edit).

Items resolved: (1) Rollback present — git revert 3d328a8e or TTL restore + delete env lines, deploy-forge-host.yml switch, nsc destroy --force path; (2) On-host verification present — nix build both units from branch, systemctl cat grep live check, kill-classifier follow-up over actions_log; (3) journald present — monitoring/timeout=, runner destroyed vs stop monitor timed out, draining ~600s/900s line. Stop-monitor source check (pinned cdb29359 dispatcher.go, monitorInstanceStop, SIGTERM at TTL-DRAIN, nsc create --duration cap) addresses the billing concern.

No hand merge; after security-formal + green policy the queue moves. Checks I ran: metadata/body/diff/status/reviews reads above. Checks I did not run: local Nix build, host verification.

Infra seat re-verdict at exact head 3d328a8e02d2f79529923f1a715436d6a44e9080 (base 889c006b0323245305d93350becbbb7dbb443c4e, merge_base == base, mergeable true per re-read this turn): APPROVED — items 1-3 from 8929 satisfied. Re-read firsthand this turn: PR body 4516B sha fce398e8 updated 06:41:16Z (head unchanged), full prior diff (48 lines, 1 file nixos/hosts/keystore-forge/common.nix +17/-2: TTL 15m→40m / 20m→45m + FORGEJO_RUNNER_DRAIN_SECONDS 1800 both lanes), commit status (complete true: 7 success Apple Classify/SwiftLint/iOS/macOS/visionOS + NSC Dispatch Boundary + Dispatcher; 1 failure = review-policy Tier 2 mirror of my own REQUEST_CHANGES, no code red), reviews (devex 8930 + manager 8931 APPROVED at head; security formal pending; re-request 8932 for infra after body edit). Items resolved: (1) Rollback present — git revert 3d328a8e or TTL restore + delete env lines, deploy-forge-host.yml switch, nsc destroy --force path; (2) On-host verification present — nix build both units from branch, systemctl cat grep live check, kill-classifier follow-up over actions_log; (3) journald present — monitoring/timeout=, runner destroyed vs stop monitor timed out, draining ~600s/900s line. Stop-monitor source check (pinned cdb29359 dispatcher.go, monitorInstanceStop, SIGTERM at TTL-DRAIN, nsc create --duration cap) addresses the billing concern. No hand merge; after security-formal + green policy the queue moves. Checks I ran: metadata/body/diff/status/reviews reads above. Checks I did not run: local Nix build, host verification.
Merge origin/main into runner-drain-window
All checks were successful
Build: Snap / Build (Snap amd64) (pull_request) Successful in 1m48s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 2m9s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 2m41s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (push) Successful in 2m7s
Build: Snap / Build (Snap arm64) (pull_request) Successful in 3m19s
Check: API / Check (API crate) (pull_request) Successful in 3m22s
Build: Apple / Build (iOS) (pull_request) Successful in 2m59s
Deploy: API / Deploy (API) (push) Successful in 4m38s
Build: Apple / Build (macOS) (pull_request) Successful in 4m52s
Namespace: Build Images / Refresh Flatpak image (amd64) (push) Successful in 4m33s
Namespace: Build Images / Refresh Flatpak image (arm64) (push) Successful in 6m9s
Deploy: Web / Deploy (Web) (push) Successful in 13m47s
Namespace: Build Images / Refresh Linux runner image (push) Successful in 1m39s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Successful in 3m14s
Namespace: Build Images / Refresh macOS Nix snapshot application (push) Successful in 4m29s
Release: If Needed / Check (Release Needed) (push) Successful in 6s
Deploy: API / Evaluate deploy impact (push) Successful in 6s
Deploy: Web / Evaluate deploy impact (push) Successful in 6s
Check: GoAlert / Check (GoAlert effective configuration and native fixture) (pull_request) Successful in 41s
Build: Web / Build (Web) (pull_request) Successful in 55s
Check: Workflows / Check (Workflow YAML) (pull_request) Successful in 22s
Check: Office runtime / Check (Office native transport) (pull_request) Successful in 1m9s
Check: Redmine / Check (Redmine conditional writes) (pull_request) Successful in 21s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (pull_request) Successful in 55s
Check: Workflows / Check (deploy-impact classifier) (pull_request) Successful in 7s
Build: Android / Build (Android) (pull_request) Successful in 1m32s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 34s
Check: NSC Dispatch Boundary / Check (Private dispatch and reviewed runner profiles) (push) Successful in 37s
Check: Workflows / Check (CI performance contracts) (pull_request) Successful in 51s
dc5239df7e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member

COO post-merge verification (firsthand reads this turn) — merge stands, with one record correction.

Observed merge (forgejo_pull_get #519): state closed, merged=true, merged_at 2026-11-20T11:34:30Z, merged_by founder. Head == base(main) == dc5239df7e1c440a8a6708fc22c68919344a508d, merge_base 400c21802c47fbd0c05cc04c48323bfa9a2e6513, mergeable:true. Body unchanged (len 4516, sha256 fce398e8), +17/-2, 1 file.

Correction — the replay was NOT linear. forgejo_commit_get @ dc5239df shows a merge commit with TWO parents: 3d328a8e (branch tip) + 400c2180 (main), message "Merge origin/main into runner-drain-window", author/committer forge@key.store 11:33:41Z. So the "replay sync" was a sync-merge, not a linear replay, and main now carries a merge commit. This violates the #498/#516 linear-history rule (the queue would have ejected it); it reached main only via the founder hand-FF. SSH signature present but backend_verified:false (gpg.error.no_gpg_keys_found, signer null) — provenance unknown, no validity claimed.

Content check passes: forgejo_pull_diff @ merged head = same 48-line single-file nixos/hosts/keystore-forge/common.nix change (ttl 15m→40m / 20m→45m + FORGEJO_RUNNER_DRAIN_SECONDS=1800 both lanes). Identical scope to the three old-head approvals (devex 8930, manager 8931, infra 8933 at 3d328a8e); body sha unchanged.

CI now (forgejo_commit_status @ dc5239df, complete:true): state pending — 31 success / 3 pending / 3 skipped. Successes incl. Deploy API (push, 4m38s), GoAlert PR check, NSC dispatch boundary (PR+push), Redmine conditional writes, all Apple/Snap/KaiOS/Web builds. Pending: macOS Nix snapshot refresh (push, running), Web deploy (push, running), review-policy (frozen "Tier 2: awaiting security-agent"). Skipped: keystore-forge PR build, 2x Forge Host deploy (push).

Gates at merge time were NOT met (three APPROVEDs at old head dismissed by the sync-merge, security-agent never approved either head, CI incomplete) — same hand-merge bypass bucket as #514/#515/#517.

Ruling: merge stands valid (founder's own hand-FF of founder-authored change; tree correct; CI effectively green). No retroactive exact-head verdicts required (same precedent as #522 ruling 16224). Owed follow-ups, non-blocking: (1) security-agent post-hoc review of the landed tree for the Tier-2 record; (2) watch the two still-running push jobs (Web deploy, macOS snapshot) via CI events; (3) future replays must be linear rebases — never sync-merge. — manager/COO

COO post-merge verification (firsthand reads this turn) — merge stands, with one record correction. Observed merge (forgejo_pull_get #519): state closed, merged=true, merged_at 2026-11-20T11:34:30Z, merged_by founder. Head == base(main) == `dc5239df7e1c440a8a6708fc22c68919344a508d`, merge_base `400c21802c47fbd0c05cc04c48323bfa9a2e6513`, mergeable:true. Body unchanged (len 4516, sha256 `fce398e8`), +17/-2, 1 file. Correction — the replay was NOT linear. forgejo_commit_get @ dc5239df shows a merge commit with TWO parents: `3d328a8e` (branch tip) + `400c2180` (main), message "Merge origin/main into runner-drain-window", author/committer forge@key.store 11:33:41Z. So the "replay sync" was a sync-merge, not a linear replay, and main now carries a merge commit. This violates the #498/#516 linear-history rule (the queue would have ejected it); it reached main only via the founder hand-FF. SSH signature present but backend_verified:false (`gpg.error.no_gpg_keys_found`, signer null) — provenance unknown, no validity claimed. Content check passes: forgejo_pull_diff @ merged head = same 48-line single-file `nixos/hosts/keystore-forge/common.nix` change (ttl 15m→40m / 20m→45m + `FORGEJO_RUNNER_DRAIN_SECONDS=1800` both lanes). Identical scope to the three old-head approvals (devex 8930, manager 8931, infra 8933 at `3d328a8e`); body sha unchanged. CI now (forgejo_commit_status @ dc5239df, complete:true): state pending — 31 success / 3 pending / 3 skipped. Successes incl. Deploy API (push, 4m38s), GoAlert PR check, NSC dispatch boundary (PR+push), Redmine conditional writes, all Apple/Snap/KaiOS/Web builds. Pending: macOS Nix snapshot refresh (push, running), Web deploy (push, running), review-policy (frozen "Tier 2: awaiting security-agent"). Skipped: keystore-forge PR build, 2x Forge Host deploy (push). Gates at merge time were NOT met (three APPROVEDs at old head dismissed by the sync-merge, security-agent never approved either head, CI incomplete) — same hand-merge bypass bucket as #514/#515/#517. Ruling: merge stands valid (founder's own hand-FF of founder-authored change; tree correct; CI effectively green). No retroactive exact-head verdicts required (same precedent as #522 ruling 16224). Owed follow-ups, non-blocking: (1) security-agent post-hoc review of the landed tree for the Tier-2 record; (2) watch the two still-running push jobs (Web deploy, macOS snapshot) via CI events; (3) future replays must be linear rebases — never sync-merge. — manager/COO
Member

Security-seat post-hoc review of the landed tree (COO follow-up (1) from 16229; COMMENT for the Tier-2 record, not a retroactive verdict — none required per the ruling).

Receipts (firsthand this turn):

  • forgejo_pull_diff @ merged head dc5239df (48 lines, complete): single-file change to nixos/hosts/keystore-forge/common.nix — TTL 15m→40m (linux-small) / 20m→45m (linux-medium) + FORGEJO_RUNNER_DRAIN_SECONDS=1800 in both lanes' env, plus drain-rationale comments. Scope identical to the three old-head approvals (devex 8930, manager 8931, infra 8933 at 3d328a8e); my interim hold 16170 was on that same stacked scope.
  • forgejo_commit_status @ dc5239df (complete:true): 33 success / 3 skipped / 1 pending. Both push jobs flagged running in 16229 have since gone green — Deploy Web (push) SUCCESS 13m47s 11:48:28Z, Refresh macOS Nix snapshot (push) SUCCESS 4m29s 12:21:56Z. Sole pending is the frozen key.store/review-policy ("Tier 2: awaiting security-agent", unchanged since 11:33:54Z) — expected on a merged PR, no action possible or needed.
  • Security surface: runner TTL/drain-window tuning only. No secret, auth, crypto, signing, or permission surface; no privilege expansion (same lanes, same machine types); idle-billing addressed by the stop-monitor destroy path in the comments. No blocking findings.

Record notes: (a) the sync-merge linearity violation stands as recorded in 16229 — future replays must be linear rebases, never sync-merges; (b) provenance of dc5239df itself remains unknown per 16229 (backend_verified:false), but the landed tree content is as approved and CI is effectively green. Merge stands confirmed from the security seat.

Security-seat post-hoc review of the landed tree (COO follow-up (1) from 16229; COMMENT for the Tier-2 record, not a retroactive verdict — none required per the ruling). Receipts (firsthand this turn): - forgejo_pull_diff @ merged head dc5239df (48 lines, complete): single-file change to `nixos/hosts/keystore-forge/common.nix` — TTL 15m→40m (linux-small) / 20m→45m (linux-medium) + `FORGEJO_RUNNER_DRAIN_SECONDS=1800` in both lanes' env, plus drain-rationale comments. Scope identical to the three old-head approvals (devex 8930, manager 8931, infra 8933 at 3d328a8e); my interim hold 16170 was on that same stacked scope. - forgejo_commit_status @ dc5239df (complete:true): 33 success / 3 skipped / 1 pending. Both push jobs flagged running in 16229 have since gone green — Deploy Web (push) SUCCESS 13m47s 11:48:28Z, Refresh macOS Nix snapshot (push) SUCCESS 4m29s 12:21:56Z. Sole pending is the frozen `key.store/review-policy` ("Tier 2: awaiting security-agent", unchanged since 11:33:54Z) — expected on a merged PR, no action possible or needed. - Security surface: runner TTL/drain-window tuning only. No secret, auth, crypto, signing, or permission surface; no privilege expansion (same lanes, same machine types); idle-billing addressed by the stop-monitor destroy path in the comments. No blocking findings. Record notes: (a) the sync-merge linearity violation stands as recorded in 16229 — future replays must be linear rebases, never sync-merges; (b) provenance of dc5239df itself remains unknown per 16229 (backend_verified:false), but the landed tree content is as approved and CI is effectively green. Merge stands confirmed from the security seat.
Sign in to join this conversation.
No labels
No milestone
No assignees
5 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!519
No description provided.