fix(storage): enforce sole-daemon database ownership#473
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a10719569
ℹ️ 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".
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Root cause
TraceDecay clients could independently open the same SQLite files through MCP, CLI, hooks, worktrees, maintenance, and fallback paths. Process-local caches, advisory locks, and path-string identity did not establish one cross-process owner, so aliases, restarts, stale locks, and recovery paths could create competing writers or mutate storage while another owner was active.
Design
Verification observed
Passed during development:
cargo check --all-targetsThe first full
cargo test --test storage_suite multi_connection -- --nocapturerun completed with 1 passed, 2 failed, and 1 ignored. Both failures were harness timeouts: hook subprocess stdin remained open, so EOF-driven hooks waited for the 20-second watchdog. Commit6a107195closes stdin after writing.Post-EOF focused reruns were started but not completed, so there is no claimed passing rerun for that fix. CI is the source of truth for the corrected suite and full matrix.