Skip to main content
Use corpus when you need regression coverage for false drift and catalog parity bugs. The command replays dirty migrations, diffs the result against a clean tree, applies the reconciliation twice, and requires the final diff to converge to zero operations.

Use this when

  • A bug involved false drift.
  • Engine changes need dirty-real catalog coverage.
  • A consuming repo keeps its own incident corpus.
  • CI can provide a disposable PostgreSQL database.

Run it

npx supaschema corpus --database-url "$DATABASE_URL"
npx supaschema corpus --corpus-dir corpus/supabase-style --database-url "$DATABASE_URL"
npx supaschema corpus --database-url "$DATABASE_URL" --json
Without a database URL, corpus prints a skip notice and exits 0.

Flags

--corpus-dir
path
Corpus directory. Defaults to corpus/supabase-style.
--database-url
url
Admin URL for disposable corpus databases.
--json
boolean
Print the corpus report as JSON.

Exit codes

CodeMeaning
0Corpus converged, or skipped because no database URL resolved
1Runtime failure
2Corpus diagnostics failed

Corpus guide

Understand the dirty-real regression lane.

Benchmarks

Review correctness and timing evidence.

Check

See the static gate used by the corpus lane.

Verify

Compare apply-twice proof with corpus reconvergence.
Last modified on June 16, 2026