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
{{ message }}
Repository navigation
Commit 30375af
Browse filesBrowse the repository at this point in the historyBrowse files
docs(spec): add program C — the startup schema validator ADR-0015 half-removed
The Java port used to ship MetaClassDBValidatorService: it checked each
MetaObject's mapping against the live DB on boot AND created what was missing,
under one autoCreate flag. ADR-0015 removed it, and the ADR names what it removed
precisely — the "auto-create path" plus createTable/createIndex/createForeignKey/
createSequence. Every deleted capability is a WRITE. The read half went with it
only because the two were one service behind one flag.
So a read-only validator does not reopen ADR-0015. That ADR defends schema
AUTHORITY — who may emit DDL, and the answer stays "the TypeScript toolchain
alone". Introspecting and comparing claims no authority. The spec makes read-only
a hard rule rather than a default, and puts "no DDL under any flag" in non-goals,
because it was the option's existence that made the last validator removable.
The gap it closes is not hypothetical and is a direct consequence of ADR-0015:
`verify --db` is Node-only, so the four ports that cannot run it are exactly the
four whose services run against a schema they do not own with no way to detect
that it disagrees with the metadata they just loaded. Centralising schema in Node
was right; leaving those ports blind at runtime was its unpriced cost.
The implementation constraint that keeps it honest: compare live introspection
against the COMMITTED SNAPSHOT the TS toolchain already produces and verify has
gated since #292 — not against metadata directly. Each port then needs dialect
introspection and a comparison, never a diff engine, so this cannot re-fork the
engine ADR-0015 consolidated.
That is also what ties the three programs together. Each link in the chain is
checked somewhere by something already built: metadata->code+constants
(verify --codegen, every port), metadata->snapshot (verify --db, #292),
snapshot->migration chain (--replay-snapshot), snapshot->the live DB a process
actually uses (program C, every port). The one place the composition genuinely
breaks is recorded too: column naming is config, not metadata, so two ports with
different columnNaming settings each pass their own gate while disagreeing with
each other — which is a concrete argument for declaring @column explicitly.
0 commit comments