Expand description
Verified private worker images, reused under a settled complete stat stamp (ADR 0082, ADR 0173).
Every native job runs a private copy of the installed worker whose bytes were hashed against the installation manifest, so a later change to the installed file cannot change what runs. Hashing and copying the 76 MB worker cost about 100 ms per job (#765). This module keeps one verified copy per installed worker in a per-user private directory and reuses it while both files keep their recorded complete stamps:
- The installed worker’s stamp (device, inode, size, mode, mtime and
ctime with nanoseconds) is recorded only when it was settled
(
Stamp::settled) before the bytes were read and is unchanged after they were hashed. Any later write, replacement,chmodorutimesadvances ctime, so the next job misses and verifies the bytes again. - The private copy is mode
0500in a mode0700directory owned by this user. Its own complete stamp, owner and link count must still equal the ones recorded right after it was written; writing it needs achmodfirst, which changes ctime.
Anything unexpected (another owner, a symbolic link, wider permissions, an unreadable or foreign record, a different source path or digest) misses, and the job uses a fresh verified copy of its own exactly as before. A miss never fails a job that would otherwise run.
Structs§
- Image
- A verified private copy of the worker, ready to execute.