cyberine
UsageRun recipes

Sweep flake ledger — npm run sweep:flakes (kdpxk, 2026-09-28)

Every sweep, full or partial, appends one line to .local/selftest-stamp/<host>/ledger.jsonl: at, sha, host, scope (full / security / only, with selected for a partial run), the pass count, skippedNames, failedNames, dirty and caffeinated. The per-SHA stamp also records failedNames. The ledger exists because a re-sweep of the same SHA overwrites its stamp, so the failure that made you re-sweep was lost; the ledger is append-only and never rewritten.

npm run sweep:flakes                          # rank smokes by recorded failures, every host's ledger
npm run sweep:flakes -- --since 2026-09-28    # only sweeps at or after that date
npm run sweep:flakes -- --host niafam-m3max   # one machine
npm run sweep:flakes -- --json                # the same ranking as JSON

Columns: fails (every recorded failure), in-full (failures inside a full sweep), passed-later (the same SHA on the same host later ran that smoke and it passed, which marks a load flake rather than a regression), the last failure time and SHA. The push gate is unchanged: a flake still blocks the push, and this report exists to find and fix the smoke, never to tolerate it.

Known limitations and deferred work: history starts with the first sweep after this change; stamps from before it carry counts only and are not read. passed-later needs a re-run of the same SHA on the same host, so a flake that you fixed by committing again shows only as a plain failure. A smoke run directly (npm run selftest:<name>) rather than through npm run sweep -- --only <name> writes no ledger line. The ledger is per host and append-only; rsync between machines is safe because each host writes only its own directory.