code wiki / (root) / nx_extllm_publish_guard.nx

nx_extllm_publish_guard.nx

buildroot/runtime/nx_extllm_publish_guard.nx

17735 B323 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind tooltopic extllm
docsdependenciesstructsconstsfunctions

about

nx_extllm_publish_guard.nx -- RUNG XL8: what we may SAY about a provider we are allowed to USE. This stopped being hypothetical the moment the estate started making real calls. The OpenRouter Stealth AUP forbids publicly disseminating confidential technical information regarding the performance of the models; Cerebras prohibits benchmarking or competitive analysis; SambaNova prohibits publishing capability or performance results without written consent. We now HOLD such numbers -- a 200, a 429, a wall time -- and /compare publishes to the open web on a beat. Nothing stood between those two facts until this organ. THE RULE, three decidable conjuncts on a single line: (1) a token identifying a provider whose terms row reads benchmark_publish_restricted=YES, (2) any metric token from knowledge/extllm_metric_vocab.conf, and (3) a run of two or more digits. The identifying tokens come from the ledger itself, never from a list in this file: the provider name, plus the tier when the tier is written as a model id (it contains a slash, e.g. stealth/ox-alpha). A tier like "free" or "trial" is NOT used as an identifier -- it would match half the corpus and a detector with false positives everywhere is one everybody learns to ignore. THE IMPRECISION IS DECLARED, in the vocab conf and here: a performance claim in pure prose carries no metric token and PASSES, so this is a FLOOR and never a proof of compliance; and a capability row citing a published rate cap trips all three conjuncts and is REFUSED. That direction is deliberate -- an AUP breach is not undoable once a page is served, so the guard fails toward making a human look. exit 0 ALLOW / 1 REFUSE / 3 UNKNOWN / 2 usage. license_tier: ORIGINAL. No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_extllm_lib.nx nx_estate_path.nx nx_sovjson_lib.nx nx_gate_verdict.nx nx_syscalls.nx nx_extllm_publish_guard.nx

imports: nx_extllm_lib.nxnx_estate_path.nxnx_sovjson_lib.nxnx_gate_verdict.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sj_werr sys_write sys_exit sj_lit_eq sj_vlen pg_selftest 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_mmap ↻ sj_cat gv_check gv_puts ↻ xl_publish_guard pg_window sys_mmap ↻ sj_le xl_is_comment xl_ncols xl_col sj_lit_eq ↻ sj_atoi_span pg_has_restricted

structs

none

consts

28const PG_PATH_CAP: i64 = 1024
29const PG_MIN_DIGIT_RUN: i64 = 2
30const PG_ASCII_0: i64 = 48
31const PG_ASCII_9: i64 = 57
32const PG_BYTE_SLASH: i64 = 47
33const PG_USAGE: i64 = 2
34const PG_VOCAB_COL: i64 = 1
35const PG_VOCAB_COLS: i64 = 2
62const PG_CH_0: i64 = 48
63const PG_CH_9: i64 = 57
64const PG_CH_A: i64 = 65
65const PG_CH_Z: i64 = 90
66const PG_CH_a: i64 = 97
67const PG_CH_z: i64 = 122
68const PG_CH_UNDERSCORE: i64 = 95
69const PG_WINDOW_KEY_COL: i64 = 0

functions

37func pg_vocab_path() -> *u8 { return "knowledge/extllm_metric_vocab.conf" as *u8 }
called by 1: main
39func pg_read_estate(p: *u8, out_len: *i64) -> *u8
46func pg_has_digit_run(q: *u8, s: i64, e: i64) -> i64
called by 1: xl_publish_guard
71func pg_is_wordchar(c: i64) -> i64
called by 1: pg_span_has_word
81func pg_span_has_word(q: *u8, s: i64, e: i64, lit: *u8) -> i64
103func pg_window(vocab: *u8, vn: i64) -> i64
123func pg_has_metric(vocab: *u8, vn: i64, q: *u8, s: i64, e: i64) -> i64
153func pg_has_restricted(terms: *u8, tn: i64, q: *u8, s: i64, e: i64) -> i64
196func xl_publish_guard(terms: *u8, tn: i64, vocab: *u8, vn: i64, body: *u8, bn: i64) -> i64
215func pg_selftest() -> i64
259func main(argc: i64, argv: *i64) -> i64