Expand description
Bundle loading and the five rejections #5441’s preflight owes.
Why: #5441 asks for “a lightweight preflight that rejects stale runner
paths, missing provenance, mock-only evidence, incomplete L1-L3 coverage,
and results produced by a different Trusty Code build”. Those five are
stated as properties of retained evidence, so all five are decidable
offline from the bundle plus a handful of pins — no model, no runner, no
network.
What: load_bundle reads <root>/L1..L3, and preflight applies the
per-level rules (artifacts present and non-empty, metadata parses and agrees
with its own tcode_report.json, evidence is real, provenance is complete,
neither checkout was dirty) and the cross-level rules (one build, one
runner, one challenge revision, one set of source digests) plus the caller’s
Pins. Reading is deliberately tolerant of extra files and extra JSON
keys, and intolerant of absent ones.
Test: bakeoff::tests::* — one test per rule.
Structs§
- Bundle
- A retained bake-off bundle, as far as it could be read.
- Level
Evidence - One level’s readable evidence.
- Pins
- Identities the caller is asserting the evidence must match.
Functions§
- load_
bundle - Read
<root>/L1,<root>/L2and<root>/L3. - preflight
- Apply every preflight rule to a candidate bundle.