Repository navigation
fix: keep index on lock timeout, release server slot on panic, send CLI auth token - #1320
Merged
Merged
Conversation
…LI auth token - core: lock timeout is Error::Lock; open() no longer deletes index files on lock/IO errors - core: VectorIndex::insert only mutates key maps after engine.add succeeds - core: fsync index and keys sidecar before rename - core: chunk delete_by_ids/deprecate_by_ids (SQLite param limit) - server: RAII slot guard, catch_unwind, recover poisoned mutex - cli: forward UTEKE_AUTH_TOKEN (loopback only) when routing via server Refs #1318 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| assert!(is_loopback_url("http://127.0.0.1:8767")); | ||
| assert!(is_loopback_url("http://localhost:8767")); | ||
| assert!(is_loopback_url("http://[::1]:8767")); | ||
| assert!(!is_loopback_url("http://evil.example:8767")); |
| .map(|i| format!("?{i}")) | ||
| .collect::<Vec<_>>() | ||
| .join(","); | ||
| let sql = format!("DELETE FROM memories WHERE id IN ({placeholders})"); |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
- cli: is_loopback_url uses a real URL parser (rejects userinfo tricks like 127.0.0.1:80@evil) - core: delete_by_ids/deprecate_by_ids use one json_each(?) parameter instead of dynamic IN lists Refs #1318 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 7, 2026
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.
What
uteke-core: a vector-index lock timeout is nowError::Lock;open()no longer deletes the index/.keysfiles on lock or IO errors (falls back to an in-memory index rebuilt from SQLite).VectorIndex::insertmutates its key maps only afterengine.addsucceeds. Index and.keyswrites arefsynced before rename.delete_by_ids/deprecate_by_idsare chunked (500) in one transaction.uteke-server: request slot released via RAII guard, handler wrapped incatch_unwind(500 on panic), poisonedUtekemutex is recovered instead of failing every later request.uteke-cli: routing via server forwardsUTEKE_AUTH_TOKENas a bearer token (loopback targets only).Why
High + medium findings from the review of v0.19.1 — see #1318. A CLI that waited out the 30s lock timeout could unlink the live server's index; one handler panic wedged the server permanently; enabling server auth broke CLI routing with 401s.
Testing
cargo clippy --workspace --all-targetsclean;cargo test -p uteke-core -p uteke-cli -p uteke-serverpasses.Out of scope (tracked in #1318 as follow-ups): debounced index saves, atomic document upsert, vecq compaction, load-time index consistency check.
Refs #1318 (High items + subset of Medium; the issue stays open for the follow-ups).
🤖 Generated with Claude Code