You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(schema): body nodes and parameters carry their id in analysis.json (python #180 parity) #164
codeanalyzer-python 1.4.1 (#180, design in its #176) stamps an id on every body node and every
parameter in analysis.json: body[<local>].id = <callable-id>@<local> — the same value the Neo4j
projection merges the body node on — and parameters[i].id = <callable-id>@formal_in:<i>, the L4 formal_in vertex that carries the parameter, emitted as a forward reference below level 4. The
shared vocabulary.md was updated to say so.
TypeScript emits neither. A JSON consumer that wants to name a statement or a parameter has to
recompose the join key itself, and the composition rule lives in TWO private copies here
(fq in src/build/neo4j/project.ts and again in src/dataflow/attach.ts).
Scope boundary
Additive schema fields and one shared helper. No Neo4j label/relationship change — :TSBodyNode
already carries id as its merge key; parameters are not graph nodes. SCHEMA_VERSION stays 2.0.0 (#144).
Goals
globalOrdinal(callableId, localKey) in src/schema/ids.ts — the single definition of the
body-node id; project.ts and attach.ts use it instead of their private fq
stampBodyIds(c): id on every body{} node and parameters[i].id = <id>@formal_in:<i>,
idempotent, called by each body emitter after it writes (L1 populateL1Body, L3 emitL3,
L4 after emitL4)
Two-projection agreement tests, mirroring python's: L3 body-node ids equal the projected :TSBodyNode keys; L4 parameter ids equal the @formal_in:<i> vertex ids, in list order
.claude/SCHEMA_DECISIONS.md entry
Caveats and known risks
Per-run, like every id: the cache must stay id-free. saveCache runs before finalizeAnalysis,
so stamping onto tree nodes there is safe — the test that pins it is the existing cache-shape gate
Monotonicity: id on an L1 call node must be byte-identical at L2–L4 (the key never changes;
only callee does)
Definition of done
The two agreement tests pass; schema-v2 monotonicity gate still passes with id present
bun test green; container tests run (projection touched)
Activity