diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 35 |
1 files changed, 26 insertions, 9 deletions
@@ -55,6 +55,8 @@ src/ source digests, staleness derivation review/ candidates, diff panels, risk scoring, approval pipeline/ the step machine, the dispatcher + worker pool, publishing + sandbox/ where build code runs: the backend seam, loopback, remote + agent protocol + agent binary, kata adapter, failure fakes pkgver/ vercmp and the dependency-string grammar pkginfo.rs .PKGINFO / .BUILDINFO parsing (no libalpm) http/ tiny_http server: routes, render, auth, SSE log tail @@ -71,13 +73,17 @@ docs/ DECISIONS.md, INVARIANTS.md `cargo test` runs the whole thing on an ordinary user account. Two mechanisms make that possible (§16a): -* **PATH shims.** `src/bin/` contains `makepkg`, `makechrootpkg`, `mkarchroot`, - `repo-add`, `gpg` and `pacman`. Pointing `path_prepend` at the directory cargo - built them into makes the *unmodified* pipeline drive a fake toolchain: it - still runs real subprocesses, still reads their stdout and exit codes, still - gets real `.pkg.tar.zst` files with real `.PKGINFO` and `.BUILDINFO` inside - them, and still signs them with a fake key. The step machine cannot tell it is - not in a chroot, which is the point. +* **PATH shims.** `src/bin/` contains `makepkg`, `pacman`, `repo-add` and + `gpg` — the tools the pipeline actually shells out to now that builds run + in provisioned sandboxes — plus `mkarchroot` and `makechrootpkg`, kept as + stand-ins for the real devtools so the shim protocol itself stays + exercised. Pointing `path_prepend` at the directory cargo built them into + makes the *unmodified* pipeline drive a fake toolchain: it still runs real + subprocesses, still reads their stdout and exit codes, still gets real + `.pkg.tar.zst` files with real `.PKGINFO` and `.BUILDINFO` inside them, + and the fake `pacman -U` refuses bytes that do not hash to the digest + their name claims. The step machine cannot tell it is not in a sandbox, + which is the point. * **The fixture corpus.** `testcorpus/` holds ~20 synthetic packages, each with a `PKGBUILD` and a manifest describing what the shims should emit: a split pkgbase, a build that fails, a recipe whose payload drifts under a `SKIP` @@ -90,6 +96,15 @@ process mid-step, and a separate test spawns the compiled binary and kills *it*, then asserts a fresh process resumes from the step checkpoints with no duplicate work and the old index still byte-identical. +The sandbox seam (§8a of the design) is tested the same way — the interface is +executed, not mocked: `tests/remote_agent.rs` drives a **full build over the +real agent protocol** (frames, rendezvous, log streaming, blob round-trip, +bad-token refusal) against the shims on a loopback socket, and +`tests/failure_modes.rs` runs a `FakeBackend` that breaks sandboxes on +purpose: dies mid-run (lease expiry → reaper → requeue), TTL bites mid-build, +pool at quota (the build blocks on `sandbox-pool`, it does not fail), and a +sandbox whose `pacman -Q` lies (fail-closed world mismatch). + All of it is behind a `test-support` feature, which `cargo test` turns on through its dev-dependency on this crate and `cargo build` does not turn on at all: the shim binaries are not built, the `TestHooks` type has no fields, and the @@ -101,8 +116,10 @@ than failing: * `versions::vercmp_matches_the_system_oracle` needs pacman's `vercmp` on `PATH` and compares the hand-written comparator against it over ~1100 pairs. -* The real-chroot tier needs root, network and devtools. It is recorded as - skipped in `docs/DECISIONS.md` rather than silently absent. +* The live kata tier needs `/dev/kvm` and a cluster (`AUR_KATA_API`); the kata + rendezvous and TTL logic itself runs everywhere via a real `sandbox-agent` + process with no VM. The old real-chroot tier retired with devtools; what it + caught is recorded in `docs/DECISIONS.md` rather than silently absent. ## Operations |
