Repository navigation
fix(native): the archive, tombstone and export bounds make room instead of refusing (HACK-2576) - #1137
fix(native): the archive, tombstone and export bounds make room instead of refusing (HACK-2576)#1137roodboi wants to merge 5 commits into
Conversation
…ad of refusing (HACK-2576) With #1136 a new run archives removed runs, which moves the dead end to the archive's 256 bound (`graph_archive_budget`), then the 4096 consumed-ID tombstones (`graph_consumed_budget`). - At 256 archived runs, the oldest archived removed runs are exported (as `graph export`) and pruned (as `graph prune`), under the lease the archiving caller holds; each keeps its consumed-ID tombstone. - At 4096 tombstones, the oldest tombstones of fully pruned runs go. A tombstone only makes a fresh start with that run id refuse; the CLI makes every fresh id from 128 random bits at the start and a restore needs the receipt pruning removed, so nothing can name such an id. - Exports of fully pruned runs are diagnostics: kept seven days, at most 256, oldest first; an export a prune still needs is never removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing never blocks a start (HACK-2576) Independent review: an archived run whose prune stopped after its tombstone, or whose export stopped before its rename, kept its slot for good. Both are now resumed. Tombstone and export housekeeping are best-effort and run only at the archive bound. The tombstone note says what removing one does change (inspect reports graph_unreserved), and the docs and the remaining refusal name the one case that can still fill the archive: runs archived under an earlier guest incarnation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oldest first (HACK-2576) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ready for lead: #1137 (draft) at Your decision, as built:
What can still refuse: only archived runs that can't be proven, such as ones archived under an earlier guest incarnation whose owner no longer matches. If 256 of those fill the archive, Testing at these bounds: reaching 256 archives on the VM needs over 300 removed runs, so the Linux tests carry this one: archive selection, tombstone room, and export expiry. A VM run can still cover the 66-run case of #1136 on this head. Next for me:
|
HACK-2576: the chain behind #1136, stacked on #1136's branch. Each step used to refuse at its bound with no
hackway out.What it does at each bound:
run/graph-archive):retention::make_archive_room, called byarchive_withunder the caller's lease, exports the oldest archived removed runs and then prunes them, with the same proofsgraph exportandgraph prunemake. Each run keeps its consumed-ID tombstone..pendingfile is kept as-recovery, asgraph reconcile-exportdoes.run/graph-consumed): the oldest tombstones of fully pruned runs (no archive left) are removed.graph_unreserved, and a stale startup record of the CLI for it is retired as never reserved. Nothing of the run is left either way.exports/graphs): an export of a fully pruned run is diagnostics, like the 7-day host-command records. It is kept 7 days, at most 256 of them, oldest first. An export a prune still needs, a.pendingfile and recovery files are never removed.Housekeeping never blocks a start: tombstone room and export trimming are best-effort and run only at the archive bound.
What can still refuse: only archived runs that can't be proven, for example ones archived under an earlier guest incarnation whose owner no longer matches, keep their place. If 256 of those fill the archive,
graph_archive_budgetstill refuses, and it now namesgraph exportandgraph prune.Review: one reviewer (a Claude subagent, read-only) over two rounds; the last is clean.
-recoverydirectories (only after crashes) are not trimmed;make_archive_roomitself.Tests (Linux,
retention::chain_tests):Clippy is clean on Linux and
aarch64-apple-darwin --all-targets.Docs: the guide explains the chain and what it does at each bound.
Not covered: a real engine, and the VM.
SVG · source
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.