feat(config): surface matches hidden by extension filters - #77
Conversation
Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
0b72263 to
e0ff206
Compare
Route context, MCP, dependency, and graph scans through active project filters so all public surfaces agree. Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Cover filtered-match guidance branches and make the watcher integration test wait for the completed write event. Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
JordanCoin
left a comment
There was a problem hiding this comment.
Reviewed the logic and tests carefully — the core filter/hint design is sound. Hinted files must fail only but pass exclude, so explicitly excluded paths are never leaked; the hint is bounded (5 paths + "and N more"); and I especially appreciated TestHandleFindFileExplainsOnlyFilteredMatches asserting config.json is byte-identical after the call. Default-on for guidance.missing_extension_hints is reasonable since it only fires on zero-result searches and never mutates config. Full suite passes with -race, and the tests genuinely encode the new behavior (they fail against main's implementation).
Approving, with a few comments — mostly things I want on the record:
- Scope is broader than the title suggests. Beyond
find_filehints, this makesget_structure,get_diff, project stats,BuildFileGraph/ScanForDeps, the CLI context envelope, hooks, and blast-radius output all apply configonly/exclude. I think that's the right behavior, but it's a real change on filtered repos, and it creates a gap:ScanConfiguredFiles/filterConfiguredAnalysesdo a hiddenconfig.Loadinside the scanner, so--deps/--importersnow apply config filters with no way for CLI--only/--excludeto override — at odds with the documented "CLI flags always override config values." A follow-up plumbing filters as parameters (or documenting the exception) would be welcome. - Hint wording (
mcp/find_guidance.go): the response says "Tell your agent: 'include suggestions for proto…'" — but the reader of that text is the agent, and the quoted phrase doesn't map to a concrete action. Suggest actionable wording like: "To surface these, add "proto" toonlyin .codemap/config.json". - Minor: analyses get filtered twice (
ScanForDepsandBuildFileGraphFromAnalyses), with threeconfig.Loaddisk reads per graph build — worth consolidating sometime.
None of these block the merge. Thanks for the thorough test coverage — the entrypoint parity test is a nice touch.
…back # Conflicts: # watch/more_test.go
What does this PR do?
onlyandexcludefilters.onlyhides real matches, report them and explain how to include or suppress their extensions.guidance.missing_extension_hints; set it tofalseto disable them.guidance.ignored_extensions.Type of change
Checklist
go build && ./codemap .Additional notes
Repository languages evolve after initial setup. Actionable misses prevent agents from repeatedly failing or silently falling back to raw filesystem searches, without rescanning or changing config automatically.
Focused MCP, context, dependency, and file-graph tests pass with the full race
suite, formatting, module verification, vet, staticcheck, and a built-binary
parity probe. The probe confirmed the CLI context, MCP structure, and MCP project
statistics all report the same configured file count.
Reviewer setup:
Developed with carefully directed, manually reviewed AI assistance.
Allow edits by maintainersis enabled, so maintainers are welcome to fix wording or make minor cleanup directly; broader review feedback will be incorporated.Co-Authored-By: GPT-5.6 Sol codex@openai.com