Skip to content

chore: schema pin 9 -> 15, extraction pin 26 -> 28, after verifying the queries (#124) - #125

Merged
inth3shadows merged 1 commit into
mainfrom
fix/124-schema-pin
Oct 16, 2026
Merged

inth3shadows merged 1 commit into
mainfrom
fix/124-schema-pin

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

All three registries pinned schema 9 / extraction 26, while every codegraph index on this machine now reads 15 / 28. So testgraph answered BLOCKED on its own repo and on both dogfood targets, and the pre-push hook gave no answer on every push:

STATUS: BLOCKED — index not trustworthy
  x codegraph schema 15 != pinned 9 — column semantics may have changed

The pin exists to catch column semantics changing under testgraph's queries. Bumping the number without checking would defeat it, so this is what was checked, following #79.

1. Migrations 10–15 drop and rename nothing

From codegraph src/db/migrations.ts, fork main (CURRENT_SCHEMA_VERSION = 15):

v change
10 rebuilds idx_nodes_kind; new synthesis_inputs table; new partial index on edge metadata; sets metadata.synthesizedBy on cross-file Go contains edges
11 rebuilds that partial index
12–14 indexes on unresolved_refs; rewrites name_tail on failed refs
15 an index on unresolved_refs

schema.sql from v9 to HEAD adds indexes and synthesis_inputs only. No column was added, dropped, renamed or retyped.

2. testgraph reads none of the rewritten data

  • Edge metadata: testgraph reads only $.confidence and $.resolvedBy, plus the provenance column. Nothing reads synthesizedBy, and v10 only touches contains edges, which are not in REACH_KINDS.
  • testgraph never reads name_tail. Its only use of unresolved_refs is count(*) WHERE status = 'pending'.
  • There is no SELECT * in testgraph/ or harness/. Every r[n] indexes an explicit column list.

3. Every read path run against the live schema-15 index

schema_version 15 · extraction_version 28 · nodes_for_lines 24 · nodes_in_file 27
file_node_id True · closure_files 1 · impacted_closure 612 · impacted+reasons 612
refresh_ambiguous ok · resolve_symbol 1 · caller_edge_count 28 (= raw SQL count)
top_fanin_nodes 5 · dependency_graph 729 · stale_by_mtime 30 · content_drift 0
                                                              15/15, 0 failures

4. End to end on all three registered repos (--base HEAD~5)

testgraph     OK  28 seeds / 996 impacted / 8 journeys
honeyslate    OK   8 seeds / 438 impacted / 8 journeys
signedintake  OK  68 seeds / 340 impacted / 14 journeys

Before the bump, all three were BLOCKED. The "extraction pin is behind" warning is gone too.

python3 -m unittest discover -s tests: Ran 477 tests ... OK.

Not covered

#124's third item is still open: a check that fails when a registry pin lags the deployed codegraph. CI has no index and no codegraph binary to compare against, so it needs a design decision. This PR therefore says Refs #124 and does not close the issue.

After merge, run git -C ~/personal_projects/testgraph/main pull --ff-only. The pre-push hook reads that worktree's registries.

…he queries (#124)

Every live index reads schema 15 / extraction 28, so select BLOCKED on all
three registered repos and the pre-push hook answered nothing.

Migrations 10-15 add indexes, a synthesis_inputs table and name_tail /
metadata.synthesizedBy rewrites; schema.sql v9..HEAD changes no column.
testgraph reads none of the rewritten fields and has no positional reads
over SELECT *. All 15 read paths run clean against a live schema-15 index,
and select answers OK on testgraph, honeyslate and signedintake.

Refs #124
@inth3shadows
inth3shadows merged commit 6f48270 into main Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant