Skip to content

fix(graph): follow TypeScript barrel re-exports in impact traversal - #690

Closed
pei711 wants to merge 1 commit into
trailhq:mainfrom
pei711:fix/653-barrel-impact-traversal
Closed

pei711 wants to merge 1 commit into
trailhq:mainfrom
pei711:fix/653-barrel-impact-traversal

Conversation

@pei711

@pei711 pei711 commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Track TypeScript re-export sources as import dependencies so reverse impact traversal reaches consumers through barrel files.

Added a local regression covering the re-export target, a downstream consumer, and its test file.

Validation: focused graph tests (54 passed), TypeScript check, and diff check passed. npm test passed 3,974 tests before hanging in the existing SSE watcher test; the full suite did not complete.

Fixes #653

@trailhq-graft

trailhq-graft Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🌱 graft blast radius

Nothing outside this diff depends on it. 1 area changed; no indexed dependents at depth 2.
Tests: no test reaches Import Detection.
Tag: @Frankie-Xu — Import Detection · @anirudhkumar-nanonets — Import Detection

Who knows this code — 2 people across 1 area
Area Who knows it
Import Detection · changed @Frankie-Xu — 5 commits, last 2mo ago · @anirudhkumar-nanonets — 5 commits, last 3mo ago

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 @ has no GitHub handle in its commit email — tag them by hand, or add a .mailmap entry. A suggestion from history, not a CODEOWNERS rule.

Test signal per changed area — 1 ✗

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.

  • ✗ Import Detection — 0 of 1 reached · no test file reaches it
    • not reached: isImport

graft blast · origin/main...HEAD · depth 2 · 2 changed files

Open the interactive graph → — click an area to see its dependent symbols at file:line.

github-actions Bot added a commit that referenced this pull request Oct 25, 2026
@shhdwi

shhdwi commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this. #726 just merged and covers the same change: barrel re-exports now link in the graph, for plain JS barrels too, and generic supertypes as well. I checked your test case with the parser loading step added: it fails on main before #726 and passes with it.

Your test as written also fails on current main because parsers now have to be loaded up front (await warmDepthGrammars). With #726 in, I think this one can be closed. Shout if there's a case it covers that #726 doesn't.

@pei711

pei711 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for checking. I compared the patch with #726: both add TypeScript re-export edges for barrel traversal, and I do not see a distinct case in this PR. I will close this as superseded.

@pei711

pei711 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #726, which adds the same TypeScript re-export traversal behavior.

@pei711 pei711 closed this Nov 7, 2026
github-actions Bot added a commit that referenced this pull request Nov 7, 2026
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.

TS/JS: reverse impact traversal misses downstream consumers via barrel re-exports

2 participants