Documentation
¶
Overview ¶
Package parity contains the cross-binary diff harness. Phase 1 dumps the SQLite cache to a normalized JSON form; phase 2 extends to the Kuzu graph produced by `codeiq enrich`. DumpKuzu lives here so the harness can compare post-enrich graphs node-for-node and edge-for-edge against the Java side's Neo4j dump.
Package parity contains the cross-binary diff harness. Phase 1 dumps the SQLite cache to a normalized JSON form; phase 2 extends to the Kuzu graph.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpKuzu ¶
DumpKuzu returns a deterministic JSON dump of all nodes and edges in the Kuzu store at `dir`. The shape mirrors what java-normalize.jq produces from the Java side's `codeiq graph -f json` output, so the parity harness can diff the two byte-for-byte modulo the entries listed in expected-divergence.json.
Kuzu-specific notes:
- The store at `dir` must have been written by `codeiq enrich` (schema + bulk-loaded nodes + per-EdgeKind rel tables + indexes).
- The rel-type accessor is `label(r)` in Kuzu 0.7.1 — the Cypher standard `type(r)` is not bound. The "edges" entries carry the rel-table name as the `kind` field so the JSON looks like the Java/Neo4j side.
- LIMIT cannot be parameter-bound in Kuzu 0.7.1; we don't need LIMIT here because the diff requires the full set.
- Cypher ORDER BY drops the rel-pattern scope after RETURN, so we sort defensively in Go on top of any server-side ordering.
Types ¶
type NormalizedEntry ¶
type NormalizedEntry struct {
Path string `json:"path"`
Language string `json:"language"`
Nodes []*model.CodeNode `json:"nodes"`
Edges []*model.CodeEdge `json:"edges"`
}
NormalizedEntry is the diff-friendly shape of a cache entry. Volatile fields (parsed_at timestamp) are dropped — they're never equal across runs of two different binaries.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
parity-normalize
command
Binary parity-normalize reads a codeiq SQLite cache and writes a normalized JSON dump to stdout.
|
Binary parity-normalize reads a codeiq SQLite cache and writes a normalized JSON dump to stdout. |