Expand description
Convention for a remote forge step’s durable produced artifacts.
A remote build (e.g. the rusty_v8 musl build on a build-worker) writes its
output tarball to a path inside the container. The container’s rootfs is
destroyed when kamaji reaps the EXITED container — so if the camp daemon is
down when the build finishes, the artifact is gone before boot-reconcile can
retrieve it (R603-T4 surfaced this as Success-but-UNPUBLISHED).
The fix (R603-T5) is a host-persistent bind mount: forge Subprocess
workloads mount [HOST_ROOT]/<forge_id> onto [CONTAINER_DIR], so a
build that writes its produces under /yah/produced lands the bytes on
the worker’s host filesystem. yubaba then reads them back from the host path
([host_path]) — which outlives container reaping — instead of the
unreachable container rootfs.
The container-side path and the host root are a shared convention between
three crates: the qed build_workload_spec that adds the mount, kamaji that
binds it, and the yubaba handler that reads + reaps it. Keeping it here (the
crate all three already depend on) is the single source of truth.
Constants§
- CONTAINER_
DIR - Conventional container-side directory a remote forge step writes its durable produced artifacts to. Bind-mounted onto a host-persistent dir.
- HOST_
ROOT - Host root under which each forge’s durable produced dir lives, one
subdir per run:
<HOST_ROOT>/<forge_id>/. yubaba owns this directory — it creates the per-forge subdir at deploy, serves reads from it, and reaps it on teardown / TTL sweep.
Functions§
- durable_
mount - The durable produced-dir bind mount for a forge run: host
<HOST_ROOT>/<forge_id>→ containerCONTAINER_DIR, writable. - forge_
id_ from_ ident - Forge mesh idents are
forge.<id>(seeWorkloadSpec::for_forge). Extract the bare<id>, orNonefor a non-forge ident. - host_
dir - The host-persistent produced directory for one forge run.
- host_
path - Translate a container-side produced path to its durable host path for a
given forge run. Returns
Nonewhencontainer_pathis not underCONTAINER_DIR(the caller then knows the artifact was not written to the durable location and won’t survive reaping), or when the relative path contains a..component (a traversal attempt that could escape the per-forge dir — the reader must never serve a file outside it). - is_
durable_ path - True when
pathis (or is under) the conventional durable produced dir — the guard qed uses to enforce that declaredproducesland somewhere reap-durable.