idx-cli/crates/idx-core/src/ownership
hermes c65982f407 fix: lock sync's first inspection, resolve symlinks without their target
Fourth Codex (gpt-6.1-sol, xhigh) pass over 5e0831d, each item verified
before fixing:

- sync inspects the local database under the shared lock, so another
  sync cannot swap it under that connection.
- symlinks are resolved by reading the link (db::resolve_db_path), not
  canonicalize, so a symlinked path finds the same lock and install
  target even while the real file is missing (fresh install, mid-swap)
  or the link dangles.
- readers go ahead unlocked when no lock file can be created; nothing
  can replace the database there. (A read-only data directory still
  fails in SQLite's WAL setup, as in 0.2.4.)
- XLSX shared strings are capped at 2,000,000 entries.

Verified live: an install waits for a reader's shared lock; a symlinked
db_path waits on the real path's lock and stays a symlink. CLI goldens
unchanged; live A/B vs 0.2.4: 16 passed, discover hits the IDX 403 on
both builds (exit 4 vs 1, intended).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:49:52 +00:00
..
archive.rs fix: address final review (path traversal, sync races, MCP limits) 2026-10-14 21:58:37 +00:00
db.rs fix: lock sync's first inspection, resolve symlinks without their target 2026-10-14 22:49:52 +00:00
entities.rs fix: close the remaining review findings (cross-process lock, partials) 2026-10-14 22:20:57 +00:00
graph.rs refactor: split into idx-core library and idx-cli binary workspace 2026-10-14 09:13:46 +00:00
mod.rs fix: address final review (path traversal, sync races, MCP limits) 2026-10-14 21:58:37 +00:00
parser.rs refactor: split into idx-core library and idx-cli binary workspace 2026-10-14 09:13:46 +00:00
remote.rs refactor: split into idx-core library and idx-cli binary workspace 2026-10-14 09:13:46 +00:00
search.rs refactor: split into idx-core library and idx-cli binary workspace 2026-10-14 09:13:46 +00:00
snapshot.rs fix: lock sync's first inspection, resolve symlinks without their target 2026-10-14 22:49:52 +00:00
types.rs refactor: split into idx-core library and idx-cli binary workspace 2026-10-14 09:13:46 +00:00
xlsx.rs fix: lock sync's first inspection, resolve symlinks without their target 2026-10-14 22:49:52 +00:00