code wiki / _hdl_build / nx_rom_provenance.nx
nx_rom_provenance.nx
buildroot/runtime/_hdl_build/nx_rom_provenance.nx
about
nx_rom_provenance.nx -- R0.2 the LEGAL-CONTAINMENT keystone for the ROM player. Data-driven, deny-by-default,
liar-kill provenance policy over knowledge/registry/rom_provenance.tsv. NOTHING is servable unless its row
PROVES a license. The whole /play area sits behind the login wall (R0.1); this decides WHICH titles may be
served at all. Mirrors nx_evolution_ladder's evidence-or-RED + nx_galx_authz's deny-by-default. license_tier: ORIGINAL
rom_provenance.tsv columns (TAB-separated, one title per row, NO header):
id <TAB> title <TAB> machine <TAB> license <TAB> source <TAB> ownership <TAB> tier
license: pd | cc | freeware | owned | unknown tier: family | owner
POLICY (nx_rom_decide_buf):
pd/cc/freeware + source present -> ALLOW (free 3rd-party, license PROVEN by a real source)
pd/cc/freeware + source "-"/empty -> DENY_NOSRC (LIAR-KILL: a free claim with no evidence)
owned + ownership present + lawyer_ok==1 -> ALLOW (you own it AND legal review signed off)
owned (no proof OR lawyer_ok==0) -> DENY_OWNED (owned corpus stays DARK until the lawyer flips it)
unknown / not-listed -> DENY (deny-by-default, the safe floor)
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_rom_provenance_gate.nx
structs
| none |
consts
| 17 | const ROM_TSV: *u8 = "knowledge/registry/rom_provenance.tsv" |
| 18 | const ROM_LAWYER_FLAG: *u8 = "knowledge/registry/rom_lawyer_ok.flag" |
| 20 | const RD_ALLOW: i64 = 1 |
| 21 | const RD_DENY: i64 = 0 // unlisted / unknown license |
| 22 | const RD_DENY_NOSRC: i64 = 2 // free license claimed but no source (liar-kill) |
| 23 | const RD_DENY_OWNED: i64 = 3 // owned but not lawyer-cleared / no proof |
functions
| 26 | func pv_field(buf: *u8, ls: i64, le: i64, idx: i64, fs: *i64, fl: *i64) -> i64 called by 1: nx_rom_decide_buf |
| 43 | func pv_streq(buf: *u8, start: i64, len: i64, s: *u8) -> i64 called by 1: nx_rom_decide_buf |
| 53 | func pv_absent(buf: *u8, start: i64, len: i64) -> i64 called by 1: nx_rom_decide_buf |
| 60 | func nx_rom_decide_buf(tsv: *u8, tlen: i64, key: *u8, lawyer_ok: i64) -> i64 |
| 103 | func nx_rom_lawyer_ok() -> i64 |
| 112 | func nx_rom_decide(key: *u8, lawyer_ok: i64) -> i64 |