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:
1 parent
926dd7df8c
commit
0410af0c35
18 files changed
+2921
-42
No files matched your search
@@ -1,15 +1,25 @@
|
||||
//! `faunosteo-worker` library: the pieces the binary, the tests and the R1 job loop share.
|
||||
//! `faunosteo-worker` library: the sandboxed decode child (R0) and the keyed job loop (R1).
|
||||
//!
|
||||
//! Process model (review Part IV.1): a keyed parent spawns the same binary as `decode`, a
|
||||
//! child with an empty environment that confines itself (rlimits + seccomp) before reading
|
||||
//! one image on stdin and writing one 512 × 512 WebP on stdout. The parent never decodes:
|
||||
//! it checks the container header of what comes back (`webp_check`).
|
||||
|
||||
pub mod backend;
|
||||
pub mod config;
|
||||
pub mod decode;
|
||||
pub mod decoder;
|
||||
pub mod exit_codes;
|
||||
#[cfg(feature = "test-hooks")]
|
||||
pub mod fixtures;
|
||||
pub mod http;
|
||||
pub mod job;
|
||||
pub mod keys;
|
||||
pub mod limits;
|
||||
pub mod log;
|
||||
pub mod run;
|
||||
pub mod sandbox;
|
||||
pub mod spawn;
|
||||
pub mod sweep;
|
||||
pub mod watchdog;
|
||||
pub mod webp_check;
|
||||
Reference in new issue
Block a user