fix(pi-fff): canonicalize find path constraints before query build#427
Merged
dmtrKovalenko merged 1 commit intodmtrKovalenko:mainfrom Apr 29, 2026
Merged
Conversation
Owner
|
this should close |
Owner
|
the one little note that the tests would not run in the CI which is a bummer if you can address this it would be perfect |
Canonicalize structured find path constraints before building the compact FFF query string. Absolute paths inside the active workspace now become repo-relative constraints, absolute paths outside the workspace fail clearly, and simple trailing recursive directory globs become directory-prefix constraints while file globs remain unchanged. This keeps the invariant at the pi-fff adapter boundary, where structured tool parameters are translated into FFF query syntax, and avoids changing core indexing, ranking, parser, or matcher behavior.
c3b45bb to
8a275dd
Compare
Contributor
Author
|
@dmtrKovalenko done, the new tests now run in CI |
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.
Problem
pi-fffcan currently false-negative whenfind.pathis passed as an absolute in-workspace path.Repro shape:
FFF indexes repo-relative paths like:
but
pi-fffcurrently forwards the absolute path into the compact FFF query string unchanged:That cannot match the indexed relative paths, so the tool can report no files even when files exist.
There is also a related adapter-level edge case where a simple recursive directory constraint such as:
.agents/**can false-negative, while the equivalent directory-prefix constraint works:
Fix
Canonicalize
find.pathandexcludeconstraints inpi-fffbefore building the FFF query string:.agents/**andsrc/**become directory-prefix constraintssrc/**/*.tsare preservedThis keeps the change at the
pi-fffadapter boundary. It does not change FFF core indexing, ranking, parser behavior, or matching semantics.Tests
Added unit coverage for:
.agents/**->.agents/src/**/*->src/src/**/*.tsValidation
Ran:
Also validated through live pi against the original failure shape:
pi-fff: false-negativepi-fff: returns the expected.agentsfilesNote: default
cargo test --workspaceis blocked locally by the Zig/zlob toolchain setup; the no-default workspace suite passes, and this PR only changes TypeScript adapter query construction.