Skip to content

fix: accessed_symbols declared in IR and graph schema but never collected — 0/1,100 Callables carry it (CLDK-007) #55

Description

@rahlk

From the external quality audit of the Juice Shop v1 export (schema 1.0.0), finding CLDK-007 (severity Medium): source-read dependencies cannot be reconstructed from the graph.

Audit evidence

0 of 1,100 Callable nodes carry accessed_symbols_json, while all carry parameters_json.

Root cause

The field is declared end-to-end but never collected:

  • IR declares it: accessed_symbols: TSSymbol[] (src/schema/schema.ts:161); Neo4j schema declares it (src/build/neo4j/schema.ts:177); the projection would emit it (callableProps, src/build/neo4j/project.ts:391).
  • But the only writes are hard-coded empty initializers in buildCallable and the implicit-constructor builder (src/syntactic_analysis/builders.ts:447, 488) — no assignment or push anywhere in src/. stringifyIf([]) → null → pruned, so the property never appears.

Contrast: parameters is populated (builders.ts:442), hence the observed asymmetry. The Python analyzer does populate its accessed_symbols_json.

Fix direction

Either implement the collector (identifier reads per callable body, Python-analyzer parity) or remove the field from the IR + graph schema so the contract stops advertising data that never exists. Decide as part of the v2 schema work — the v2 shape currently carries neither parameters_json nor accessed_symbols_json, so this is the moment to pick one deliberately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions