Skip to content

Finish cleanup safety checks and reclaim retained caches automatically - #423

Merged
kim-em merged 6 commits into
mainfrom
fix/cleanup-safety-and-progress
Oct 30, 2026
Merged

kim-em merged 6 commits into
mainfrom
fix/cleanup-safety-and-progress

Conversation

@kim-em

@kim-em kim-em commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

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

@kim-em
kim-em enabled auto-merge October 30, 2026 21:15
@kim-em
kim-em merged commit 13c66f4 into main Oct 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant