fix: address open issues (308, 311, 400, 403, 404, 423, 425, 432)#443
Merged
dmtrKovalenko merged 8 commits intomainfrom May 3, 2026
Merged
fix: address open issues (308, 311, 400, 403, 404, 423, 425, 432)#443dmtrKovalenko merged 8 commits intomainfrom
dmtrKovalenko merged 8 commits intomainfrom
Conversation
Add tests covering 'git:modified' and 'status:modified' alias to prevent regression of #308 where constraint-only queries reused raw_query as fuzzy text and returned zero matches.
Guard against regression of #432 where path='.' or path='app' (without trailing slash) returned zero results. Current code normalizes both correctly but tests lock in the contract.
Lock in the contract from #423: absolute in-workspace paths (file, directory, glob) must be rewritten to their repo-relative form before being emitted as constraints.
When a grep pattern like 'foo(' triggers regex compilation and fails,
the core engine already falls back to literal matching and returns the
correct results. Prepending '! regex failed: ...' on top of those
results only confuses LLM callers (issue #425) — they see the error
before the matches and conclude the call failed.
Drop the warning from the formatter output entirely; the core still
populates the field for debugging and other bindings.
Previously 'maxResults: 0' was asymmetric: grep/multi_grep truncated the output list to zero items while find_files interpreted 0 as 'unlimited' and returned the full (potentially huge) result set. Centralize the parsing through normalize_max_results() and treat 0 (plus negatives and non-finite values) as 'use the default'. Also round fractional values instead of truncating (0.4 → 1, 10.7 → 11). Fixes #400 (issue 3).
Parallel ffgrep/fffind calls in the same turn all entered ensureFinder() simultaneously. Each attempted FileFinder.create() on the shared base path, which acquires exclusive native locks on the frecency and history DBs — a second concurrent creation could deadlock at the native layer with no timeout, hanging the whole turn. Gate ensureFinder() on an in-flight promise so only one FileFinder.create() runs per base path at a time; concurrent callers await the same promise. Fixes #403.
Sparse checkouts routinely produce paths in the git index that are not materialized on disk. Those paths aren't in the file picker's index either, so update_git_statuses() hit the 'couldn't update' branch on every scan and spammed ERROR logs, which perceivably slowed Neovim picker usage (#404). Downgrade to debug — this is expected, not exceptional.
multi_grep uses 'patterns' while grep/find_files use 'query'; LLMs routinely confuse the two and trip on 'missing field `query`' (#311). Add a serde alias so the wrong-but-intuitive name also works without changing the published JSON schema.
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.
Summary
Bundle of low-risk fixes and regression tests for eight open issues:
git:modified,status:modified).patternas a serde alias forqueryongrep/find_files; LLMs that confuse it withmulti_grep'spatternsno longer get a "missing field" error.maxResults: 0was asymmetric across tools; centralize handling vianormalize_max_resultsso 0/negative/non-finite all fall back to the default.ensureFinderrace: parallel ffgrep/fffind calls could deadlock at the native DB layer. Gate creation on an in-flight promise.ERROR fff_search::file_picker: Couldn't update the git status for pathfor every path in the git index that isn't on disk. Demoted to debug.! regex failed: ..., using literal matchalongside successful literal-match results; the error confused LLM callers.ffgrepreturns false negatives withpath="."#432 — regression tests forpath=".",path="./", absolute workspace root, and bare directory names in pi-fff.Test plan
cargo test -p fff-search constraint_only— 2 passingcargo test -p fff-mcp— 10 passingcd packages/pi-fff && bun test— 10 passingcargo clippy --workspace --features zlob -- -D warnings— clean