schemaproof/NOTICE.md
caelum0x 3eb9b14677 feat: initial SchemaProof CLI — live-database-aware Postgres migration safety checker
Parses migrations with the real Postgres parser (libpg_query via libpg-query),
classifies the lock each statement takes, and — unlike static-only linters
(Squawk, Atlas free tier) — optionally connects to the real target database
(Supabase/Neon/plain Postgres) to re-score severity against that table's
actual row count, dead-tuple ratio, and currently-active lock holders, with
an optional AI explain+rewrite layer gated on ANTHROPIC_API_KEY.

Verified against a real local Postgres with a seeded 150k-row table and a
real concurrent lock holder: same static rule produces BLOCK on the large
table and INFO on a 3-row table, and escalates to BLOCK when a real backend
is holding a lock on the target table at check time.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-26 15:53:29 +03:00

1.3 KiB

Provenance / third-party notices

SchemaProof is a fresh implementation (not a fork of a single upstream repo), built directly on top of one real OSS dependency for SQL parsing, because hand-rolling a PostgreSQL SQL parser would be re-inventing a solved, safety- critical problem:

  • libpg-query (the Postgres parser compiled out of the server, via the libpg-query npm bindings) -- MIT (npm bindings) / BSD-3-Clause (underlying C library). SchemaProof's src/parser.ts and src/rules.ts walk the real AST this library returns; no SQL regexes are used to detect risky patterns.

No code was copied from Squawk, strong_migrations, Atlas, pgroll, MigrationPilot, pg-lockguard or any other existing migration linter -- SchemaProof's rule set targets the same well-known, publicly documented PostgreSQL locking behaviors (ACCESS EXCLUSIVE on SET NOT NULL, SHARE lock on non-concurrent CREATE INDEX, inline validation on ADD CONSTRAINT, full-table rewrite on ALTER COLUMN TYPE, etc.) that those projects also document, but the rule implementations, the live-database-stats layer, and the AI-explanation layer are original work for this project.

SchemaProof itself is MIT-licensed (see LICENSE).