nx_steam_reviews_gate.nx
buildroot/runtime/nx_steam_reviews_gate.nx
about
nx_steam_reviews_gate.nx -- GATE for the review miner's decision core (/compare/intelmine R0-R3: the Steam page
reader, the journal row codec, the dedupe set, the stats partitions and the complaint-vs-praise ranker). No network:
the page is PLANTED at runtime (built byte by byte so the fixture carries real JSON escapes -- a quoted quote, a
backslash, a newline, a pipe, an e-acute and a surrogate pair -- without any of them in a source literal), journaled
into /tmp/nx_steam_reviews_gate/, read back, mined. Every number the teeth check is derived from the planted
inputs and printed beside its expectation so an outside adjudicator can recompute it.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_reviewmine_lib.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const G_DIR: *u8 = "/tmp/nx_steam_reviews_gate" |
| 13 | const G_PAGE: *u8 = "/tmp/nx_steam_reviews_gate/page.json" |
| 14 | const G_JRNL: *u8 = "/tmp/nx_steam_reviews_gate/fixture.jrnl" |
| 15 | const G_SEEN: *u8 = "/tmp/nx_steam_reviews_gate/fixture.seen" |
| 16 | const G_CORPUS: *u8 = "/tmp/nx_steam_reviews_gate/corpus.jrnl" |
| 17 | const G_STOP: *u8 = "/tmp/nx_steam_reviews_gate/stop.conf" |
| 18 | const G_CORPUS2: *u8 = "/tmp/nx_steam_reviews_gate/rubric.jrnl" |
| 19 | const G_LEX_DEFECT: *u8 = "/tmp/nx_steam_reviews_gate/lex_defect.conf" |
| 20 | const G_LEX_FEATURE: *u8 = "/tmp/nx_steam_reviews_gate/lex_feature.conf" |
| 21 | const G_LEX_EXCEED: *u8 = "/tmp/nx_steam_reviews_gate/lex_exceed.conf" |
| 22 | const G_LEX_NOTMEET: *u8 = "/tmp/nx_steam_reviews_gate/lex_notmeet.conf" |
| 23 | const G_LEX_VALUE: *u8 = "/tmp/nx_steam_reviews_gate/lex_value.conf" |
| 24 | const G_LEX_DEMAND: *u8 = "/tmp/nx_steam_reviews_gate/lex_demand.conf" |
| 25 | const G_RUBRIC_DOCS: i64 = 7 |
| 26 | const G_BROKEN_LIFT: i64 = 1800 // (2+1)*1000*(7+2) / ((2+1)*(3+2)) |
| 27 | const G_CAP: i64 = 65536 |
| 28 | const G_TOTAL: i64 = 211103 |
| 29 | const G_POS: i64 = 208637 |
| 30 | const G_NEG: i64 = 2466 |
| 31 | const G_SCORE: i64 = 9 |
| 32 | const G_NUM: i64 = 3 |
| 33 | const G_R2_VOTES_UP: i64 = 7 |
| 34 | const G_R2_WVS: i64 = 523 // "0.523809552192687988" truncated to permil |
| 35 | const G_R2_PT: i64 = 30 // minutes -> the under-one-hour band |
| 36 | const G_R1_PT: i64 = 2381 // minutes -> the 10-100 h band |
| 37 | const G_R3_PT: i64 = 9000 // minutes -> the over-100 h band |
| 38 | const G_CURSOR_LEN: i64 = 20 |
| 39 | const G_CURSOR_ENC_LEN: i64 = 24 // two escapes of three bytes each replace two single bytes |
| 40 | const G_TOP: i64 = 8 |
| 41 | const G_MIN_SUPPORT: i64 = 1 |
| 42 | const G_CRASH_RATIO: i64 = 4000 // (3+1)*1000*(3+2) / ((0+1)*(3+2)) |
| 43 | const G_GAME_RATIO: i64 = 1000 // equal share in both classes |
| 44 | const G_MUSIC_COMPLAINT_RATIO: i64 = 250 |
| 45 | const G_UTF8_C3: i64 = 195 |
| 46 | const G_UTF8_A9: i64 = 169 |
| 47 | const G_SMALL_CAP: i64 = 4 |
| 49 | const G_NAME: *u8 = "/tmp/nx_steam_reviews_gate/620.name" |
| 50 | const G_NAME_ABSENT: *u8 = "/tmp/nx_steam_reviews_gate/absent.name" |
| 51 | const G_NAME_EMPTY: *u8 = "/tmp/nx_steam_reviews_gate/empty.name" |
| 52 | const G_NAME_LEN: i64 = 16 // Caf + e-acute (2 bytes) + space + quote + Portal + quote + space + 2 |
functions
| 54 | func g_q(b: *u8, o: i64) -> i64 { b[o] = RM_Q as u8; return o + 1 } |
| 55 | func g_bs(b: *u8, o: i64) -> i64 { b[o] = RM_BS as u8; return o + 1 } |
| 56 | func g_s(b: *u8, o: i64, s: *u8) -> i64 { return rm_cat(b, o, s) } |
| 58 | func g_k(b: *u8, o: i64, k: *u8) -> i64 { var p: i64 = g_q(b, o); p = g_s(b, p, k); p = g_q(b, p); b[p] = RM_COLON as u8; return p + 1 } |
| 59 | func g_kv_s(b: *u8, o: i64, k: *u8, v: *u8) -> i64 { var p: i64 = g_k(b, o, k); p = g_q(b, p); p = g_s(b, p, v); p = g_q(b, p); b[p] = 44 as u8; return p + 1 } |
| 60 | func g_kv_raw(b: *u8, o: i64, k: *u8, v: *u8) -> i64 { var p: i64 = g_k(b, o, k); p = g_s(b, p, v); b[p] = 44 as u8; return p + 1 } |
| 61 | func g_review(b: *u8, o: i64, recid: *u8, steamid: *u8, pt: *u8, lang: *u8, textbuilder: i64, up: *u8, votes: *u8, wvs: *u8, free: *u8, ea: *u8, deck: *u8, last: i64) -> i64 |
| 110 | func g_head(b: *u8, total: *u8, num: *u8) -> i64 |
| 125 | func g_tail(b: *u8, o: i64, cursor: *u8) -> i64 |
| 132 | func g_build_page(b: *u8) -> i64 |
| 147 | func g_build_empty(b: *u8) -> i64 |
| 152 | func g_build_bad(b: *u8) -> i64 |
| 159 | func g_expect2(b: *u8) -> i64 |
| 168 | func g_expect3(b: *u8) -> i64 called by 1: main |
| 173 | func g_bytes_eq(a: *u8, b: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { if a[i] != b[i] { return 0 } i = i + 1 } return 1 } called by 1: main |
| 174 | func g_file_size(path: *u8) -> i64 { let lp: *i64 = sys_mmap(16) as *i64; lp[0] = 0; let b: *u8 = sys_read_file(path, lp); if (b as i64) == 0 { return 0 } return lp[0] } |
| 176 | func g_corpus_row(recid: i64, up: i64, text: *u8) -> i64 |
| 185 | func g_slot_of(tok: *u8) -> i64 { return rm_vocab_slot(tok, rm_slen(tok)) } |
| 186 | func g_corpus2_row(recid: i64, up: i64, pt: i64, text: *u8) -> i64 |
| 195 | func g_put(path: *u8, s: *u8) -> i64 { return rm_file_put(path, s, rm_slen(s)) } |
| 197 | func main() -> i64 |