feat(worker): R1 job loop — claim, download, sandboxed decode, clean upload, commit, purge sweeps

Keyed parent on ureq 3 (rustls + ring, bundled roots), no async runtime:
config from the environment (secret never printed, JWT expiry logged), JSON
line logs with a field allowlist (child stderr escaped and truncated), strict
key validation before any URL, Backend trait over PostgREST RPCs and Storage
objects with closed error kinds, one job per claim with the STORAGE.md §3.4
mapping (content codes, processing_error on signals / timeout / overflow,
Broken stops the loop with exit 20, a refused commit deletes nothing), sweeper
(expire pending, purge queue, quarantine leftovers), per-stage watchdog
(exit 21), WORKER_ONCE for tests, run --check extended. 11 loop tests on a
fake backend and decoder; sandbox tests and seccomp derivation unchanged
(the child still makes the same 7 syscalls); image 11.6 MB.
This commit is contained in:
bchanot committed 2026-10-13 19:32:38 +02:00
1 parent 926dd7df8c
commit 0410af0c35
18 files changed
+2921 -42

No files matched your search

+5 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "faunosteo-worker"
description = "Faunosteo file-processing worker: job loop (R1) and the sandboxed decode child (R0 proof)"
description = "Faunosteo file-processing worker: keyed job loop and sweeper (R1), sandboxed decode child (R0)"
version.workspace = true
edition.workspace = true
license.workspace = true
@@ -26,6 +26,10 @@ libwebp-sys.workspace = true
seccompiler.workspace = true
rlimit.workspace = true
libc.workspace = true
serde.workspace = true
serde_json.workspace = true
ureq.workspace = true
sha2.workspace = true
crc32fast = { version = "1.4", optional = true }
# Already in the tree through png: used by the iCCP-bomb fixture only.
flate2 = { version = "1.1", optional = true }