feat(supabase): verification retry by effective cause

resource_limit (intrinsic to the frozen input: frame, input or output cap,
SIGXCPU, SIGABRT, SIGSYS) and verdict_refused close the round at the first
occurrence; timeout, unavailable (now also an external SIGKILL) and
lease_expired keep the 2/5/10/20 s retries up to five attempts. pgTAP 021: 89;
sandbox case k closes at attempt 1.
This commit is contained in:
bchanot committed 2026-11-01 23:01:30 +01:00
1 parent c98a9c8f82
commit a5844b9d56
8 files changed
+156 -46

No files matched your search

+26
View File
@@ -4567,3 +4567,29 @@ through `is distinct from`, service role only) fixed in the three round RPCs, pg
sandbox `test-db` 1 880 PASS, `types --check` equal and `verify-e2e` 10/10 on a fresh stack and on the upgrades from
before M6 and from before M4 (the DEV path); `avatar-e2e` 5/5; `test` 87 and `e2e:shell` 86 (rerun on the final M6
after the verifier's ECARTS(2): the earlier run predated the fix); DEV untouched.
Retry by effective cause (owner brief 2026-11-01, closure C1). SQL holds the code policy
(`private.sheet_worker_final_codes`: `resource_limit`, `verdict_refused` close the round at the first
occurrence, `closed_by` `definitive` in the audit; the others retry 2, 5, 10, 20 s up to five attempts,
`closed_by` `attempt_limit`); the worker maps the cause to the code (`verify_job::classify_child`,
`signal_code`), as implemented:
| Child end | Code | Policy |
|---|---|---|
| frame refused by the parent (header over 64 KiB) | `resource_limit` | definitive |
| `Rejected` (input over the child cap) | `resource_limit` | definitive |
| `OutputOverflow` | `resource_limit` | definitive |
| SIGXCPU (CPU budget; the hard limit is two seconds after the soft one, so the budget shows as SIGXCPU) | `resource_limit` | definitive |
| SIGABRT (memory budget, abort) | `resource_limit` | definitive |
| SIGSYS (seccomp filter) | `resource_limit` | definitive |
| SIGKILL or any other signal (OOM killer, stop: from outside; the parent's own kills are `Timeout` and `OutputOverflow`) | `unavailable` | transient |
| `Timeout` (wall clock) | `timeout` | transient |
| transport, Storage | `unavailable` | transient |
| `Broken`, `Failed` | `unavailable`, then the worker stops | transient |
| verdict answered `malformed` | `verdict_refused` | definitive |
| dead lease | `lease_expired` (set by the claim) | transient, immediate |
What changes for the codes: a SIGKILL is now reported `unavailable` (it was `resource_limit`); the
outcome (`unavailable`) and the code list are otherwise unchanged. A definitive round closes after one
child run instead of five identical ones. Still tracked and open: the header over 64 KiB is reported
`resource_limit` where `caps` would name it (test `tracked_a_header_over_64_kib_is_reported_resource_limit`).