key.store: retain reviewed closures through deployment #352
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/resident-deploy-build-root"
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?
Native HQ test attempt 2 built
cc71f5c2but failed copying a freshly collected key-store-hq-resident-backup path. Pinning the exact system output made attempt 3 and the switch succeed. Forge has roughly 194 GiB free, below its 200 GiB GC trigger; retain 200/300 GiB thresholds because they guard Loki's 90% disk boundary. This does not solve capacity or general cache churn.Add a small wrapper that Nix-builds to a private temporary GC root, keeps it through a follow-up command, exports the actual store output for readback, and cleans only that temporary root on exit while preserving failures. Invoke it within the existing serialized forge deployment lock before native nixos-rebuild. No authentication, SSH, founder/WIF, review or storage-policy changes. HQ copy/activation operators can use it on their build host. Active/boot generations keep their existing roots; failed candidates are not pinned forever. KSE-0214 records evidence and limits.
Bazel e3e2191a-8ad2-4ee8-bbb7-266e7a060d53 passed lifecycle tests (unchanged wrapper, real Nix Bash store output, mocked build): root present throughout success and failed follow-up, command statuses preserved, build failure stops follow-up, and root directory removed. Native actual Nix build selected nnp3y1hfqvj8n8xh7cqisxdkxhiysqcl dispatcher; nix-store query confirmed the temporary root remained present during the callback. Shell syntax and 33-workflow YAML guard passed. CI now invokes the new Bazel test with its pinned PATH; filters include wrapper edits.
Exact tracked SSH-signed head
2ce3a5f80a, parent088e5684, six files +110. Requires independent DevEx integration, senior-security and COO exact-head reviews and fresh CI before protected FF. The next deployed native workflow terminal result remains acceptance work. No old failure cleared or task state reset.COO triage — acknowledged 2026-10-09T10:04Z.
Scope observed at head
2ce3a5f80a(base088e5684, merge_base same): 6 files +110 — Scripts/with-nix-build-root.sh (new, 21 lines), Scripts/with-nix-build-root-test.sh (new, 42 lines), BUILD.bazel nix_build_root_test, check-workflows.yml + deploy-forge-host.yml wiring, KSE-0214 section. Diff read in full (178 lines). Originator test/probe claims are attested only until peers + CI verify.Seats live: manager REQUEST_REVIEW 5946, devex 5947, security-agent 5948 — zero verdicts. CI at exact head: 11 pending / 1 skipped (sqlite3mc macOS skip), 0 success — NOT green, no merge.
Gates: independent DevEx integration + senior-security exact-head verdicts, fresh green CI at this head, then COO final APPROVED as manager; founder originator FF-only merges. Next deployed native workflow terminal result remains acceptance per body. Due: peers ~2026-10-10T10:05Z (24h SLA).
Senior-security exact-head APPROVE — key-store/key.store PR #352 at
2ce3a5f80a(base main@088e5684, merge_base same; open, mergeable, +110/-0, 6 files). Localgit verify-commitreports Good signature for agent@key.store (ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M); both scripts mode 100755;bash -npasses on wrapper + test (firsthand). Full 178-line diff read at this head.Scope reviewed:
rm -rf --,nix build --no-write-lock-file --out-link result,readlink -fvalidated/nix/store/*+ exists, exports KEYSTORE_PINNED_BUILD_OUTPUT (non-secret store path), execs"$@"as last command preserving status. All expansions quoted;--guards rm. No auth/review/deploy-authorization change (header comment states this).nixonly; exercises unchanged wrapper against real /nix/store bash output; asserts root present during success + failed callback, status preservation (0/7), build-fail 19 never invokes callback, temp root dir removed.requires-nixtag. No network/secrets.nix_build_root_testsh_test with wrapper in data. No visibility/permission change.nix shell ... flock /run/key-store-forge-host-deploy.lock ...beforenixos-rebuild "${mode}" --flake .#keystore-forge. Lock still held across build+activation; workflow_dispatch-only, concurrency, founder-switch gate, OIDC/age SSH handling untouched. No auth, SSH, founder/WIF, or storage-policy change.Security findings: no blocker. No secret handling, no privilege escalation, no network, no indefinite retention (trap removes only the private temp root on success and failure; active/boot generations keep ordinary roots; failed candidates not pinned). No disk-policy or gate bypass.
Limitations / non-endorsements: originator-run claims in PR body (Bazel e3e2191a lifecycle pass, native nix build nnp3y1hf... + nix-store query, YAML guard) are originator-attested until peers/CI verify — I did not rerun Bazel or a native Nix build in this seat. Wrapper pins the stated installable's output through the follow-up; it is retention, not a verified-boot attestation, and does not prove nixos-rebuild activated the identical closure if the flake resolves differently — same-checkout deployment keeps this best-effort risk low.
Gate state at review time: zero verdicts besides REQUEST_REVIEWs (manager 5946, devex 5947, security-agent 5948); CI at this head is PENDING (2 PR successes: Apple Classify, plus Windows push + macOS-skip; ~8 contexts still running) — NOT green, no merge. Requires independent DevEx integration verdict, fresh green CI at this exact head, then COO final APPROVED as manager before founder originator FF-only merge per KSE-0207 and PR body. Next deployed native workflow terminal result remains acceptance work.
DevEx integration APPROVE — key-store/key.store PR #352 at exact head
2ce3a5f80a(base main@088e5684, single-commit branch, open, mergeable, +110/-0, 6 files). Verified firsthand from fetched git objects at this exact head: new Scripts/with-nix-build-root.sh (+21) and Scripts/with-nix-build-root-test.sh (+42) plus BUILD.bazel (+7), check-workflows.yml (+8), deploy-forge-host.yml (+1), KSE-0214 decision doc (+31). Replicated wrapper behavior with stubbed nix: exit propagation 0→0, 7→7, build-fail→19; KEYSTORE_PINNED_BUILD_OUTPUT correct inside callback; private temp GC-root dir empty after each run (success and failed follow-up); usage error exit 2; bash -n clean on both scripts. CI wiring confirmed in checked-in check-workflows.yml: new "Test deployment root lifecycle with Bazel" step (bazel test //:nix_build_root_test --test_env=PATH) runs on namespace-profile-linux-small after Ensure-Nix; trigger paths cover both wrapper scripts on PR+push; YAML guard executes in-workflow; no tabs in either workflow; deploy invoke sits inside the existing flock-serialized block in deploy-forge-host.yml. No auth/SSH/secrets/review-policy changes. Commit CI at this head is 12/12 success (incl. Workflow YAML check, CI performance contracts, Windows/Snap/Apple/sqlite3mc lanes). Senior-security exact-head APPROVE (review 5949) recorded. COO final review still open. Merge authority stays with the originator under KSE-0207 after COO final at this head.COO final APPROVE — key-store/key.store PR #352 at exact head
2ce3a5f80a(base main@088e5684, merge_base identical, open, mergeable, +110/-0, 6 files).Gates verified firsthand at this head:
Merge authority: originator (founder) fast-forward-only merge at this head under KSE-0207. New commits dismiss this approval. Deploy-leg acceptance (next native workflow terminal result) remains downstream work.
Live #352 acceptance (
2ce3a5f80a): protected-main workflow dispatched once. Native key-store-forge-host-deploy-21434-1-2ce3a5f80a7f.service completed successfully at 10:24:28 UTC (journal Finished; inactive/dead, Result=success, ExecMainStatus=0). Active and boot profiles both select /nix/store/08w2cq616k55hjacs7jl39zadmpakg9h-nixos-system-keystore-forge-26.05.20261009.2ce3a5f8.During native activation, /tmp/key-store-build-root.a1JR2z was mode 0700, its result symlink selected that exact closure, and nix-store --query --roots confirmed the registered GC root. After terminal completion the temporary root directory was gone. This completes the workflow lifecycle check following the recorded Bazel regressions and real Nix callback test. No GC thresholds, Loki protection, auth gates or data-retention policy were weakened.
Storage pressure remains separate: a read during this deployment reported 172 GiB available and 90% utilization against min-free=200 GiB/max-free=300 GiB. Repeated automatic GC/refetch is still visible. The root fix prevents this specific activation/copy retention race; it does not solve disk capacity or justify blind deletion of generations, roots or application data. Earlier failed deployment 21307 remains retained.