nx_gcode_manifest_test.nx
buildroot/runtime/nx_gcode_manifest_test.nx
about
nx_gcode_manifest_test.nx -- exercise manifest emit + finalize
+ determinism on synthetic blobs.
Closed-form invariants:
(a) Fresh manifest contains the magic line.
(b) After add_blob x 4, the buffer grew + non-empty.
(c) Finalize sets finalized=1 and appends the self-hash line.
(d) Post-finalize, add_blob returns -2 (refused).
(e) Two manifests built with the same inputs produce
byte-identical buffers (determinism for reproducible builds).
(f) Tampering with the buffer breaks the self-attestation:
recomputing blake2b over the pre-final bytes no longer
matches the embedded final hash.
expect_exit: 0
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_blake2b.nxnx_gcode_manifest.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 23 | func build_manifest(b1: *u8, l1: i64, b2: *u8, l2: i64, |
| 33 | func main() -> i64 |