From 588739857a441731b5a7baa53d1bf2ef9c409445 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 22:52:40 +0200 Subject: [PATCH] Schema: name what the startup check does not prove Soul pass 7, S7-2. The out-of-scope list named CHECK constraints, triggers and row-level security. It now also names unique indexes beyond or stricter than the required keys (including leftovers of an interrupted concurrent build, which are enforced once ready), NOT NULL columns the schema does not declare and that have no default, and column-level SELECT under SELECT * or RETURNING *, which needs every column of the table. Documentation only. Co-Authored-By: Claude Opus 5.5 --- src/store/schema.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/store/schema.ts b/src/store/schema.ts index f3588c0..420f5e6 100644 --- a/src/store/schema.ts +++ b/src/store/schema.ts @@ -187,8 +187,15 @@ function keyColumns(line: string, keyword: "PRIMARY KEY" | "UNIQUE"): string | u * speed lookups are not required; the unique ones are, by shape, in * REQUIRED_KEYS. * - * Out of scope: CHECK constraints, triggers and row-level security. Each can - * make a write fail on a database that passes this check. + * Out of scope, each able to make a write fail on a database that passes the + * check: CHECK constraints; triggers; row-level security; unique indexes + * beyond the required keys, or stricter than them, including the leftovers of + * an interrupted concurrent index build (a valid extra one refuses rows the + * store expects to write, and even an invalid one that is ready is enforced + * on writes); NOT NULL columns the schema does not declare and that have no + * default, which the store's INSERTs leave out; and SELECT granted column by + * column when a statement reads `SELECT *` or `RETURNING *`, which needs + * SELECT on every column the table has, not only the declared ones. */ /** Every table the schema creates. */