code wiki / (root) / nx_browser_census.nx

nx_browser_census.nx

buildroot/runtime/nx_browser_census.nx

7345 B129 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic browser
docsdependenciesstructsconstsfunctions

about

nx_browser_census.nx -- SOVEREIGN browser-parity census scoreboard organ (MCP tool + API payload). Operator directive 2026-07-23: "mcp and api and object oriented and agentic and workflow ready ... it needs to scale." Replaces the one-off PowerShell -> static-JSON pipeline (the scattering root) with a data-driven sovereign organ: sites + per-site results live in the SEG-STORE PLANE knowledge/store/browsercensus- (NOT hardcoded, NOT a tsv per the sovereign-formats law) -> ADD SITES WITHOUT TOUCHING CODE = scales to N. Reads the plane, parses each site RECORD, aggregates a SCOREBOARD (mean reading-recall vs Chrome, class counts, mean height-ratio), emits structured JSON to stdout (the MCP + API payload) AND colocates it to knowledge/status/browser_census.log (evidence). Fail-closed: absent/empty plane -> RED exit 1 (no scoreboard without data). Row schema, 6 tab fields: site \t class \t reading_recall_pm \t ratio_pct \t chrome_h \t nishi_h. reading_recall_pm/ratio_pct = "-" or non-digit means UNMEASURED (excluded from the mean, never a silent 0). Workflow-ready: one plane row per site, one JSON record per site -> composable/fan-out. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_store_seed_lib.nx nx_seg_store.nx nx_syscalls.nx nx_browser_census.nx

imports: nx_store_seed_lib.nxnx_seg_store.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 sys_mmap sts_load ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻ ssl_lookup ssl_hash_entry ↻ ssl_key_eq ↻ ss_manifest_free sys_munmap ↻ sys_munmap ↻ ssc_retire_handle

structs

none

consts

16const BC_MAGIC_4096: i64 = 4096
18const BC_PLANE_CAP: i64 = 1048576
19const BC_JSON_CAP: i64 = 262144

functions

22func bc_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
23func bc_cat(o: *u8, at: i64, s: *u8) -> i64 { var i: i64=0; var a: i64=at; while s[i]!=(0 as u8){o[a]=s[i]; a=a+1; i=i+1} return a }
called by 1: main
24func bc_catf(o: *u8, at: i64, p: *u8, n: i64) -> i64 { var i: i64=0; var a: i64=at; while i<n { o[a]=p[i]; a=a+1; i=i+1 } return a }
called by 1: main
25func bc_catn(o: *u8, at: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
35func bc_field_has(p: *u8, n: i64, sub: *u8) -> i64
called by 1: main
47func bc_field_int(p: *u8, n: i64) -> i64
called by 1: main
57func main() -> i64