fix(cli): speed up recall and separate hook deadlines - #79
Merged
Merged
Conversation
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.
Recall could exceed its one-second deadline and misleadingly report that a healthy daemon was unavailable. Use an extraction-first SQLite join to avoid reading large note rows for nonmatches, give human recall five seconds and hook/MCP recall three seconds, and report response timeouts with a distinct
timeoutcode. Remove the competing one-second recall IPC response limit.Existing matching, scope, ordering, deduplication, output bounds and old-hook preservation remain intact. Installer output and documentation use the new deadline; updated daemon execution and explicit hook reinstall are needed to activate changes on an existing machine.
Validation: workspace tests/build/check, all-target/all-feature Clippy, format and cargo deny passed. Eighteen focused recall tests include deterministic delayed MCP success and 3/5-second deadline cases. An isolated real-executable/fake-daemon smoke confirmed hook success at 2s, human success at 4s, and timeout at 3s/5s. Standards and spec reviews passed.
Synthetic actual PowerSync fixture (2,200 notes, 22,000 extractions, 100KB bodies): sparse/no-hit optimized backend ~67–70ms; dense ~306ms. These are comparative measurements, not a production latency SLA. No live installation, daemon restart or hook changes were performed.