Repository navigation
feat(cache): compact selected inactive indexes - #642
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcdc63c761
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 679302efee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f868886d99
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0774250d7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 072650fbeb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00aefe0c51
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review latest policy-only head c013500. Product/test/Cargo sources are unchanged from reviewed and measured f23f8f2; the only diff raises compact_sqlite coverage floors to 82/85/78 and records final source measurements. The stricter policy assessor and current-head PR CI passed. Full source CI 37590032325 has passed all three product platforms and both 25-repetition macOS/Windows stress lanes; Linux 100-repetition stress is still running. The same-owner filesystem boundary remains documented and tracked in #644. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Retained SQLite indexes can contain reusable pages, while dense or active caches make blanket VACUUM waste CPU and temporary space. Add
cache compactfor 1–8 explicit managed cache IDs: preview by default, apply with--yes, and require both reusable-byte and percentage thresholds. Process serially with default 1-GiB work bounds, an 8-MiB page-cache target, disabled mmap, and a cooperative 120-second budget. Combine database/temp-volume headroom when they share a volume.Maintenance holds the exclusive lifetime lease, requires existing WAL storage, and preserves generations, schema, FTS results, metadata, and lease identity without initializing Services or migrating indexes. Unix rejects a selected database already open in the calling process before pinning, preserving existing POSIX locks; apply verifies actual opened descriptor identities with bounded fstat observations. Windows pins without delete sharing and respects SQLite temp-directory precedence. Native CLI preview remains available with outside-process readers; blocked apply reports failure without forcing their snapshots to release. Reports distinguish estimated benefit, actual reduction, and VACUUM committed before a later failure.
Keep legacy retention stable by ignoring empty inspection-created WAL timestamps and skipping mtime-based compaction. In-place maintenance requires an owner-controlled root, lease-cooperating clients, and quiescent filesystem tools; observed link checks cannot isolate arbitrary same-owner file mutations. Stronger detached publication is tracked in #644. Retrieval never runs automatic VACUUM, and no MCP schema or host runtime configuration changes.
Align concurrent MCP startup and terminal-failover leader fixture setup with the existing 30-second indexing-liveness budget. Initialize/cold-context/terminal-failover deadlines, exact generation assertions, retry policy, and stress repetition counts stay unchanged; this is a fixture readiness correction, with no product latency claim.
Closes #641. Closes #643.
Validation
Local work used disposable fixtures in a network-disabled container capped at one CPU, 3 GiB memory, and one build job. The container is stopped after validation. No retained production cache was compacted and no host CLI/MCP installation or configuration was upgraded. Copy-only feasibility measurements and separately authorized old-cache cleanup remain in the private feedback log.