Repository navigation
fix: remove capture plans no caller will seal - #20
Merged
Merged
Conversation
Plans a caller never seals stay in capture-plans/ forever today. A new plan, and a quiet daemon writer for a timeline that never plans again, must remove plans older than any caller takes to seal, keep a fresh plan sealable, and leave a stalled caller a clean re-plan error.
A plan is deleted only by its own seal, so every re-plan, crash, timeout or engine exit left its file behind; one machine held 98 GB of them. A plan older than ten minutes, twenty times the time a caller takes to seal, is now abandoned: each new plan removes its timeline's abandoned plans and partial writes, and an idle daemon writer does the same for timelines that never plan again. Both read one directory of plans, never the store. Sealing a removed plan still asks for a re-plan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Capture plans a caller never sealed stayed in
capture-plans/forever. One machine held 43 of them, 98 GB in total. A plan more than ten minutes old is now treated as abandoned and removed.Rule: age only, 10 minutes. codeaf seals within
SealWithin(30 s), and a person runningcapture-planthenhook turn-endby hand still has plenty of time. A count cap would remove young plans whenever several callers plan on one timeline at once, which breaks the promise that a plan in use is never deleted. With age alone, a directory holds at most the plans made in the last ten minutes, and a plan that is sealed removes itself, as before.A seal that lost its plan to pruning gets the existing
capture plan is absent; re-planerror. If a seal has already read its plan, deleting the file does not affect it.Evidence
Spark fleet job
20261026-184751-002483ran on e8e0f30.cargo fmt --check,cargo clippy --workspace --all-targets --locked -D warningsandcargo test --workspace --lockedall passed, exit 0. The prune tests also passed 25 out of 25 repeated runs.Merge Danger
Door: two-way
Plans are disposable. The worst case is that a caller stalled for more than ten minutes has to re-plan.
Blast Radius: small
Only
capture-plans/changes. Release step: a separaterelease: 0.3.4PR that bumps the workspace version, as was done for 0.3.3, then tagv0.3.4. After that, codeaf's engine pin can move.🤖 Generated with Claude Code