Skip to main content

Module regen

Module regen 

Source
Expand description

Eager epoch probe + sequential regeneration queue (spec §5.2): probe headers cheaply at startup, regenerate stale artifacts one at a time with a per-item timeout. Eager because lazy checks leave artifacts silently stale and never run in short-lived processes; sequential to bound resource use; per-item timeout so one stuck item can’t block the queue.

Enums§

RegenOutcome
Per-item result of a regeneration pass; the queue reports every item, never silently drops one.

Functions§

probe_stale
Scan a generated tree for files whose pushkin-epoch: header lags expected_epoch (missing header = stale). Returns paths relative to dir, unordered.
run_queue
Run worker over items strictly one at a time, capping each item at timeout. A timed-out item is reported as TimedOut and the queue moves on immediately; its worker thread is left to finish and be dropped (threads cannot be force-killed safely — the leak is bounded by the toolchain call it wraps, and the alternative is a wedged queue).