Conversation
Signed-off-by: kingfs <zhenzhen086@126.com>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
|
Thank you for the contribution, including the inventory/pruning tests and the explicit notes about validation still outstanding. This draft introduces new MCP tools and CLI operations across cache, daemon, and server code, including deletion behavior, so it needs a direction and safety review before we can decide whether to integrate it. We need more time to review the API boundary and the pruning safeguards, including behavior with active sessions, missing roots, and interrupted operations. Please keep this as a draft while we make that decision; this acknowledgement is neither acceptance nor rejection. Our review queue is quite full, and we appreciate the effort and your patience while we work through it. |
…udgets Signed-off-by: kingfs <zhenzhen086@126.com>
Regarding the MCP tools (cache_stats and cache_prune) introduced in the draft, I agree that these operations are inherently local and probably shouldn't be exposed via MCP for the AI to execute directly. The core issue I was trying to solve is that my local environment had accumulated around 5 GB of cache. Many of those cache files belonged to worktree paths that had already been cleaned up by the AI, yet their corresponding cache files persisted. That's why I created this PR—though my AI assistant ended up generating a bit more scope and code than was actually necessary! |
Remove the public MCP tools, preserve ADRs by default, and keep inspection free of SQLite side effects. Require explicit missing-root confirmation and protect active participants with an idle-only lease. Add interruption recovery tests and cross-platform CLI CI coverage. Signed-off-by: kingfs <zhenzhen086@126.com>
Use short macOS runtime paths and the shared protected Windows temp-root helper. Close SQLite fixture connections explicitly so Windows can delete and rename databases. Avoid cold bytecode cache writes in the package crash helper and allow bounded cold-runner startup without weakening crash-gate assertions. Signed-off-by: kingfs <zhenzhen086@126.com>
Problem and scope
Removed worktrees leave cached project indexes behind, including orphan WAL/SHM files after interrupted deletion. Add CLI-only
cache statsand explicitcache prunemodes for inventory and offline cleanup. There are no new MCP tools: the previously proposedcache_stats/cache_pruneregistrations and daemon-session pruning behavior have been removed.This remains a draft for maintainer direction and safety review. No prior tracking-issue discussion has been agreed. The current proposal uses conservative offline maintenance rather than deleting alongside active sessions.
Behavior and safeguards
--missing-rootand--older-thanare ANDed. Age is last index time, not last access. Actual missing-root deletion additionally requires--confirm-missing-root, since offline storage is not proof of abandonment. Unknown, inaccessible, non-directory and unresolved roots do not match that filter.--include-adrsexplicitly permits deleting database-held documents. Unreadable/ambiguous databases are never pruned.--orphan-sidecarsdeletes only regular project WAL/SHM files whose DB is absent, rechecked under the project lease. Configuration, logs, journals, corrupt/temporary databases, symlinks and source directories are preserved.partial_count. Cancellation stops further deletion and releases leases; process death releases native leases. Orphan cleanup is explicitly retryable after interruption.Validation
Linux ARM64:
make -f Makefile.cbm test-cache-cli.Checklist