Repository navigation
Conversation
When a build records parse failures, grep/find_all/skeleton answered as if the index were complete — a miss was blamed on the pattern and the header counted only indexed files, so an agent read 'no hits' as 'no other usages exist' while a third of the repo never made it into the graph (the C# abort storm of trailhq#569/trailhq#312 is the reported case). - buildGraph now carries the failed files on meta.parseFailed (path + error), fresh throws and cached failures re-parsed on the run alike; a clean build writes nothing, so old-graph behavior is unchanged. - grep/find_all headers and zero-hit notes append 'N source files failed to parse and were not searched (run graft build --no-reuse, or use rg for exhaustive search)'; the zero-hit note replaces 'All indexed code was searched', which is a lie while failures ride the graph. Federated grep sums the children's counts. - skeleton names the build error for a failed file instead of 'no definitions indexed for this file'. The count rides the result (--json included) so a caller can tell an exhaustive-searach was impossible; trailhq#370's oversize skips can attach to the same field when that lands.
🌱 graft blast radius3 areas changed → 4 areas can be affected. 15 dependent symbols, depth 2. flowchart TB
A0(("Graph Refresh<br/>6 symbols"))
A1(("Pull Request Review<br/>4 symbols"))
A2(("MCP Tool Dispatch<br/>3 symbols"))
A3(("CLI Entry Point<br/>2 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3 reached;
Who knows this code — 2 people across 7 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 15 dependent symbols, grouped by areaGraph Refresh — 6 symbols in 3 files
Pull Request Review — 4 symbols in 4 files
MCP Tool Dispatch — 3 symbols in 1 file
CLI Entry Point — 2 symbols in 2 files
Test signal per changed area — 3 ✓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.
51 test suites also reference this code64 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. |
Fixes #816.
What happens today
graft grepwith parse failures in the graph answers as if the index were complete:no hits for "class Foo" in 3897 indexed files. The pattern may be too specific…. A miss is blamed on the pattern while 2,321 files were never searched — an agent reads that as "no other usages exist".Fix
meta.parseFailed: {path, error}[]rides the graph — fresh throws AND cached failures re-parsed on the run (Transient grammar aborts are cached as per-file parse errors and replayed forever: a repo silently loses a whole language until --no-reuse #312 re-parses, never replays, an errored entry). A clean build writes nothing → old graphs behave identically.N source files failed to parse and were not searched (run graft build --no-reuse, or use rg for exhaustive search); the zero-hit note REPLACES "All indexed code was searched", which is a lie while failures ride the graph. Federated grep sums children counts.--jsoncarriesparseFailed.this file failed to parse at build time, so nothing was indexed — <the build error>instead of "no definitions indexed for this file".Tests
Build-side uses the #139 throwing-grammar seam (fresh build, re-parse, clean build absence); grep-side asserts the sentences appear/disappear and that an old graph without
meta.parseFailedanswers byte-identical to today; skeleton-side covers exact path, basename suffix, and a parsed file being untouched.