fix(deep): honor --only-dir in the concept pass (#252) - #262
Conversation
The wiring walk already filtered by whitelist; the --deep concept pass and checkContext still walked the whole repo, so excluded files were summarized and re-synthesized. Apply the same filter, with fingerprint fallback so a later --deep without the flag stays scoped. Co-authored-by: Cursor <cursoragent@cursor.com>
🌱 graft blast radius2 areas changed → 2 areas can be affected. 3 dependent symbols, depth 2. flowchart TB
A0(("Workspace Splitting<br/>2 symbols"))
A1(("MCP Tool Invocation<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1 reached;
Who knows this code — 2 people across 4 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 3 dependent symbols, grouped by areaWorkspace Splitting — 2 symbols in 2 files
MCP Tool Invocation — 1 symbol in 1 file
Test signal per changed area — 2 ✓Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
4 test suites also reference this code4 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
|
Verified locally on top of current Reproduced #252 with an offline recording summarizer: |
…q#262) The wiring walk already filtered by whitelist; the --deep concept pass and checkContext still walked the whole repo, so excluded files were summarized and re-synthesized. Apply the same filter, with fingerprint fallback so a later --deep without the flag stays scoped. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
graft build --deepnow applies the same--only-dirwhitelist as the wiring walk (filterByOnlyDirs), so the concept pass no longer summarizes or synthesizes files outside the prefixes.checkContextreads the same file set (CLI/API, else the fingerprint, matchingcheckGraph/probeDrift) sograft checkdoes not report excluded files as coverage.--only-dirprefix / repeatable semantics are the same as feat: add --only-dir whitelist to graft build #149.Closes #252
Test plan
node --import tsx --test test/context-only-dir.test.ts— concept summaries, multi--only-dir, fingerprint fallback, checkContext,Graft.init, wiring still scopednode --import tsx --test test/graph-only-dir.test.ts— existing whitelist + fingerprint probe still cleannpm test— full suite (1065 passing locally)Made with Cursor