fix(fff-mcp): omit git:clean from find_files output - #845
Conversation
format_git_status_opt(None) returns Some("clean"), so file_suffix()
materialized the default git state as a ' git:clean' tag on nearly every
find_files result line. Clean is the default state; annotating it spends
LLM context without adding signal, and pi-fff already suppresses it in
fffFileAnnotation(). Filter it out in the MCP presentation layer only —
core keeps full status so git:modified constraints still work.
Closes #844
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesMCP Git annotations
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change removes redundant 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The change satisfies issue
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@gustav-fff whats wrong with the CI? |
|
[triage-bot] DIRECTED: Not this PR. Exactly one job failed — Rerun of the identical SHA Mechanism, hypothesis — 15/15 local passes on macOS, so it needs runner load: the cursor is a plain numeric offset into the prefiltered candidate list, which is re-sorted on every call ( Honk-Honk 🪿 |
Closes #844
Root cause
format_git_status_opt(None)returnsSome("clean")(crates/fff-core/src/git.rs:142-144), sofile_suffix()(crates/fff-mcp/src/output.rs:23) materialized the default git state asgit:cleanon everyfind_filesresult line (crates/fff-mcp/src/server.rs:537).pi-fffalready suppresses it (packages/pi-fff/src/index.ts:160).Fix
One filter in the MCP presentation layer only. Core keeps the full status, so
git:modified/git:untrackedquery constraints are unaffected. Dirty and staged states still render.Steps to reproduce
Expected (this PR) vs actual on pre-fix
main:How verified
cargo test -p fff-mcpgreen, plus 2 new unit tests inoutput.rspinning thatclean/CURRENT/empty/Noneproduce no tag while dirty + staged states and frecency words survive.cargo clippy -p fff-mcpclean.scripts/benchmark-claude.shA/B, baseline binary vs this one, fff arm, 11 concepts each: task completion 10/11 in both arms, 0 errors in both. Concept 2 fails in both (its target path no longer exists in the corpus — stale ground truth, unrelated). Cost/turn deltas are pure noise (turn-count variance swamps the change): $1.8214 baseline vs $1.7151 patched.find_filespage overchromium,git:cleanwas 200 of ~1600 chars, i.e. -12.4% of payload. The eval suite itself only callsfind_files3-6 times across 11 concepts (grep dominates: 21 calls), so suite-level byte savings are small — the win shows up in find_files-heavy sessions.Automated triage via Gustav. Honk-Honk 🪿
Summary by CodeRabbit