diff --git a/docs/development/RUST.md b/docs/development/RUST.md
index 6e8a9e0e..e9443fd7 100644
--- a/docs/development/RUST.md
+++ b/docs/development/RUST.md
@@ -175,7 +175,8 @@ cmake on Alpine). The decode child's traced syscall set did not change with
the parent's TLS code (§5.4 re-run at R1: the same seven). Image 11.6 MB
(8.7 MB at R0: ring + rustls). Tests: `crates/worker/tests/job_loop.rs` (11,
fake backend + fake decoder) and the module unit tests run natively; the
-real-stack end-to-end runs through `pnpm e2e:avatar` (`STORAGE.md` §6).
+real-stack end-to-end runs through `pnpm db:sandbox avatar-e2e` on the throwaway stack since V1-2.3
+(`pnpm e2e:avatar` on DEV, the owner's call; `STORAGE.md` §6).
The sandboxed child, unchanged from R0:
@@ -4501,8 +4502,7 @@ Reviews (fresh, 2026-11-01, on `7043d39`):
password literal in `scripts/db-sandbox.sh`). LOWs fixed: the verdict cap measured twice (child output now
3 MiB, under the 4 MiB SQL measure of `jsonb::text`); the child's 1 GiB address space above the container's
512 MiB (`worker-verify` and the sandbox worker now 1 280 MiB, so the child's limit binds first). LOWs open: no
- backoff between attempts (the §6.4 design « without backoff »: an outage of a few seconds can spend the five
- attempts, the round closing `unavailable`; fail-closed, availability only); a document naming several hundred
+ backoff between attempts (closed afterwards by the owner decision of 2026-11-01: SQL delay of 2, 5, 10, 20 s, V1-2 contract §6.4; the finding as written on `7043d39` is left); a document naming several hundred
registered drawings overflows the 64 KiB frame header and is reported `resource_limit` instead of the core's
`caps` (wrong exit message, no security effect); SQL interpolation of generated ids in the sandbox test only.
- Verifier: ECARTS(2). W1-W5, W7 met. W6: the hostile corpus through the child was missing (added, above); `pnpm
@@ -4525,3 +4525,32 @@ WASM 580 522 B gzip in the app image, unchanged by V1-2.3); `pnpm e2e:shell` 86
Second reviews on `6aa85fe`: verifier ECARTS(1), the one item owner-gated (`pnpm e2e:avatar`, a worker on DEV), the
hostile corpus met; security PASS (MEDIUM pre-existing sandbox password literal; LOWs: the 3 MiB / 4 MiB relation is
empirical, a refused verdict ending fail-closed `verdict_refused`; DEPLOY.md memory note, fixed).
+
+### 13.1 Reserves Q3 and Q4: inputs at the caps, `brk` bounded (2026-11-01)
+
+Contract `.claude/tasks/contracts/2026-11-01-v1-2-3-reserves.md`. Fixtures (`fixtures.rs`, `test-hooks`): `verify_max_frame()`,
+also `fixture verify-max`: document and base of exactly 2 097 152 bytes (the `jsonb::text` spelling, `": "` and `", "`,
+filler in `attribution.notes`; the core measures `document_bytes` 2 097 152), four drawings of 2 097 152, 2 097 152,
+1 048 576 and 1 048 576 bytes (6 291 456 in all), a frame of 10 486 658 bytes. A drawing is the stored prolog, a 10 × 10
+root, 10 000 `` and a last path whose `d` ends in as many spaces as the size needs. Unit tests run the
+core on each fixture: the maximum is `passed`; four drawings of 2 MiB (no base), five drawings, one drawing of 2 097 153
+bytes and a document of 2 097 153 bytes are `failed` with `verification.validation.caps` (content, exit 0).
+
+Through the full sandbox (`tests/sandbox.rs`, now 31 tests): `the_maximum_input_is_verified_within_the_limits` (`passed`,
+verdict 2 531 bytes, under the 3 MiB cap and the 90 s deadline), `inputs_just_beyond_the_caps_fail_as_caps_through_the_sandbox`,
+`the_verify_input_cap_is_exact` (a frame of exactly 12 MiB is read, here refused by the frame check; one byte more is refused
+unread by the existing test). Measured on the development host, release build, glibc, sandbox applied: the maximum 104 ms,
+the sheet at every other cap (2 118 765 bytes in, 24 689 out) 142 ms. The Docker `test` stage passes the same tests; its
+log does not print the timings (captured output).
+
+`brk` in the verify child (`tests/sandbox.rs`, 1 GiB address space): `--alloc-gib 2` and the new hook
+`--alloc-small-gib ` (4 KiB chunks kept alive, the small-allocation path) both end in SIGABRT and the survival
+message never appears; `--mmap-exec` and `--signal-parent` die with SIGSYS; `--violate` was already covered. The CPU and
+deadline hooks stay on the decode child. No syscall added to `ALLOWED_SYSCALLS`.
+
+Derivation: `derive-seccomp.sh` also traces `fixture verify-max` through `verify --no-seccomp`; the traced set is
+unchanged (`brk exit_group getrandom mmap mremap munmap read write`), the allowlist covers it.
+
+The two misclassifications stay tracked, not fixed (`tests/verify_loop.rs`): a frame header over 64 KiB is reported
+`resource_limit`; an object over the policy is passed without bytes and the verdict lists `caps` then `drawing_missing`
+(its declared size already exceeds the cap), never `size_mismatch`.
diff --git a/docs/development/STORAGE.md b/docs/development/STORAGE.md
index e873dca5..0ef7c77a 100644
--- a/docs/development/STORAGE.md
+++ b/docs/development/STORAGE.md
@@ -267,6 +267,14 @@ unchanged.
worker stops (as the avatar loop). A dead lease (10 minutes) is claimed
again as `verification.worker.lease_expired`; the fifth attempt closes the
round `verification_failed` / `unavailable`.
+- Retry delay (owner decision 2026-11-01): a failure reported by
+ `fail_sheet_verification` makes the round claimable again after 2 s, 5 s,
+ 10 s, 20 s (after attempts 1 to 4), kept in SQL (`not_before`, hidden from
+ the API roles), so the worker never sleeps for it and the claim of another
+ round is not blocked; the effective delay is that delay plus up to one poll
+ interval (`WORKER_POLL_SECONDS`, 2 s). A verdict (failed or not) is never
+ retried; a dead lease is claimed again at once. The worker code is the
+ same as before.
- Measured (2026-11-01): the at-caps document (64 views, 1 024 annotations,
8 192 nodes) verified in 185 ms by the worker on the sandbox, verdict
24 689 bytes; the equine draft in about 60 ms.
@@ -369,7 +377,8 @@ docker run --rm --read-only --cap-drop ALL --security-opt no-new-privileges:true
-e SUPABASE_SERVICE_ROLE_KEY="$(pnpm -s supabase status -o env | sed -n 's/^SERVICE_ROLE_KEY="\(.*\)"/\1/p')" \
faunosteo_worker:dev run
pnpm --filter @faunosteo/supabase test:e2e # real-stack end-to-end (needs the worker above)
-pnpm e2e:avatar # scripts/avatar-e2e.sh: the three lines above in one, worker started with a 5 s sweep and no quarantine grace
+pnpm e2e:avatar # scripts/avatar-e2e.sh: the three lines above in one, worker started with a 5 s sweep and no quarantine grace (DEV: the owner's call)
+pnpm db:sandbox avatar-e2e # the same suite and worker on the throwaway stack (SUPABASE.md §5.1): the check of a storage or worker change
```
`docker compose --profile worker up worker` runs the same container from
diff --git a/docs/development/V1-2_ANATOMICAL_SHEETS.md b/docs/development/V1-2_ANATOMICAL_SHEETS.md
index 29241201..061afa0d 100644
--- a/docs/development/V1-2_ANATOMICAL_SHEETS.md
+++ b/docs/development/V1-2_ANATOMICAL_SHEETS.md
@@ -871,12 +871,13 @@ fingerprint or a document hash from a page.
Job. The round row is the job, with the avatar lease pattern of
`20261013100000_files_foundation.sql` (lease token, `locked_at`, fixed lease,
-attempts below a limit), without backoff. Submission sets the round
-`verifying`. Worker RPCs, service role only (M6):
+attempts below a limit), plus a progressive delay for technical retries only
+(owner decision 2026-11-01). Submission sets the round `verifying`. Worker RPCs, service role only (M6):
- `claim_sheet_verifications(limit)`: `for update skip locked` over rounds
- `verifying` with no live lease; sets the token and `locked_at`, increments
- `attempts`; returns round, version, sheet, revision and token.
+ `verifying` with no live lease and no pending delay (`not_before` null or
+ reached); sets the token and `locked_at`, increments `attempts`, clears
+ `not_before`; returns round, version, sheet, revision and token.
- `get_sheet_verification_input(review_id, lease_token)`: the document at the
round's revision (frozen) and the base document, both as text; the drawings
the document references among the rows registered for the sheet (asset id,
@@ -889,8 +890,17 @@ attempts below a limit), without backoff. Submission sets the round
else answers `stale` or `malformed` and writes nothing. Moves the round to
`open` or to `verification_failed` (§6.5) and audits.
- `fail_sheet_verification(review_id, lease_token, code)`: a technical
- failure; the round stays claimable until the attempt limit, then becomes
- `verification_failed` with outcome `unavailable`.
+ failure; the round stays `verifying` and becomes claimable after a delay
+ that grows with the attempt (2 s after attempt 1, 5 s after 2, 10 s after 3,
+ 20 s after 4; `private.sheet_verification_retry_delay`), kept in the round's
+ `not_before` (a column the API roles cannot read, set here, cleared by the
+ claim); the fifth failure becomes `verification_failed` with outcome
+ `unavailable` and clears it. Nothing is written for a stale call. The delay
+ is persisted, so no worker sleeps and any worker honours it; the effective
+ wait is the delay plus up to one poll interval of the worker (2 s by
+ default). Only these technical failures wait: a validation or integrity
+ refusal is a verdict and is never retried, and a dead lease is claimed again
+ at once (the 10-minute lease is its wait).
Processing. Verification runs as its own mode of the worker image (`run
--jobs sheet-verify`), in its own container under the `worker` compose
@@ -951,9 +961,9 @@ did not pass; the closed codes keep the categories apart.
|---|---|---|---|---|
| Business validation | integrity error, caps exceeded, annotation without geometry, annotation outside its view's frame | `verification_failed`, outcome `failed`, codes `verification.validation.*` and the issues | no | fix the draft, submit again |
| Integrity | strict parse refused, drawing missing, size or sha256 mismatch, SVG refused, needing a removal or outside the stored form (§9.2), `object_conflict` | `verification_failed`, outcome `failed`, codes `verification.integrity.*` | no | fix or upload again; `object_conflict` follows §9.3 |
-| Transient worker error | database or Storage unreachable, worker restart | stays `verifying`, code recorded | yes, up to the limit | automatic |
-| Timeout or resource limit | child over its wall-clock or memory limit | stays `verifying`, code recorded | yes, up to the limit | reduce the document or the drawing if it repeats |
-| Interruption | worker crash, lease expired | claimable again; counts as an attempt | yes, up to the limit | automatic |
+| Transient worker error | database or Storage unreachable, worker restart | stays `verifying`, code recorded | yes, after 2 s, 5 s, 10 s, 20 s, up to the limit | automatic |
+| Timeout or resource limit | child over its wall-clock or memory limit | stays `verifying`, code recorded | yes, same delays, up to the limit | reduce the document or the drawing if it repeats |
+| Interruption | worker crash, lease expired | claimable again at once (the lease was the wait); counts as an attempt | yes, up to the limit | automatic |
| Stale result | completion with an old token, after a withdrawal, or naming another revision | nothing written, logged | no | none needed |
| Definitive failure | attempt limit reached (five; V1-2.3 implements five, for the owner's confirmation) | `verification_failed`, outcome `unavailable`, last code | no | submit again later |
| Core change | release that changes rules or reader | rounds withdrawn by the release migration | no | submit again |
@@ -1705,7 +1715,7 @@ of the document's JSON text in one form, the same for every layer:
|---|---|---|---|
| M4 `sheet_access_hardening` | V1-2.1 | `anatomical_catalog_grants` and its RPCs; `has_mfa`, `grant_active`, `caller_has`; `can_read_official_catalog` and the reader row predicate; `can_edit_sheet` redefined (F14); AR-1 B on the platform role RPCs and the private write functions (F19, §5.7), F17, F18; F1, F2, F3 (fork closed), F5, F6, F8, F9, F12 (every catalogue table), F13, F15; asset-row immutability trigger (F16); historical-sheet protection trigger (§14.2); reader column grants narrowed; personal creation and visibility changes refused | no row changes |
| M5 `sheet_review_workflow` | V1-2.1 | version columns `revision`, `authors`, `source_version_id`, `published_review_id`, `document_fingerprint`; sheet column `working_copy_source_version_id`; revision, author and freeze triggers, the historical-sheet write rule; extended immutability guard (§6.8); rounds, comments, acknowledgments; `create_official_sheet`, `create_sheet_draft` adapted, `save_sheet_draft`, submit, withdraw, comment, acknowledge, decide, publish; `create_sheet_working_copy`; species RPCs; catalogue and version read RPCs; upload: `register_sheet_asset` extended, `confirm_sheet_asset_upload` with the storage check (F7), INSERT policy, bucket limit 2 MiB; mirror removal and status check (§12.2); superseded signatures dropped; the content-size CHECK replaced by the text measure (`octet_length(content::text)`, §12.2) | new columns take their defaults on the equine v1 row (`revision` 0, empty author set); its document, status, number and assets unchanged; the new size CHECK is validated against the existing rows when M5 is applied (the equine document measures 184 105 bytes as `content::text`, measured on the sandbox); bucket limit lowered; no round, no grant |
-| M6 `sheet_verification_jobs` | V1-2.3 | worker RPCs (claim, input, complete with the verdict structure check, fail), service role only; 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 |
+| 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 »); 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 |
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
@@ -2021,8 +2031,9 @@ The final approval needs all 30 groups acknowledged, no `to_confirm` and no
- Worker: the verification mode, verdicts accepted and each failure, the
hostile SVG corpus in the sandboxed child, per-command limits and watchdog,
the purge guard by bucket, sandbox tests and seccomp derivation, an e2e on
- the sandbox stack with the verification worker running; `pnpm e2e:avatar`
- unchanged in outcome; `pnpm e2e:sheet-assets` targets DEV only, its rerun
+ the sandbox stack with the verification worker running; the avatar suite
+ unchanged in outcome on the sandbox (`pnpm db:sandbox avatar-e2e`, owner
+ decision 2026-11-01: `pnpm e2e:avatar` targets DEV and is not run); `pnpm e2e:sheet-assets` targets DEV only, its rerun
is an owner step (§16.11).
- Release replay: a script loads every published version and drawing of a
stack through the new core and fails on any regression.
diff --git a/packages/supabase/src/database.types.ts b/packages/supabase/src/database.types.ts
index a1aca73c..ac6a44a0 100644
--- a/packages/supabase/src/database.types.ts
+++ b/packages/supabase/src/database.types.ts
@@ -227,6 +227,7 @@ export type Database = {
id: string
lease_token: string | null
locked_at: string | null
+ not_before: string | null
revision: number
round: number
status: Database['public']['Enums']['sheet_round_status']
@@ -256,6 +257,7 @@ export type Database = {
id?: string
lease_token?: string | null
locked_at?: string | null
+ not_before?: string | null
revision: number
round: number
status?: Database['public']['Enums']['sheet_round_status']
@@ -284,6 +286,7 @@ export type Database = {
id?: string
lease_token?: string | null
locked_at?: string | null
+ not_before?: string | null
revision?: number
round?: number
status?: Database['public']['Enums']['sheet_round_status']
diff --git a/packages/supabase/tests/db/schema-types.test.ts b/packages/supabase/tests/db/schema-types.test.ts
index 9732444e..18edfa3c 100644
--- a/packages/supabase/tests/db/schema-types.test.ts
+++ b/packages/supabase/tests/db/schema-types.test.ts
@@ -100,6 +100,7 @@ const expectedColumns = {
'id',
'lease_token',
'locked_at',
+ 'not_before',
'revision',
'round',
'status',
diff --git a/packages/supabase/tests/sandbox/sheet-verification.sandbox.ts b/packages/supabase/tests/sandbox/sheet-verification.sandbox.ts
index d451eb48..9af9cb61 100644
--- a/packages/supabase/tests/sandbox/sheet-verification.sandbox.ts
+++ b/packages/supabase/tests/sandbox/sheet-verification.sandbox.ts
@@ -229,6 +229,112 @@ const avatarsAndPurges = () =>
|| ' ' ||
(select count(*) || ':' || md5(coalesce(string_agg(row_to_json(q)::text, ',' order by q.id), '')) from private.object_purge_queue q)`)
+const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
+/** An id read back from the stack, checked before it is interpolated into SQL. */
+function uuidOf(value: unknown): string {
+ if (typeof value !== 'string' || !UUID.test(value)) throw new Error(`not a uuid: ${String(value)}`)
+ return value
+}
+
+/** `octet_length(value::jsonb::text)` of a value whose strings need no JSON escape (crates/core/src/domain/sheet/size.rs). */
+function jsonbBytes(value: unknown): number {
+ if (value === null) return 4
+ if (typeof value === 'boolean') return value ? 4 : 5
+ if (typeof value === 'number') return String(value).length
+ if (typeof value === 'string') return Buffer.byteLength(value) + 2
+ if (Array.isArray(value)) return 2 + value.reduce((n: number, v) => n + jsonbBytes(v), 0) + 2 * Math.max(0, value.length - 1)
+ const entries = Object.entries(value as Record)
+ return 2 + entries.reduce((n, [k, v]) => n + jsonbBytes(k) + 2 + jsonbBytes(v), 0) + 2 * Math.max(0, entries.length - 1)
+}
+
+/**
+ * A drawing of exactly `size` bytes in the stored form (`serialize::stored_form`): the UTF-8
+ * prolog and one `