prove_local ran the operator's engine under PowerMeter::detect() alone: machine-wide, and on macOS 27 the wall x TDP estimator. On macOS the engine is now spawned suspended (posix_spawn START_SUSPENDED), a TreeMeter rooted at it reads the start walk before it runs its first instruction, it is resumed with SIGCONT, and its exit is waited for without reaping (waitid WNOWAIT) so its exited record is read before the reap. The machine-wide span still covers the whole run. Which records the JCR-1 cell carries is decided by SPEC section 6: one record per class used, no coverage field, HwShunt claiming the class's hardware reading, accelerator energy neither omitted nor folded into Cpu. So the tree reading is sealed, as the run's only record (Cpu, HwShunt), only when it has no gap of any kind and the operator declared the engine self-contained (new LocalInferenceInputs::engine_self_contained; CLI SANDBOX_LOCAL_SELF_CONTAINED=1); otherwise the machine-wide records stand, verbatim, as before. A Cpu HwShunt record of a partial reading would claim the class's whole energy, and a tree Cpu record beside the estimator for "the rest" cannot be built: the estimator is one whole-run Cpu figure. On this kernel a run-to-completion engine is never read whole: its root exits in the span and an exiting thread's last time on a core is never folded into its record (TreeGap::Exited). So the cell keeps the machine records, and the tree's reading and why it was not sealed are printed beside the proof. Measured: awk burning a fixed loop read exactly the oracle's advance (proc_pid_rusage raw, suspended to exited) with Exited as its only gap; sh reaping its awk worker read with ReapedDescendant named. Co-Authored-By: Claude Opus 5.5 <[email protected]>
37 lines
1.2 KiB
TOML
37 lines
1.2 KiB
TOML
[package]
|
|
name = "sandbox-proof"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
description = "Sandbox — the proof-matrix harness: prove the standard runs (conformance + a sealed run) on a target and emit a signed proof cell."
|
|
|
|
[[bin]]
|
|
name = "sandbox-proof"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
sandbox-schema.workspace = true
|
|
sandbox-capability.workspace = true
|
|
sandbox-meter.workspace = true
|
|
sandbox-attest.workspace = true
|
|
sandbox-runtime.workspace = true
|
|
sandbox-exec-wasm.workspace = true
|
|
sandbox-exec-microvm.workspace = true
|
|
sandbox-tee.workspace = true
|
|
sandbox-conformance.workspace = true
|
|
ed25519-dalek.workspace = true
|
|
serde = { workspace = true }
|
|
serde_json.workspace = true
|
|
ureq.workspace = true
|
|
hex.workspace = true
|
|
blake3.workspace = true
|
|
thiserror.workspace = true
|
|
|
|
# macOS: the local engine is spawned suspended (posix_spawn), so its tree
|
|
# meter's start walk is read before it runs, and waited for without reaping
|
|
# (waitid WNOWAIT), so its exited record is read before it goes. The tests'
|
|
# oracle reads proc_pid_rusage into a raw buffer with it too.
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
libc = "0.2"
|