mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 01:35:36 +00:00
fix: address release review (WAL-aware sync hash, empty MCP inputs)
- Sync hashed only the main database file, but local edits can sit in the -wal sidecar, so an edited database could match an earlier build and be replaced. Checkpoint the WAL before hashing; if changes remain, never take the rebuilt-snapshot path. - MCP tools rejected nothing for empty symbols/sections/kinds and returned an empty success; they now fail with INVALIDINPUT, as the CLI requires input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
eef118961d
commit
58d421028f
4 changed files with 126 additions and 23 deletions
|
|
@ -76,7 +76,8 @@ Without `--force`, sync behaves conservatively:
|
|||
- local latest release older than snapshot: replace with snapshot
|
||||
- local DB file is byte-identical to `sqlite_sha256`: no-op
|
||||
- local DB file is byte-identical to a build in `replaces_sqlite_sha256`: replace
|
||||
(queries never write to a synced file, so this means it was not modified)
|
||||
(queries never write to a synced file, so this means it was not modified;
|
||||
committed changes still in the `-wal` file are checkpointed before hashing)
|
||||
- local latest release/date/count matches snapshot: no-op
|
||||
- local latest release matches but has fewer releases than snapshot: replace to fill missing history
|
||||
- local DB newer than snapshot: no-op and keep local data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue