nx_licgate_lib.nx
buildroot/runtime/nx_licgate_lib.nx
about
nx_licgate_lib.nx -- the SHIPPABILITY verdict as a LIBRARY: may I SELL what this generation chain
produced? Split out of nx_licgate.nx so the EMIT PATH can call it in-process.
WHY A LIB (the same unblock as nx_swarm_endpoint_lib): a gate nothing calls is DARK, and the one
consumer that MUST call this is the generator itself -- it has to refuse BEFORE bytes hit disk,
not after. An organ with main() cannot be imported (double-main), so the verdict had to leave the
CLI. The CLI is now a thin caller of this, which means the command line and the emit path prove
the SAME code.
THE DEFECT IT PREVENTS: output rights and weight rights are DIFFERENT RIGHTS. NoobAI-XL is freely
downloadable, freely mergeable, and forbids commercialising model-GENERATED PRODUCTS -- so a game
built entirely from "open" checkpoints can be in breach on every frame. And a generation's rights
are the INTERSECTION over its whole provenance chain: one non-commercial LoRA in a forty-node
graph poisons everything downstream of it.
FAIL-CLOSED: unknown model, unresolved licence, or an EMPTY chain -> REFUSE. Silence is never
permission. Rights table is DATA (knowledge/model_license.conf) -- a new checkpoint costs a row.
Rights are encoded ORDERED (0 NO < 1 CONDITIONAL < 2 YES) so "most restrictive wins" is a plain
MIN; deriv_must_open is an OBLIGATION, so it takes the MAX instead.
license_tier: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_syscalls.nx
imported by: nx_acquire.nxnx_asset_prov_clock_candidate_t346.nxnx_asset_prov_lib.nxnx_licgate.nx
structs
| none |
consts
| 28 | const LG_NO: i64 = 0 |
| 29 | const LG_COND: i64 = 1 |
| 30 | const LG_YES: i64 = 2 |
| 32 | const LG_UNVERIFIED: i64 = 0 |
| 33 | const LG_WORD: i64 = 8 |
| 34 | const LG_CTX_SLOTS: i64 = 8 |
| 305 | const LG_RC_OK: i64 = 0 |
| 306 | const LG_RC_REVIEW: i64 = 3 |
| 307 | const LG_RC_REFUSE: i64 = 4 |
functions
| 39 | func lg_len(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i } |
| 41 | func lg_put(o: *u8, at: i64, s: *u8) -> i64 |
| 48 | func lg_putn(o: *u8, at: i64, buf: *u8, off: i64, n: i64) -> i64 |
| 55 | func lg_putd(o: *u8, at: i64, v: i64) -> i64 |
| 67 | func lg_ceq(a: *u8, b: *u8) -> i64 |
| 78 | func lg_seq(buf: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 86 | func lg_sseq(buf: *u8, a: i64, an: i64, b: i64, bn: i64) -> i64 called by 1: lg_ctx |
| 94 | func lg_field(buf: *u8, s: i64, e: i64, idx: i64, box: *i64) -> i64 |
| 117 | func lg_num(buf: *u8, off: i64, n: i64) -> i64 called by 1: lg_ctx |
| 137 | func lg_ctx() -> *i64 called by 8: mainpv_verdictmainpv_verdictmainlg_verdict+2 calls 5: sys_mmapsys_read_filelg_fieldlg_numlg_sseq |
| 206 | func lg_find_model(ctx: *i64, want: *u8) -> i64 |
| 226 | func lg_find_license(ctx: *i64, want: *u8) -> i64 |
| 241 | func lg_lic_redist(ctx: *i64, li: i64) -> i64 { let lic: *i64 = ctx[2] as *i64; return lic[li * 7 + 3] } |
| 242 | func lg_lic_verified(ctx: *i64, li: i64) -> i64 { let lic: *i64 = ctx[2] as *i64; return lic[li * 7 + 6] } |
| 246 | func lg_eval(ctx: *i64, names: *i64, cnt: i64, res: *i64) -> i64 |
| 309 | func lg_rc(res: *i64) -> i64 |
| 333 | func lg_rc_axes(res: *i64) -> i64 called by 1: main |
| 346 | func lg_axis_name(res: *i64) -> *u8 called by 1: main |
| 359 | func lg_verdict(names: *i64, cnt: i64) -> i64 |