Plans

Plan 0018

Store and cache as a managed lifecycle

One managed lifecycle for the Nix store and cache plane: checkpointed GC that never forces mass rebuilds, cache-push admission that cannot livelock, and daemon failures that surface instead of wedging builds fleet-wide.

Status
Sketch
Ambition
5 turns ad hoc GC and cache-push firefighting into one managed loop
Impact
7 full disks and wedged cache pushes take machines out for hours
Effort
6 checkpointed GC, push admission control, and daemon failure handling
Risk
5 GC that deletes the wrong roots costs rebuild days; changes need staging
Maturity
3 watchdogs and manual recipes exist; the managed loop does not
Leverage
7 every machine and every CI run sits on this substrate
Taste
4 retention policy needs judgment; the machinery is well-understood
Authors
andrewgazelka
Created
Updated
Tracking issue
-
Supersedes
-
Superseded by
-

Summary

Store and cache failures arrive as emergencies: a disk fills mid-build, GC deletes roots a fleet still needs, the cache-push queue pins at its limit and starves, the daemon crashes under concurrent CA imports. Each incident produced a watchdog or a recipe; none produced a lifecycle. This plan manages the substrate as one loop per host: budgeted, checkpointed GC that respects fleet-wide roots; push admission with backpressure that sheds load instead of livelocking; and daemon health that reports to the same place CI status does.

Non-goals

Replacing the cache plane or the Nix fork; this manages what exists.

Absorbed issues

#3343, #3342, #3341, #3338, #3313, #3563, #3559, #3100, #2541, #2534, #2533, #2521, #2500, #2354, #3031, #3022, #2996, #2995, #3000, #2844, #2853, #2851, #3033, #3039, #2926, #2767, #2921

Drafted by Claude Code (Fable) from the open-issue corpus; scores are seed estimates.

© 2026 Indexable, Inc.