Skip to content

fix: address open issues (308, 311, 400, 403, 404, 423, 425, 432)#443

Merged
dmtrKovalenko merged 8 commits intomainfrom
fix/issues
May 3, 2026
Merged

fix: address open issues (308, 311, 400, 403, 404, 423, 425, 432)#443
dmtrKovalenko merged 8 commits intomainfrom
fix/issues

Conversation

@dmtrKovalenko
Copy link
Copy Markdown
Owner

@dmtrKovalenko dmtrKovalenko commented May 3, 2026

Summary

Bundle of low-risk fixes and regression tests for eight open issues:

Test plan

  • cargo test -p fff-search constraint_only — 2 passing
  • cargo test -p fff-mcp — 10 passing
  • cd packages/pi-fff && bun test — 10 passing
  • cargo clippy --workspace --features zlob -- -D warnings — clean
  • CI green on this branch

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.
@dmtrKovalenko dmtrKovalenko changed the title fix: address open issues (#308, #400, #425, #432, #423) fix: address open issues (308, 311, 400, 403, 404, 423, 425, 432) May 3, 2026
@dmtrKovalenko dmtrKovalenko merged commit 52b1e86 into main May 3, 2026
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant