Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: implement LanceDB compaction to reclaim storage from soft-delete#5

Merged
iohub merged 3 commits into
mainfrom
dev-0628
Jun 30, 2026
Merged

feat: implement LanceDB compaction to reclaim storage from soft-delete#5
iohub merged 3 commits into
mainfrom
dev-0628

Conversation

@iohub

@iohub iohub commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

iohub added 3 commits June 29, 2026 22:43
…ed rows

- Add lance dependency to Cargo.toml for CompactionOptions access
- Implement optimize_lancedb() with two-step: Compact + Prune
- Compact merges fragments and physically removes soft-deleted rows
- Prune cleans up old version files to free disk space
- Add pending_delete_count with threshold (50) for auto-triggered optimization
- Integrate optimization at the end of vectorize_directory() batch processing
- All errors are non-fatal: data correctness preserved even if optimize fails
… on startup

Add `maybe_inject_mcp_guidance()` and `try_inject()` functions to
`mcp/server.rs`. When `codeseek serve --mcp` starts, the server now
automatically appends CodeSeek MCP tools usage guidance to the project's
CLAUDE.md and AGENTS.md files (if they exist and don't already contain the
injection marker).

Key design decisions:
- Idempotent: checks for `<!-- CODESEEK_INJECTION -->` marker before injecting
- Non-blocking: all errors are logged via `log::warn!` and never block startup
- stdout-safe: uses `log` macros instead of `println!` to avoid corrupting MCP
  JSON-RPC protocol
- Smart append: handles files with/without trailing newline correctly
- Conservative: only modifies existing files, never creates new ones

Closes #TBD
@iohub iohub requested a review from cdwenwang June 29, 2026 16:11
@iohub iohub merged commit cca70e0 into main Jun 30, 2026
@iohub iohub deleted the dev-0628 branch July 2, 2026 03:10
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