code wiki / (root) / nx_asset_prov_gate.nx

nx_asset_prov_gate.nx

buildroot/runtime/nx_asset_prov_gate.nx

14170 B190 linesdepth 6pulls 11 transitivereach 0 importersview sourcekind gate/prooftopic asset
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_tool_run.nx nx_asset_prov_lib.nx nx_asset_prov_gate.nx

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mkdir pg_unlink sys_mmap ↻ gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap pg_write_file sys_openat_wr sys_write ↻ sys_close pv_hash_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek

structs

none

consts

16const PG_DIR: *u8 = "/tmp/nx_asset_prov_gate"
17const PG_JRNL: *u8 = "/tmp/nx_asset_prov_gate/assets.jrnl"
18const PG_JRNL_ARG: *u8 = "jrnl=/tmp/nx_asset_prov_gate/assets.jrnl"
19const PG_A: *u8 = "/tmp/nx_asset_prov_gate/a.bin"
20const PG_B: *u8 = "/tmp/nx_asset_prov_gate/b.bin"
21const PG_T: *u8 = "/tmp/nx_asset_prov_gate/tampered.bin"
22const PG_ELF_LIVE: *u8 = "./nx_asset_prov.elf"
23const PG_ELF_STAGE: *u8 = "./nx_asset_prov.sov.elf.new"
24const PG_ELF_BUILD: *u8 = "buildroot/_build/nx_asset_prov.sov.elf"
25const PG_DIR_MODE: i64 = 493
26const PG_FILE_MODE: i64 = 420
27const PG_FIX_BYTES: i64 = 1024
28const PG_SYS_UNLINKAT: i64 = 263
29const PG_CAP: i64 = 65536
30const PG_TMO_MS: i64 = 20000
31const PG_LIC_OK: *u8 = "apache-2.0"
32const PG_LIC_NONREDIST: *u8 = "cc-by-nc-4.0"
33const PG_LIC_UNVERIFIED: *u8 = "stability-community"
34const PG_LIC_UNKNOWN: *u8 = "not-a-licence-anyone-read"
35const PG_ABSENT_SHA: *u8 = "0000000000000000000000000000000000000000000000000000000000000000"

functions

37func pg_write_file(path: *u8, b: *u8, n: i64) -> i64
46func pg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
47func pg_call(elf: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, out: *u8, cap: i64, bl: *i64) -> i64
called by 1: main calls 2: sys_mmaptr_run_capture_to
56func main(argc: i64, argv: *i64) -> i64