Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

I3 · Garbage collection never removes known-good, the previous generation, the current genera…

planarian @ a924e09 · Spec v4.6 · snapshot main · all versions

Garbage collection never removes known-good, the previous generation, the current generation, an in-flight candidate, or the boot model.

— SPEC §7

StatusProof phased:aGym
Tested, not provedA (test), D (proof)0 : 2 (baseline 0 : 2, not degraded)3 entries, 2 must-pass

How it is proved

No obligation discharges it: nothing about it is proved.

What it rests on

If any of these is false, the proof no longer describes the real machine.

IdAssumptionKindAlso relied on by
P1Backend Outcome is honest: Succeeded means applied; Unknown means the backend cannot sayPlatformI12, I25
P8The kernel and systemd are correctPlatformI1, I2, I9, I17, I20, I22

How it is tested

EntryHarnessWhat it doesExpectsLatest verdict
gc-during-approvalfake, vmGarbage collection runs while an AskFirst change waits for approval. The candidate survives (its build root is protected), and after approval verify_candidate passes.gc_protected: candidate, known_good, base; generation: candidate; txn: Committed ApplyChangefake: PASS; VM: not run in this build
storage-budget-unsatisfiablefake, vmThe generation budget is set below the size of the protected set. GC collects everything unprotected, reports BudgetUnsatisfiable with the shortfall, and never touches the protected set.gc_protected: known_good, base, previous; reports: BudgetUnsatisfiablefake: PASS; VM: not run in this build
storage-nix-full-gcfake, vmThe Nix store filesystem drops below max(2 GB, 5%) while old generations exist. CollectGarbage runs first, and the protected set is untouched.gc_protected: known_good, base, previous; txn: Committed CollectGarbage; units: device:fs-nix Runningfake: PASS; VM: not run in this build

Also tested by schema::gc tests.

Known limits

BypassRouteSeverityStatusCloses in
X-1Root edits the store, /boot, the binaries, the journal or the posture stateAcceptedAcceptedE
X-2A nixos-rebuild outside PlanarianAcceptedAcceptedC
X-4Physical accessAcceptedAcceptedE
X-6The supply chain: nixpkgs content, cache signatures, input-addressed store pathsAcceptedAccepted—
X-7Backends report success falsely; systemd or the kernel misbehave (P1, P6, P8)AcceptedAcceptedD, E

History

SpecChange
v4Restored principles (now 12) and invariants (I1–I14) that v3 referenced but omitted

See also

—