Repository navigation
fix(retention): unblock sealed generation retirement on busy stores - #4955
Merged
Merged
Conversation
Superseded retirement returned early when a projection had no verified head, before it paged the projection's retired cleanup. A replay tombstoned just before its head went away therefore never had its native rows or sealed artifact removed: the maintenance sweep visits the projection (tombstones keep it in the projection page) but skipped the only finalizer. The headless path now finishes only the tombstones that already exist; it never retires an untombstoned replay record. Refs #4616 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`invalid_worktree_metadata_refuses_the_entire_inventory` compared the linked worktree path built under the raw temp dir with the resolved roots the inventory reports. On macOS the temp dir sits behind the `/var` -> `/private/var` symlink, so the recovered inventory never "contained" the linked worktree and the test failed deterministically. Canonicalize the base like the sibling liveness test does. Refs #4616 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ScriptedAlchemy
enabled auto-merge (squash)
November 24, 2026 21:49
Busy-store deferrals are keyed by the code-index store root under a project data root, but they were pruned with the per-tick mounted checkout set. The keys never matched, so every tick reset the count and the bounded wait after three `GenerationStoreBusy` outcomes was never reached in the daemon. Prune them with the registered data roots, like the text-artifact scan cursors, instead. Refs #4616 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Committed text-artifact cleanup restores a relivened artifact with its own durable rename but clears the journal only after every candidate. If it was interrupted in between and the descriptor was later dropped, the rerun called `remove_committed`, which refuses any file back in its source, so the journal stayed and blocked every later retention pass. Text cleanup now leaves an entry that is in its source and absent from the stage in place (it is the earlier restore) and lets an ordinary pass re-plan it. Entries in both places are still refused. Refs #4616 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Refs #4616. Superseded sealed graphs could accumulate because one relivened text artifact aborted the whole retention transaction, repeated generation-store contention never progressed beyond short probes, and a headless projection skipped durable retirement tombstones. These paths left reclaimable generations behind during ordinary publication and recovery.
Changes
fc80c47so existing writer-admission, Doctor, and bounded-report fixes are included.Issue acceptance coverage
sealed_generation_retention_test::superseded_sealed_generations_collect_to_live_plus_onepublishes five generations and checks physical reclamation and the 1–2 bound.mounted_retention_preserves_a_reader_then_reclaims_its_sealed_generationprotects a real previous reader through successful maintenance, then checks reclamation after release.registered_project_reclaim_hintemitstracedecay --dry-run projects forget <id>and explicitly confirmedtracedecay --yes projects forget <id>for over-bound registered stores, with destructive-operation wording. This requirement is already met.The discussion's headless tombstone blocker (comment 69) is fixed here. Current master also includes projection-qualified sealed liveness and exact replay-dependency accounting, with
sealed_journal_liveness_and_retirement_preserve_projection_identitycovering the distinct later discussion findings.Validation
Current head:
03d2331211ef2f79441718ec538c8d30eea7e0af.git diff --checkpassed locally. The test-only projector-revision constructor caught by an earlier Clippy run was corrected to the canonical production constructor before this successful native run.Remaining evidence and separate filesystem scope
Multi-day observation on the reported busy monorepo and a production peak-RSS measurement remain unperformed. Controlled contention and sparse logical-size fixtures establish narrower behavior and must not be presented as those observations.
Historical discussion also raised namespace substitution before the first directory capability is acquired and platform path-consumer races. Current cleanup binds receipt verification and removal to the same opened child, but this PR does not eliminate the documented directory-creation/open window, ambient ancestor acquisition, or macOS/Windows handle-to-path substitution window. Those require a separate store-owner/capability change and native filesystem regressions; they are not counted as resolved by the collection tests. This PR therefore retains
Refs #4616.