nx_asset_prov_gate.nx
buildroot/runtime/nx_asset_prov_gate.nx
about
nx_asset_prov_gate.nx -- THE PROVENANCE-ROW GATE (/compare/modding MD9, 2026-09-06). Drives nx_asset_prov_lib IN-PROCESS
on a scratch journal under /tmp/nx_asset_prov_gate/ (never the production journal), with fixtures built at runtime and
the journal UNLINKED at setup so every run measures the same thing. The rights table it reads is the estate's real one
(knowledge/model_license.conf): a verified permissive row (apache-2.0), a verified non-redistributable row (cc-by-nc-4.0)
and an UNVERIFIED permissive row (stability-community) give every verdict branch a real subject. Then the promoted CLI is
forked on the same scratch journal as the second witness. Negative controls: the verdict must fire on an absent row and
stay silent on a verified permissive one, and a tab-forged source url must NOT reach the licence column.
usage: nx_asset_prov_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_tool_run.nxnx_asset_prov_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
| 16 | const PG_DIR: *u8 = "/tmp/nx_asset_prov_gate" |
| 17 | const PG_JRNL: *u8 = "/tmp/nx_asset_prov_gate/assets.jrnl" |
| 18 | const PG_JRNL_ARG: *u8 = "jrnl=/tmp/nx_asset_prov_gate/assets.jrnl" |
| 19 | const PG_A: *u8 = "/tmp/nx_asset_prov_gate/a.bin" |
| 20 | const PG_B: *u8 = "/tmp/nx_asset_prov_gate/b.bin" |
| 21 | const PG_T: *u8 = "/tmp/nx_asset_prov_gate/tampered.bin" |
| 22 | const PG_ELF_LIVE: *u8 = "./nx_asset_prov.elf" |
| 23 | const PG_ELF_STAGE: *u8 = "./nx_asset_prov.sov.elf.new" |
| 24 | const PG_ELF_BUILD: *u8 = "buildroot/_build/nx_asset_prov.sov.elf" |
| 25 | const PG_DIR_MODE: i64 = 493 |
| 26 | const PG_FILE_MODE: i64 = 420 |
| 27 | const PG_FIX_BYTES: i64 = 1024 |
| 28 | const PG_SYS_UNLINKAT: i64 = 263 |
| 29 | const PG_CAP: i64 = 65536 |
| 30 | const PG_TMO_MS: i64 = 20000 |
| 31 | const PG_LIC_OK: *u8 = "apache-2.0" |
| 32 | const PG_LIC_NONREDIST: *u8 = "cc-by-nc-4.0" |
| 33 | const PG_LIC_UNVERIFIED: *u8 = "stability-community" |
| 34 | const PG_LIC_UNKNOWN: *u8 = "not-a-licence-anyone-read" |
| 35 | const PG_ABSENT_SHA: *u8 = "0000000000000000000000000000000000000000000000000000000000000000" |
functions
| 37 | func pg_write_file(path: *u8, b: *u8, n: i64) -> i64 |
| 45 | func pg_unlink(path: *u8) -> i64 { __syscall(PG_SYS_UNLINKAT, AT_FDCWD, path, 0, 0, 0, 0) return 0 } called by 1: main |
| 46 | func pg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 47 | func pg_call(elf: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, out: *u8, cap: i64, bl: *i64) -> i64 |
| 56 | func main(argc: i64, argv: *i64) -> i64 |