summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-19 11:49:50 +0000
committeraur-build <aur-build@localhost>2026-11-19 11:49:50 +0000
commit2eb4500f089154b982f7c5dbbc7f1efbfd702ed5 (patch)
tree6af449ea55d1dba0d3b8d685cf591ebec8d77eac /src/config.rs
parent3374ffd34921e1de414e8b07f69753113f5ba5f9 (diff)
downloadaur-build-2eb4500f089154b982f7c5dbbc7f1efbfd702ed5.tar.gz
aur-build-2eb4500f089154b982f7c5dbbc7f1efbfd702ed5.zip
sandbox: kata backend — ad-hoc TTL sandboxes over the agent protocol
The kata lease path is composition, not a new protocol: acquire mints a rendezvous nonce, asks a Provisioner for a sandbox pointed at this hub, and leases only the dial-in whose hello carries that nonce back. A box that never dials in is a TTL expiry — the same vocabulary every other failure here speaks (I5) — and a stray box that greets with a nonce nobody ordered is dropped unread, never leased. Two payload shapes are constructed as pure, unit-tested functions because both are real targets: an agent-sandbox-style Kubernetes CR (runtimeClass kata, activeDeadlineSeconds so the orchestrator enforces the TTL even if the hub dies) and a nerdctl/containerd argv for hosts without a cluster. The K8s provisioner is real ureq code exercised only by the gated live tier, which skips with a printed note wherever /dev/kvm or AUR_KATA_API is absent — the recorded-skip convention, not a silent pass. The rendezvous and TTL logic runs for real on any machine via LocalAgentProvisioner: a real sandbox-agent process, real frames, real nonce matching, no VM. That is the same honesty as the loopback backend — the interface is under test, not a mock of it.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 864540c..bda99e9 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -54,6 +54,9 @@ pub struct Config {
/// untrusted the moment it boots; this token is the only thing telling
/// the hub "you belong to me" — deploy it like one.
pub agent_token: String,
+ /// Image a provisioned sandbox boots (the `sandbox-agent` entrypoint).
+ /// Only consulted by provisioning backends (kata).
+ pub sandbox_image: String,
/// Test-only hooks (§16a). Not part of the production configuration at all
/// unless the crate is built with `test-support` — see [`TestHooks`].
#[cfg(feature = "test-support")]
@@ -145,6 +148,7 @@ impl Default for Config {
sandbox_backend: "loopback".into(),
agent_listen: String::new(),
agent_token: String::new(),
+ sandbox_image: "aur-build-sandbox:latest".into(),
#[cfg(feature = "test-support")]
hooks: TestHooks::default(),
max_concurrent_builds: 1,