code wiki / (root) / nx_artlicense_gate.nx

nx_artlicense_gate.nx

buildroot/runtime/nx_artlicense_gate.nx

8023 B125 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_artlicense_gate.nx -- THE GATE FOR THE LICENSE CHAIN AND ROYALTY LEDGER (nx_artlicense), 2026-08-24. SUBJECT: the nx_artlicense ELF forked for real; its exit code IS the contract (0 SHIP-OK / 3 REVIEW / 4 REFUSE) and every REFUSE must NAME its conjunct. Fixture chain rows in /tmp/nx_artlicense_gate/chain.conf cover one row per refusal reason plus the positive control; the ledger is unlinked at SETUP so idempotency is measured against a state this run established. A guard that refuses everything passes every deny-test, so the ALLOW case (ok / DE-territory) is load-bearing, not decoration. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_artlicense_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.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 ↻ gv_puts ↻ sys_mkdir sys_unlinkat ag_write_text sys_openat_wr sys_write ↻ sys_close gv_check gv_puts ↻ ag_exists sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ↻ sys_mmap ↻ ag_run

structs

none

consts

13const AG_SUBJECT_DEFAULT: *u8 = "nx_artlicense.elf"
14const AG_DIR: *u8 = "/tmp/nx_artlicense_gate"
15const AG_CONF: *u8 = "/tmp/nx_artlicense_gate/chain.conf"
16const AG_LEDGER: *u8 = "/tmp/nx_artlicense_gate/royalty.tsv"
17const AG_MODE_DIR: i64 = 493
18const AG_MODE_0644: i64 = 420
19const AG_CAPTURE_CAP: i64 = 65536
20const AG_ARGV_SLOTS: i64 = 10
21const AG_SLOT: i64 = 8
22const AG_EXIT_OK: i64 = 0
23const AG_EXIT_REVIEW: i64 = 3
24const AG_EXIT_REFUSE: i64 = 4
25const AG_NOW_INSIDE: *u8 = "1600"

functions

27func ag_write_text(path: *u8, s: *u8) -> i64
37func ag_exists(path: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
44func ag_run(subject: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, out: *u8, outlen: *i64) -> i64
called by 1: main calls 2: sys_mmaptr_run_capture
57func main(argc: i64, argv: *i64) -> i64