perf(ontology): add code-edge relationship projections
Adds the missing relationship/kind reorder projections to gl_code_edge so code graph scans can use the same ClickHouse access paths as gl_edge. This is aimed at broad CALLS, DEFINES, IMPORTS, and ON_BRANCH query shapes where the compiler can filter by relationship kind plus source or target kind before it has a small ID set.
Relates to #152 (closed) and #320 (closed). Follows #454 (closed).
Changes
- Adds
by_rel_source_kindandby_rel_target_kindto gl_code_edge. - Regenerates the ClickHouse and DuckDB DDL with schema version 20.
- Adds a compiler DDL test for the projection names and column order.
Projection research
Production v19 DDL shows gl_code_edge already has source-led, target-led, source-count, and target-count projections. The two missing projections were the relationship/kind reorder projections that gl_edge already has.
I did not add node_edge_counts to gl_code_edge. I did not find a compiler path that uses that summary for code edges, and adding it would increase write and storage cost on the largest edge table without a current consumer.
The target-count projection on gl_code_edge already matches the same group-by shape as agg_counts on gl_edge, so this MR does not add a duplicate aggregate projection under a second name.
Validation
mise ontology:validate./scripts/check-ddl-freshness.shcargo test -p compiler code_edge_has_relationship_kind_reorder_projectionsmise test:fast