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
Type: fix · Branch:fix/issue-28-l3-byte-spans · Part of epic #26
Problem
GraphNode (src/schema/graphs.ts:30-37) carries only line/column — no offsets — so spanOf hardcodes bytes: [0, 0] (src/schema/v2/dataflow.ts:74-75). Every L3 statement node emits [0,0], so module.source.slice(bytes) returns "". The "every node's text is a slice" contract (canonical-schema.md:148-159) holds for L1 call nodes but breaks for all L3 body nodes.
Change
Add start_offset / end_offset (UTF-16 char offsets, matching the L1 convention per model.ts:16) to GraphNode; populate them at CFG construction (src/dataflow/cfg.ts, from ts-morph .getStart() / .getEnd()). Entry/exit = whole-callable span; param = param-decl span. spanOf returns bytes: [start_offset, end_offset].
Acceptance
For a sampled L3 statement, module.source.slice(...span.bytes) is non-empty and equals the statement text (asserted in the L3 gate).
The monotonicity gate (sibling issue) stays green.
Activity