chore(memory): V1-2.1 raw old-schema repro log, evidence, LRN, TODO
This commit is contained in:
1 parent
2379d28d9b
commit
1f9fa8b835
5 files changed
+136
-16
No files matched your search
@@ -28,6 +28,10 @@ F17 service_role inserted an owner row directly into profile_roles
|
||||
F16 sha256 of an asset used by a published version changed
|
||||
```
|
||||
|
||||
Re-run on 2026-10-28 for the final decisions pass, raw psql output committed as
|
||||
`2026-10-28-v1-2-1-repro-old-schema.out` (sandbox `up fresh` from a copy holding only the 12
|
||||
migrations before M4; the same NOTICE lines, `repro exit 0`, the transaction rolled back).
|
||||
|
||||
F18 (last-owner race) was reproduced with two sessions; its test is
|
||||
`packages/supabase/tests/sandbox/sheets.sandbox.ts`.
|
||||
|
||||
@@ -57,17 +61,17 @@ files of this pass:
|
||||
## 4. Real-stack results on the corrected HEAD
|
||||
|
||||
Final decisions pass (owner brief « V1-2.1 : décisions finales du propriétaire »), code at
|
||||
`5620399` (M6 option A, text size measure with the bounded number walk, pgTAP 015/017/020;
|
||||
only `.claude/` differs at the final HEAD). Earlier figures (1 333 pgTAP) were the `2af61e7`
|
||||
state; an intermediate pass at `7eca441` gave 1 352 before the review findings below.
|
||||
`2379d28` (M6 option A, text size measure with the bounded, linear number walk, pgTAP
|
||||
015/017/020; only `.claude/` differs at the final HEAD). Earlier figures (1 333 pgTAP) were the `2af61e7`
|
||||
state; intermediate passes at `7eca441` (1 352) and `5620399` (1 807) preceded the review findings below.
|
||||
|
||||
| Run | Fresh stack | Upgraded stack (M3 + Git fixture, then M4+M5) |
|
||||
|---|---|---|
|
||||
| pgTAP (`test-db`, 18 files) | 1 807/1 807 | 1 807/1 807 |
|
||||
| sandbox suite, run 1 | 86/86 | 86/86 |
|
||||
| sandbox suite, run 2 (same stack) | 86/86 | 86/86 |
|
||||
| pgTAP (`test-db`, 18 files) | 1 808/1 808 | 1 808/1 808 |
|
||||
| sandbox suite, run 1 | 87/87 | 87/87 |
|
||||
| sandbox suite, run 2 (same stack) | 87/87 | 87/87 |
|
||||
| of which two-session concurrency (`sheets-concurrency`) | 16/16 each run | 16/16 each run |
|
||||
| pgTAP again after both suite runs | 1 807/1 807 | 1 807/1 807 |
|
||||
| pgTAP again after both suite runs | 1 808/1 808 | 1 808/1 808 |
|
||||
| `types --check` | types match | types match |
|
||||
|
||||
PGlite: 128/128 (packages/supabase: the 18 pgTAP files and the closed-code census).
|
||||
@@ -82,7 +86,8 @@ New in this pass:
|
||||
as text and over it as binary jsonb saved whole; creation over the cap refused; numbers that
|
||||
JavaScript prints with an exponent stored and measured in plain form; a document under the cap
|
||||
in compact JavaScript form but over it as measured refused; 9 000 numbers of 131 072 digits
|
||||
refused with the closed code; the table CHECK definition. Every refusal answers
|
||||
refused with the closed code; 600 000 small numbers within the cap saved (the number walk is
|
||||
linear); the table CHECK definition. Every refusal answers
|
||||
`document.too_large` (23514), never a raw error.
|
||||
- 017 `publish.species.other` refused alone.
|
||||
- 020 (449): the AR-1 B matrix of §15 in full (6 caller classes × aal1/aal2 × grant/revoke × 4
|
||||
@@ -91,7 +96,13 @@ New in this pass:
|
||||
`revoke_catalog_right`, `lookup_catalog_account`, `list_catalog_grants`) refused to every
|
||||
non-owner class at aal2 (`rights.owner`) and at aal1 (`rights.mfa`).
|
||||
|
||||
Number bomb on the real image (`runs2/fresh/bomb.log`, sandbox): the shipped function answers
|
||||
Number walk, linear (security gate on `7c4bf12`: `jsonb_path_query` row by row is quadratic on
|
||||
PostgreSQL 17, 0.15 / 0.53 / 2.17 s for 50k / 100k / 200k numbers on the real image; replaced by
|
||||
one `jsonb_path_query_array` call: 65 / 128 / 262 / 414 ms for 100k / 200k / 400k / 600k). Over
|
||||
HTTP on both stacks, each run: 600 000 numbers (1 801 760 bytes of text) saved in 677-695 ms;
|
||||
1 000 000 numbers answered `document.too_large` in 1 019-1 078 ms (budget 2 000 ms).
|
||||
|
||||
Number bomb on the real image (sandbox, re-run on `2379d28`): the shipped function answers
|
||||
`document.too_large`; the same payload under the previous body (`octet_length(p_doc::text)`
|
||||
alone, rolled back) fails with `out of memory` after a 1 GiB buffer.
|
||||
|
||||
@@ -101,14 +112,14 @@ Synthetic document: 64 views, 1 024 annotations, 8 192 finding nodes (depth 8),
|
||||
groups, 4 drawings of 2 000 000 bytes. The labels are calibrated on the contract's text measure
|
||||
alone: text 2 076 707 bytes (cap 2 097 152), binary jsonb 2 346 648 bytes, over the cap and
|
||||
accepted, as the measure requires. HTTP wall-clock through PostgREST on the development machine,
|
||||
code `5620399`, milliseconds (min / median / max):
|
||||
code `2379d28`, milliseconds (min / median / max):
|
||||
|
||||
| Stack, run | save (7) | submit (5) | approve (3) | publish (3) |
|
||||
|---|---|---|---|---|
|
||||
| fresh, 1 | 135 / 140 / 149 | 5 / 6 / 7 | 195 / 285 / 290 | 208 / 297 / 315 |
|
||||
| fresh, 2 | 130 / 139 / 145 | 4 / 5 / 6 | 200 / 286 / 301 | 201 / 285 / 304 |
|
||||
| upgraded, 1 | 130 / 141 / 156 | 5 / 5 / 6 | 196 / 286 / 296 | 306 / 308 / 318 |
|
||||
| upgraded, 2 | 132 / 136 / 146 | 4 / 5 / 6 | 210 / 284 / 293 | 204 / 291 / 298 |
|
||||
| fresh, 1 | 127 / 137 / 155 | 4 / 5 / 6 | 190 / 285 / 292 | 195 / 288 / 303 |
|
||||
| fresh, 2 | 130 / 142 / 155 | 4 / 7 / 13 | 196 / 284 / 297 | 205 / 302 / 306 |
|
||||
| upgraded, 1 | 135 / 139 / 148 | 5 / 6 / 6 | 192 / 282 / 294 | 196 / 292 / 296 |
|
||||
| upgraded, 2 | 127 / 137 / 151 | 5 / 5 / 7 | 199 / 286 / 295 | 220 / 292 / 299 |
|
||||
|
||||
The core's at-caps fixture is V1-2.2 work; the contract fixes the budgets at the V1-2.3
|
||||
checkpoint and measures verification (120 s) there.
|
||||
@@ -141,7 +152,7 @@ RPC), then M4+M5 by `supabase migration up`.
|
||||
bytes (sha256 equal to the key); the same editor at aal1, a catalogue reader and an anonymous
|
||||
caller are refused (the historical sheet has no published version).
|
||||
|
||||
The rehearsal is reproducible from the repository, re-run on `7eca441` and `5620399` (final decisions pass)
|
||||
The rehearsal is reproducible from the repository, re-run on `7eca441`, `5620399` and `2379d28` (final decisions pass)
|
||||
with the same results, the only diff lines being the bucket limit and the service_role
|
||||
privileges: `bash .claude/audits/2026-10-28-v1-2-1-m7/m7-rehearsal.sh [work dir]` (sandbox only; it applies
|
||||
M4+M5 with `supabase migration up --db-url` on the sandbox port, a step `scripts/db-sandbox.sh`
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
assign_platform_role
|
||||
--------------------------------------
|
||||
634abb88-1ccb-4bb5-9424-a384b5c31e74
|
||||
(1 row)
|
||||
|
||||
assign_platform_role
|
||||
--------------------------------------
|
||||
d4de6c72-8e49-40a9-a012-4dfbab54e8b3
|
||||
(1 row)
|
||||
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F1 observed: plain account created a personal PUBLIC sheet for species other: creator=t official=f visibility=public species=other
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F5 observed: an account with an UNCONFIRMED email created a sheet
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F6 observed: set_sheet_visibility changes visibility with no gate
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F15 observed: another plain account reads the public personal sheet: 1 row(s)
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F9 observed: editor rewrote draft content by direct UPDATE (no RPC): change_note=direct
|
||||
NOTICE: F9 observed: sheet renamed by direct UPDATE: Renamed directly
|
||||
publish_sheet_version
|
||||
--------------------------------------
|
||||
a45915a7-1677-4560-abe9-72d7d0c018e8
|
||||
(1 row)
|
||||
|
||||
NOTICE: F4 observed: version published with a drawing never confirmed: uploaded_at null = t
|
||||
archive_anatomical_sheet
|
||||
--------------------------------------
|
||||
f2411a8d-0f70-4bac-8e4c-cc7084977f42
|
||||
(1 row)
|
||||
|
||||
NOTICE: F2 observed: the draft of an ARCHIVED sheet was published
|
||||
NOTICE: F2 observed: create_sheet_draft opened a draft on an ARCHIVED sheet
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F8 observed: after archiving, another account reads 0 published version(s) of the sheet
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
restore_anatomical_sheet
|
||||
--------------------------------------
|
||||
f2411a8d-0f70-4bac-8e4c-cc7084977f42
|
||||
(1 row)
|
||||
|
||||
deprecate_sheet_version
|
||||
--------------------------------------
|
||||
a45915a7-1677-4560-abe9-72d7d0c018e8
|
||||
(1 row)
|
||||
|
||||
NOTICE: F13 observed: a DEPRECATED (once published) version was deleted physically: rows left 0
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F3 observed: source drawing confirmed, copied rows confirmed: false
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F14 observed: a platform admin at aal1 (claims carry no aal) published an official sheet
|
||||
as_user
|
||||
---------
|
||||
|
||||
(1 row)
|
||||
|
||||
NOTICE: F19 observed: grant_platform_role(owner) accepted at aal1 (claims: {"sub": "a1000000-0000-0000-0000-000000000001", "role": "authenticated"})
|
||||
NOTICE: F19 observed: the new owner holds 0 verified factor(s); active owner rows now 1
|
||||
set_config
|
||||
-------------------------
|
||||
{"role":"service_role"}
|
||||
(1 row)
|
||||
|
||||
NOTICE: F7 observed: upload confirmed with no object in Storage: objects=0 uploaded_at set=t
|
||||
NOTICE: F12 observed: service_role published a draft by direct UPDATE: published
|
||||
NOTICE: F17 observed: service_role inserted an owner row directly into profile_roles
|
||||
NOTICE: F16 observed: sha256 of an asset used by a published version changed: 00000000
|
||||
repro exit 0
|
||||
Reference in new issue
Block a user