code wiki / (root) / nx_writebench.nx

nx_writebench.nx

buildroot/runtime/nx_writebench.nx

20020 B358 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind bench
docsdependenciesstructsconstsfunctions

about

nx_writebench.nx -- THE WRITING/ROLEPLAY CAPABILITY BENCHMARK: can the ecosystem emit -- and GOVERN -- the kinds of interactive fiction people actually build and use? RULER = a REAL ingested peer-reviewed paper, banked by nx_research_fetch_cli over our own TLS: arXiv:2601.14324v1 -- "When Generative AI Is Intimate, Sexy, and Violent: Examining Not-Safe-For-Work (NSFW) Chatbots on FlowGPT" (CHI '26, DOI 10.1145/3772318.3790522), N=376 chatbots by 190 creators, 307 public sessions, banked at knowledge/library/write_nsfwbot_flowgpt_2601_14324.txt (status 200). It is NOT a ruler we invented: every axis below traces to a MEASURED number in that corpus, and nx_writebench_gate liar-kills the board if the corpus is missing or is not that paper. Follows the nx_gamebench doctrine (name a real external artifact + its bar; the gap queue IS the build order) and the ecosystem_benchmarks.tsv doctrine (self-graded = SUSPECT until an external reference is WIRED). HONEST BY CONSTRUCTION: - coverage is COMPUTED from the rows (sum of verdicts / max), never a hand-written number; - every HAVE names an evidence artifact; the gate stats each one on disk and kills any that is absent; - the GAP QUEUE is POPULATION-ranked using the PAPER'S OWN class counts (AI Character 279, Story Generator 63, DAN 21, Image Generator 15; total 376) -- a gap that blocks 376 of 376 outranks one that blocks 279. "Where are our gaps" answered with arithmetic, not taste; - this board is SELF-GRADED-UNTIL-A-SECOND-METHOD-CLASS: our verdicts are OUR gates, so a high coverage number here is NOT parity with anything until an outside witness is wired. SCOPE DECLARED, NOT HIDDEN: - The ruler measures an interactive-roleplay platform. Our craft organs (readability, grammar, citations) are scored ONLY where the ruler has a matching axis; strengths the paper never measures are marked exceed=1 rather than inflating coverage. - DAN-CLASS DECLINED BY POLICY: the paper's DAN category (N=21) is defined by bomb-making steps, malicious code, drug synthesis and jailbreak propagation. We decline to build that class -- a LEGAL line, not a taste line. Adult/kink registers are NOT that class and are NOT declined; they route to the operator's local lane through the existing seam. The decline is stated here so the coverage number is not silently inflated by an omitted class. Self-contained (imports only nx_syscalls) so it runs on the NAS as an MCP tool. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_writebench.nx

imports: nx_syscalls.nxnx_estate_path.nx

imported by: nobody (leaf or entry point)

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

main sys_openat_append sys_mmap wb_w sys_write wb_size ep_open_rd sys_openat_rd sys_mmap ↻ ep_join sys_read sys_close wb_n wb_w ↻ sys_mmap ↻ sys_close ↻ sys_exit wb_vstr wb_cstr wb_pop wb_has wb_bit

structs

none

consts

37const WB_NAXES: i64 = 28
38const WB_CORPUS_N: i64 = 376 // DISTINCT chatbots in the ruler corpus
39const WB_CLASS_SUM: i64 = 378 // the 4 class sizes SUM to 378, not 376: the ruler states 2 bots
44const WB_N_AICHAR: i64 = 279
45const WB_N_STORY: i64 = 63
46const WB_N_IMAGE: i64 = 15
47const WB_N_DAN: i64 = 21
48const WB_RULER_MIN: i64 = 50000 // a corpus smaller than this is not the paper (decoy floor)
49const WB_SCRATCH: i64 = 262144

functions

51func wb_w(fd: i64, s: *u8) -> i64
called by 2: wb_nmain calls 1: sys_write
58func wb_n(fd: i64, v: i64) -> i64
called by 1: main calls 2: wb_wsys_mmap
72func wb_bit(i: i64) -> i64 { var v: i64 = 1; var k: i64 = 0; while k < i { v = v * 2; k = k + 1 } return v }
called by 1: wb_has
73func wb_has(mask: i64, i: i64) -> i64 { let b: i64 = wb_bit(i); if (mask / b) % 2 == 1 { return 1 } return 0 }
called by 1: wb_pop calls 1: wb_bit
77func wb_pop(mask: i64) -> i64
called by 1: main calls 1: wb_has
95func wb_size(p: *u8, buf: *u8) -> i64
called by 1: main calls 3: ep_open_rdsys_readsys_close
107func wb_vstr(v: i64) -> *u8
called by 1: main
112func wb_cstr(c: i64) -> *u8
called by 1: main
119func main() -> i64