feat(graph): add Zig tags.scm — call edges for the breadth tier - #201
feat(graph): add Zig tags.scm — call edges for the breadth tier#201Frankie-Xu wants to merge 2 commits into
Conversation
…lhq#197) Co-authored-by: Cursor <cursoragent@cursor.com>
The tracking issue is NanoNets#198; the previous commit message still names NanoNets#197. Co-authored-by: Cursor <cursoragent@cursor.com>
🌱 graft blast radius1 area changed → 4 areas can be affected. 11 dependent symbols, depth 2. flowchart TB
A0(("Dependency Graph<br/>7 symbols"))
A1(("CLI Engine<br/>2 symbols"))
A2(("LSP Enrichment<br/>1 symbol"))
A3(("MCP Tools<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2,A3 reached;
All 11 dependent symbols, grouped by areaDependency Graph — 7 symbols in 7 files
CLI Engine — 2 symbols in 2 files
LSP Enrichment — 1 symbol in 1 file
MCP Tools — 1 symbol in 1 file
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.
31 test suites also reference this code31 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. |
Summary
.zig) is already on the breadth-tier registry, but had notags.scm, so the node-kind walker mintedconst Point = struct { … }as kindvariable(variable_declarationmatches(^|_)(var|…)) and emitted no call edges. Namedtest "…" { }decls were skipped entirely.src/graph/queries/zig.scmwith shapes confirmed against thetree-sitter-wasmzig grammar AST:@definition.function—fn/pub fn(function_declaration)@definition.struct—const Name = struct { … }@definition.function— namedtest "…" { }(string_content)@reference.call—call_expression(helper(n)andp.local())test { },const p = Point{ … }(struct_initializer, not a type), enum/union.origin/main, not stacked. Same pattern as Dart (fix(graph): index Dart top-level functions, consts, and call edges #153). Will conflict with feat(graph): add OCaml tags.scm — call edges for the breadth tier #200 on the onegeneric.tscomment line; after both merge that exception should go away.Fixes #197.
Test plan
node --import tsx --test test/generic-extract.test.ts— Zig fixture:run → helper, named test → helper; unnamedtest { }is not a symbolnpm run buildnpm test(884/884)