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:
1 parent
c98a9c8f82
commit
a5844b9d56
8 files changed
+156
-46
No files matched your search
@@ -261,20 +261,26 @@ unchanged.
|
||||
- Completion: `complete_sheet_verification` answers `passed`, `failed`,
|
||||
`stale` (nothing written, logged) or `malformed` (reported
|
||||
`verification.worker.verdict_refused`). Child timeout →
|
||||
`verification.worker.timeout`; a signal, an output overflow or an input over
|
||||
its cap → `verification.worker.resource_limit`; a transport error →
|
||||
`verification.worker.unavailable`; a broken child → `unavailable`, then the
|
||||
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`.
|
||||
`verification.worker.timeout` (transient); SIGXCPU, SIGABRT or SIGSYS (the
|
||||
child's own CPU, memory and seccomp budgets), an output overflow or an input
|
||||
over its cap → `verification.worker.resource_limit` (definitive: the frozen
|
||||
input gives the same end every time); any other signal, SIGKILL first (the
|
||||
OOM killer or a stop, from outside) and a transport error →
|
||||
`verification.worker.unavailable` (transient); a broken child →
|
||||
`unavailable`, then the worker stops (as the avatar loop). A dead lease (10
|
||||
minutes) is claimed again as `verification.worker.lease_expired`. Retry by
|
||||
cause: `resource_limit` and `verdict_refused` close the round
|
||||
`verification_failed` / `unavailable` at the first occurrence; the other
|
||||
codes retry up to the fifth attempt, which closes it the same way.
|
||||
- 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.
|
||||
retried; a dead lease is claimed again at once. Only the transient codes
|
||||
wait: the delay applies to `timeout`, `unavailable` and `lease_expired`
|
||||
(SQL decides, `private.sheet_worker_final_codes`).
|
||||
- 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.
|
||||
|
||||
Reference in new issue
Block a user