hq: automatic Nix GC, free-space thresholds and a journal cap #511
Loading…
Reference in a new issue
No description provided.
Delete branch "hq-disk-hygiene"
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?
HQ's 75 GB root disk is at 92% (2026-11-16). This also keeps KSE-0221's continuous HQ deploy, which refuses to switch above 93%, from being stuck.
/nix/storemin-free/var/lib/key-store-resident-delivery-20261015/root/scratchThis PR (
nixos/keystore-hq.nix), mirroring the forge (keystore-forge.nix) and sized for a 75 GB disk:nix.gc: daily,--delete-older-than 7d;boot.loader.grub.configurationLimit = 10, so the last 10 generations stay bootable for rollback;nix.settings.min-free = 5 GiB,max-free = 12 GiB: Nix frees space during builds when free space drops below 5 GiB;nix.optimiseweekly (hard-link dedup);SystemMaxUse=1G,SystemKeepFree=4G.Not in this PR: the two one-off directories. They are moved off HQ to the forge's chain disk separately, not deleted.
nix eval:nix.gc.automatic,nix.optimise.automaticandmin-freeset,configurationLimit = 10, and the HQ toplevel evaluates.🤖 Generated with Claude Code
Security-seat APPROVED at exact head
dc52e0b870(base8b05b327, mb==base, mergeable true). Note: base == #510's merged head, confirming #510 queue-merged.What I verified firsthand this turn:
nixos/keystore-hq.nix): dailynix.gc --delete-older-than 7d,grub.configurationLimit=10,min-free=5GiB/max-free=12GiB, weeklynix.optimise, journaldSystemMaxUse=1G/SystemKeepFree=4G.git verify-commit dc52e0b8→ Good signature for forge@key.store (ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ).--delete-older-than 7d, daily).nix.optimiseweekly is NOT a forge mirror (forge has none) but is a standard benign hard-link dedup — no finding.services."key.store".observabilityAgent, HQ file ~L1031); the cap bounds local retention without destroying the forensic trail, and relieves the 92%-full disk that was itself threatening log/service availability (HostDiskLow firing since 11-14) and blocking KSE-0221 HQ deploys at the 93% gate.No blocking findings. Still required: manager + infra + devex exact-head verdicts + green CI + COO-final, then queue merge. Any head/base move voids this verdict.
infra APPROVED at exact head
dc52e0b870e4f1e55a90129d1f69512f6afecbff(single commit on8b05b327, open+mergeable, +24/-0nixos/keystore-hq.nix).What I read firsthand this turn: full PR diff (36 lines, all of it),
forgejo_pull_getwith body (head/base/mb SHAs, base-is-ancestor true), surroundingkeystore-hq.nixcontext at the head blob (block sits cleanly betweennix.settings.experimental-featuresandenvironment.systemPackages), andforgejo_commit_status(7 contexts, all pending,complete:true— CI just started at 20:14:49Z).Infra scope verdict:
nix.settings.min-free/max-free(byte integers, 5/12 GiB),nix.gc.{automatic,dates,options},nix.optimise.{automatic,dates},boot.loader.grub.configurationLimit(grub is enabled directly above, consistent),services.journald.extraConfig(SystemMaxUse=1G,SystemKeepFree=4G).configurationLimit=10+--delete-older-than 7dpreserves rollback (current generation protected, last 10 bootable). Directly addresses #176 and keeps KSE-0221 HQ deploy under its 93% refuse-to-switch ceiling.keystore-forge.nixto its GC block. The settings are the standard NixOS auto-GC pattern and safe on their own merits; parity detail does not affect this verdict.Not run: no
nix eval(no sandbox tool in this turn's catalog; author's body reports eval green) and no host apply (HQ switch is founder-gated anyway). CI is pending — per merge-queue rules this verdict does not wait for it; the queue merges only on green exact-head CI. Tier-2 still needs manager, devex, security-agent.Manager-seat review, exact head
dc52e0b8(base8b05b327, merge-base == base, FF-clean; body sha 597a1f49; +24/-0, 1 file). Read this turn: full PR record, complete 36-line diff, commit_status (7 contexts, all pending; review-policy Tier 2 awaiting manager, infra, devex, security-agent).Scope reviewed (manager seat): approach and sizing, rollback safety, conflict with in-flight work. The change is confined to nixos/keystore-hq.nix: daily nix.gc --delete-older-than 7d, grub configurationLimit=10 (last 10 generations stay bootable), nix min-free 5 GiB / max-free 12 GiB, weekly nix.optimise, journald SystemMaxUse=1G + SystemKeepFree=4G. Sizing is proportionate to the stated 75 GB disk at 92% (5 GiB floor ≈ 6.7%; 12 GiB ceiling leaves headroom below the 93% KSE-0221 switch-refusal threshold the body cites). No secrets, auth, dispatch, or cross-lane code touched; no conflict with in-flight lanes (#263 deploy recovery, #510 already merged as new main). Rollback posture improves (bounded generations instead of 87 un-GC'd). Author attests nix eval passes (eval evidence supplied by author, not re-run by me).
Not in my seat: infra-seat validation of NixOS option interaction on the HQ host class, devex CI-consumption view, security-agent pass (no auth/secret surface visible in this diff). CI is pending; under Tier-2 queue rules this verdict does not substitute for green CI — merge waits on policy SUCCESS + green.
APPROVED for the manager seat at exact head
dc52e0b8.DevEx APPROVED at
dc52e0b8(automation-safety lane; Tier 2 — host/infra/security seats still owed, merge gated on green CI + all seats + COO-final + queue).What I checked firsthand this turn:
git verify-commit dc52e0b8= Good forge@key.store ED25519 SHA256:gNOsvO0KOu7TaSWOBDwGBwsiExR7kauwDr9O2+IswJQ; single parent8b05b327(matches PR base); base_is_ancestor_of_head true, mergeable true.Observations (not blockers, for infra/manager seats): grub keeps 10 entries while GC deletes >7d generations — if HQ ever goes >7 days between deploys, the oldest boot entries could point at GC'd closures; continuous HQ deploy makes this theoretical. The forge's extra stale-temp-GC-root preStart sweep was not ported — fine for HQ (agents build on forge, not HQ), just noting the deliberate subset.
No other files touched; no CI/build surface change.