Repository navigation
Finish cleanup safety checks and reclaim retained caches automatically - #423
Merged
Merged
Conversation
kim-em
enabled auto-merge
October 30, 2026 21:15
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.
Retained-workspace cleanup repeatedly exhausted its 0.25-second allowance while scanning live process references, before it could remove any disposable caches. Let each indivisible safety check finish, yield between candidates/deletion batches, and give retained work to the existing background collector. Installed activity reporting only inventories and requests cleanup; no new daemon, worker wait, or admission condition is introduced.
Reuse a pass-local process/mount observation for recovery caches protected by the existing record lock and unchanged cache generation/tree identity. Keep fresh checks for legacy retained trees without that exclusion. Recheck generation and identity before eviction. Preserve source archival and filesystem protections.
Validation: focused recovery maintenance (70), retention (61), and activity (23) tests passed, along with work-recovery integration and Ruff. The local full suite passed all 128 scripts before the final review corrections; final PR CI verifies the merged changes. Regressions cover slow-check progress, shared discovery and concurrent reuse, unavailable observations, fair scheduling across collector restarts, inventory completion, and yielding a recovery lock between resumable eviction batches. Independent findings were verified and corrected; deployment verifies native cleanup progress without manual eviction.
Roadmap: none