nx_sevenz_gate.nx
buildroot/runtime/nx_sevenz_gate.nx
about
nx_sevenz_gate.nx -- THE 7z READER GATE (/compare/modding MD29 sz_walk, 2026-09-06). The subjects are two REAL archives mirrored
from the py7zr test corpus (knowledge/fetched/cmp_modding_py7zr_test_1.7z, an LZMA2 archive with an encoded header, and
cmp_modding_py7zr_copy.7z, a Copy-coder archive), never a fixture this lane authored -- a reader tested only on archives its
author wrote proves it can read its author. The oracle is the archive's OWN per-member CRC-32 digests written by the outside
encoder: every data member must decode to exactly its declared size AND hash to the digest the archive carries, through the
decoder nx_lzma_lib and the container reader nx_sevenz_lib, with nothing third-party in the path. Named refusals are
planted at runtime (a cut container, a forged start-header CRC, a forged header CRC, a corrupted packed byte) and each must be
refused by NAME, never read clean. The rung's done-rule fixture (an OBJ, its MTL, four PNG maps, a VMD) is written by the
estate's own Copy-coder writer and must walk to the SAME typed partition MD1's zip fixture reaches, through the lib and
through the bundle walker that dispatches on the magic. The command is a second witness through the ladder live -> staged ->
build fossil, and an extract is re-hashed by the SAME crc32 the archive used.
usage: nx_sevenz_gate (no args)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_bundle_ingest_lib.nxnx_sevenz_lib.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
| 20 | const ZG_DIR: *u8 = "/tmp/nx_sevenz_gate" |
| 21 | const ZG_T1: *u8 = "knowledge/fetched/cmp_modding_py7zr_test_1.7z" |
| 22 | const ZG_CP: *u8 = "knowledge/fetched/cmp_modding_py7zr_copy.7z" |
| 23 | const ZG_CUT: *u8 = "/tmp/nx_sevenz_gate/cut.7z" |
| 24 | const ZG_BADSTART: *u8 = "/tmp/nx_sevenz_gate/badstart.7z" |
| 25 | const ZG_BADHDR: *u8 = "/tmp/nx_sevenz_gate/badhdr.7z" |
| 26 | const ZG_BADPACK: *u8 = "/tmp/nx_sevenz_gate/badpack.7z" |
| 27 | const ZG_TYPED: *u8 = "/tmp/nx_sevenz_gate/typed.7z" |
| 28 | const ZG_M0: *u8 = "/tmp/nx_sevenz_gate/member0.bin" |
| 29 | const ZG_ELF_LIVE: *u8 = "./nx_sevenz.elf" |
| 30 | const ZG_ELF_STAGE: *u8 = "./nx_sevenz.sov.elf.new" |
| 31 | const ZG_ELF_BUILD: *u8 = "buildroot/_build/nx_sevenz.sov.elf" |
| 32 | const ZG_BI_LIVE: *u8 = "./nx_bundle_ingest.elf" |
| 33 | const ZG_BI_STAGE: *u8 = "./nx_bundle_ingest.sov.elf.new" |
| 34 | const ZG_BI_BUILD: *u8 = "buildroot/_build/nx_bundle_ingest.sov.elf" |
| 35 | const ZG_DIR_MODE: i64 = 493 |
| 36 | const ZG_FILE_MODE: i64 = 420 |
| 37 | const ZG_CAP: i64 = 65536 |
| 38 | const ZG_NAMES_HEADROOM: i64 = 4096 |
| 39 | const ZG_ST_N: i64 = 8 |
| 40 | const ZG_START_CRC_OFF: i64 = 8 |
| 41 | const ZG_FIRST_PACK_OFF: i64 = 32 |
| 42 | const ZG_TYPED_N: i64 = 7 |
| 43 | const ZG_PNG_LEN: i64 = 40 |
| 44 | const ZG_VMD_LEN: i64 = 30 |
| 45 | const ZG_VMD_MAGIC_LEN: i64 = 25 |
| 46 | const ZG_TYPED_CAP: i64 = 4096 |
functions
| 48 | func zg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 49 | func zg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 50 | func zg_write_file(path: *u8, b: *u8, n: i64) -> i64 |
| 59 | func zg_twin(b: *u8, n: i64, flip_off: i64, path: *u8) -> *u8 |
| 68 | func zg_walk(b: *u8, n: i64, out_tbl: *i64, out_names: *i64, st: *i64) -> i64 |
| 82 | func zg_census(tbl: *i64, m: i64, res: *i64) -> i64 |
| 105 | func zg_ladder(live: *u8, stage: *u8, build: *u8) -> *u8 |
| 112 | func main(argc: i64, argv: *i64) -> i64 |