Commit Graph
5 Commits
Author SHA1 Message Date
vhaudiquet 24bade82ec build_profile,deb,sandbox,test: move phases and profiling out of deb
CI / build (push) Successful in 1m42s
CI / test (push) Skipped
CI / publish (push) Skipped
CI / snap (push) Successful in 2m45s
CI / release (push) Skipped
`Phase`, its classifier selection and `BuildProfiler` described the
build flow from inside `deb`, so `sandbox` had to import them from
`deb` to announce chroot work. Moving them to `src/build_profile.rs`
leaves `sandbox` depending on `deb` only for the session record.

`PhaseTiming` and `BuildProfile` move with the profiler, since they are
the record shape it produces. `deb` re-exports `Phase` and `session`
re-exports the record types, so their public paths stay the same.
2026-11-25 07:40:46 +01:00
vhaudiquet 674b99b00b docs: describe the implemented sandbox architecture
CI / build (push) Successful in 1m40s
CI / test (push) Skipped
CI / publish (push) Skipped
CI / snap (push) Successful in 2m39s
CI / release (push) Skipped
Update the design doc to the shipped shape: the public API, the module
layout, the crate-private Unshare constructors and what the conformance
tests actually cover. Refresh the AGENTS.md scope list and the test
mode wording in the README and CLI.

Rename the last context-named helpers (new_with_base,
unshare_test_sandbox, RunEnv) and the comments that still described the
old abstraction.
2026-11-24 18:35:17 +01:00
vhaudiquet 483e532baf sandbox,deb,test: run builds through the Sandbox trait
Build and test code now takes Arc<dyn Sandbox>. Context implements the
trait as a bridge for the unshare driver, so the callers move in one
commit without rewriting the driver first.

Staging goes through stage_tree with explicit ReuseState upper and work
paths. The sources backup writes its copy explicitly, and is_host keeps
the keyring cache ownership check on the host only.
2026-11-24 18:35:17 +01:00
vhaudiquet f1a21e0923 sandbox: add the Sandbox trait and the host backend
Build code needs an interface it can receive explicitly instead of a
global context. Add the 11-method Sandbox trait, the command description
and builder, the transfer options, and the shared stage_tree helper that
owns VCS pruning.

Host implements the trait with std::process and std::fs. A conformance
test runs against it and pins the command contract through an
Arc<dyn Sandbox>.
2026-11-24 18:35:17 +01:00
vhaudiquet bf88ce4f4d docs: spec the Sandbox trait that replaces Context
Replace the context settings, globals and driver chain with a public
Sandbox trait that build code receives explicitly. Unshare is the
ephemeral chroot backend, Host serves local tests, and Ecrou is the
future microVM backend.

The transfer API keeps the trait small: put, get, remove and the
in-sandbox file operations. stage_tree is a helper that owns the
source-tree policy, including VCS pruning and optional resume state.
2026-11-24 18:35:17 +01:00