Repository navigation
Commit 8b03630
[green] reopen C3 post-OI NVS evidence at every stage
Turn the amended C3 NVS-receipt RED (51e9124) green per the v0.6.0
handoff's five-point robust design, without weakening any red:
1. Capture before evaluation: the verify-mode runner captures the raw
NVS slice immediately after the full OI workload — after
collect_observation, inside the still-open run resources, strictly
before evaluate_thresholds and the output write. The read-only RUN
probe (esp32.Partition, no NVS API import) streams the partition
base64-encoded; the slice and acquisition log are written as
exclusive mode-0600 files. The capture CLI pair
--post-oi-nvs-slice/--post-oi-nvs-acquisition-log is C3 verify-only
and required together.
2. Exact slice identity: validate_c3_post_oi_nvs_slice (bench) and the
gate's private twin admit only offset 0x9000, size 0x6000, 24,576
bytes, all 0xff, SHA-256 1df8949b...cdaba2.
3. Candidate binding: the C3 private result now embeds a post_oi_nvs
binding whose summary carries the candidate release and firmware
digests, the exact OI raw-log digest, 10 reset samples, the frozen
geometry, slice and acquisition-log digests/lengths, integrity, and
an empty written-namespace list; the receipt digest is recomputed
from the canonical empty-inventory receipt, never copied.
4. Reopen-and-re-hash everywhere: create_result_file (creation),
create_hil_completion_fragment (completion), and
finalize_public_bundle (finalization) each reopen the exclusive
mode-0600 receipt/slice/log trio — completion and finalization at
the frozen sibling paths of the private result — re-derive every
digest from the reopened bytes, re-verify the fully erased identity,
and cross-check the retained OI raw-log digest and reset count
against the bound observation via the new
validate_c3_result_for_observation seam. Hand-written results and
copied summaries are never trusted; both writers re-verify the
evidence again before preserving output.
5. Diagnostics never mint: a capture that is not the exact erased
slice is retained on disk for diagnosis but fails the run/writer;
threshold evaluation stays upstream of any result write.
The FinalizationFixture's hand-built C3 result is brought up to the
amended frozen contract (embedded binding plus the sibling evidence
trio) so the real finalizer path keeps exercising it end to end. The
Pico writer/validator paths reject the new evidence inputs; public
summaries are unchanged and still carry no private receipt body.
Witnessed: test_v060_qualification_workflow 19 OK (was failures=5,
errors=6); test_release_v060_private_gates 18 OK (was failures=2,
errors=4); full harness 67 files, 10 failed — exactly the pre-existing
environmental set (missing firmware/upstream checkout, cwd-dependent
imports), with test_release_finalization 21 OK, waveshare gate 21 OK,
oi1 benches 78/15 OK, release contract 12 OK unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAVghCmvKjF4BZFBUjAMwc
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>1 parent 2cea801 commit 8b03630
5 files changed
Lines changed: 918 additions & 4 deletions
File tree
- firmware
- qualification
- scripts
- tests/firmware_tests
- hil
- host
0 commit comments