docs(app): R3 sheet list documents as built, M9 applied

V1-2-6_U1_CORRECTIONS §R3 as built (A7 split superseded by D2, exact
results, deviations), the SQL checkpoint applied with corrections F2 to
F4, the owner's answers and the date limits F7, M9 in §12.3, db:sandbox
migrate, the sheet list spec and its named failures, class C rows, the
design deviations, CLAUDE.md and CHANGELOG. Gates pending.
This commit is contained in:
bchanot committed 2026-11-16 17:47:49 +01:00
1 parent 73ed37546f
commit a86020d6e3
9 files changed
+235 -12

No files matched your search

@@ -1856,6 +1856,7 @@ of the document's JSON text in one form, the same for every layer:
| M6 `sheet_verification_jobs` | V1-2.3 | worker RPCs (claim, input, complete with the verdict structure check, fail), service role only, with the retry delay (hidden `not_before` column on the round, `private.sheet_verification_retry_delay`: owner decision 2026-11-01, replaces « without backoff ») and the retry by cause (definitive codes close at the first occurrence, `private.sheet_worker_final_codes`); written as `20261101100000_sheet_verification_jobs.sql`, pgTAP `021`, rehearsed on the sandbox from the state before M4 (M4 to M6 in one `migration up`) and from the state before M6 | none |
| M7 `sheet_admin_reads` | V1-2.5 | read RPCs of the admin space (owner decision 2026-11-02, BDR-097): the official sheet list with its badges (historical, working copy), statuses and round counts, and one sheet's overview (versions, rounds); `get_sheet_version` redefined to return the fingerprint of deprecated versions too (BDR-098); the admin reads for capability holders at `aal2` only (`caller_can_see_official_sheet`); no new write path (it redefines two existing write RPCs), no new grant, no policy change; the one rule change is the species sort order: `create_species` and `update_inactive_species` are redefined to refuse an order outside 0..9 999 with `invalid_input` (null keeps today's meaning, owner 2026-11-02), `security definer`, `search_path = ''` and their privileges restated; pgTAP allowed and denied cases | none |
| M8 `sheet_draft_last_save` | V1-2.6 | read migration (owner decision 2026-11-03, sandbox only): `get_official_sheet_admin` redefined to answer `draft_last_save` = `{revision, saved_at, saved_by}` (the account that saved the draft's current revision, from the newest `anatomical_sheet_version.saved` audit row of that revision), null when no save wrote it; the list and the summary helper untouched; no write path, no new grant, no policy change, privileges restated as M7; pgTAP allowed and denied cases | none |
| M9 `sheet_admin_last_modified` | V1-2.6 (R3) | read migration (owner decisions D1 and D3 of 2026-11-16, design `V1-2-6_R3_SQL_CHECKPOINT.md`, BDR-109): `private.official_sheet_admin_summary` redefined to answer `last_modified_at`, the newest of the sheet row's `updated_at` and of its versions' `updated_at` (review rounds and audit rows do not count), so `list_official_sheets_admin` and `get_official_sheet_admin` carry it; the M7 body otherwise unchanged, the revoke restated; no table, policy, index, grant or write path; generated types unchanged (`jsonb`); pgTAP 022 (plan 74: saved draft, saved working copy, sheet without a version, sheet row newer than its versions). Applied 2026-11-16 to the sandbox through `pnpm db:sandbox migrate` (forward only, on the accumulated sandbox, not an `up upgrade` run from the DEV state) and to the trial stack through `pnpm db:trial migrate` (cold backup first); frozen since its first application (blob `a33b1770`) | none |
Each migration ships its pgTAP file (allowed and denied cases), regenerated
`database.types.ts`, a `db:sandbox up upgrade` run from the DEV state (with a