code wiki / (root) / nx_browser_struct_col_lib.nx

nx_browser_struct_col_lib.nx

buildroot/runtime/nx_browser_struct_col_lib.nx

12453 B263 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic browser
docsdependenciesstructsconstsfunctions

about

nx_browser_struct_col_lib.nx -- BR2: THE CSS-ON STRUCTURAL-EXACTNESS COLUMN OF THE BROWSER CENSUS. WHY A LIB AND NOT A BLOCK INSIDE THE CENSUS. nx_browser_census.nx computes every number it prints inside main() and imports nothing testable, so a gate over it can only exec the promoted binary and a mutation harness reads NOT-REACHED across that fork. The judgement therefore lives here, inside the gate's own build closure, where the BR2 bar can actually be bitten. The census keeps ONE delegating declaration (bc_struct_col) so the compare-matrix symbol ruler still measures the organ the row names. WHAT IT ADDS. The census plane row was six tab fields: site class reading_recall_pm ratio_pct chrome_h nishi_h BR2 appends four, STRICTLY ADDITIVELY -- a six-field row still parses and its struct columns read UNMEASURED, never a silent zero: ... struct_matched_pm struct_dy struct_dx struct_bands_oracle THE FOURTH COLUMN IS THE DENOMINATOR, AND IT IS THE REASON THIS LIB EXISTS. MEASURED 2026-08-26 on saved bytes with the incumbent ruler: goog_raw.html vs its Chrome oracle returned "matched=2 (1000 permille)" over TWO oracle bands, and so_aug/x_aug returned "matched=0 (0 permille)" over ZERO oracle bands because those two tall captures are blank. Both readings are arithmetic on an empty or near-empty subject, and both arrive wearing a number that reads as a measurement -- a perfect score and a total failure, neither of them evidence. A struct column fed from that ruler without its denominator would have recorded a 1000 and two 0s in the census as facts. So the floor is DERIVED FROM THE BAR ITSELF, not picked: with N oracle bands, one band's outcome moves the reading by 1000/N permil. The bar is matched >= 900, i.e. 100 permil of headroom below perfection, so a reading is only capable of resolving the bar when 1000/N <= 100, i.e. N >= 10. Below that a single band flips the answer by more than the entire distance the rung is measuring. Rows under the floor are counted as UNDERPOWERED -- named, excluded from the mean and from the bar, never averaged in and never silently dropped. THE BAR IS DATA. matched-permil-min, mean-dy-max and the four bar sites come from knowledge/browser_br2_bar.conf, which quotes the browser.plan BR2 done-rule verbatim. A missing or unreadable conf yields BSC_UNOBSERVABLE, never a default: a bar nobody can read must not be reported as met, and must not be reported as failed either. THE PAIR HAS A NOISE FLOOR. The done-rule's second clause is "the census pair no longer favours CSS-OFF". A mean difference is a WIN only when it exceeds the census-variance band the browser.plan debt row already measured (~60 permil); inside that band the honest answer is TIED, and the CSS_ENABLED flip must not be taken on it. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_lineconf_lib.nx nx_browser_struct_col_lib.nx nx_browser_census.nx nx_browser_struct_col_gate.nx

imports: nx_syscalls.nxnx_lineconf_lib.nx

imported by: nx_browser_census.nxnx_browser_struct_col_gate.nx

structs

none

consts

46const BSC_PM_FULL: i64 = 1000
47const BSC_PM_NONE: i64 = 1001
48const BSC_UNMEASURED: i64 = 0 - 1
54const BSC_BAND_FLOOR_AT_900: i64 = 10
58const BSC_MET: i64 = 0
59const BSC_UNMET: i64 = 1
60const BSC_UNOBSERVABLE: i64 = 3
63const BSC_PAIR_TIED: i64 = 0
64const BSC_PAIR_ON: i64 = 1
65const BSC_PAIR_OFF: i64 = 2
66const BSC_PAIR_UNOBSERVABLE: i64 = 3
69const BSC_A_ROWS: i64 = 0
70const BSC_A_MEASURED: i64 = 1
71const BSC_A_SUMPM: i64 = 2
72const BSC_A_SUMDY: i64 = 3
73const BSC_A_SUMDX: i64 = 4
74const BSC_A_BARN: i64 = 5
75const BSC_A_BARMET: i64 = 6
76const BSC_A_WORSTPM: i64 = 7
77const BSC_A_WORSTDY: i64 = 8
78const BSC_A_WORSTDX: i64 = 9
79const BSC_A_UNMEASURED: i64 = 10
80const BSC_A_UNDERPOWERED: i64 = 11
81const BSC_A_SLOTS: i64 = 12
82const BSC_WORD: i64 = 8
83const BSC_A_BYTES: i64 = 96 // BSC_A_SLOTS * BSC_WORD
85const BSC_CONF: *u8 = "knowledge/browser_br2_bar.conf\x00"
86const BSC_SITECAP: i64 = 512
87const BSC_COMMA: i64 = 44
88const BSC_ZERO: i64 = 48
89const BSC_NINE: i64 = 57

functions

91func bsc_acc() -> *i64
called by 3: mainbg_bar_refusedmain calls 1: sys_mmap
104func bsc_field_int(p: *u8, n: i64) -> i64
124func bsc_band_floor(bar_pm: i64) -> i64
called by 2: mainmain
135func bsc_is_bar_site(csv: *u8, site: *u8, slen: i64) -> i64
called by 2: mainbsc_row
162func bsc_bar_declared(csv: *u8) -> i64
called by 2: mainmain
173func bsc_row(acc: *i64, csv: *u8, site: *u8, slen: i64, pm: i64, dy: i64, dx: i64, bands: i64, floor: i64, bar_pm: i64, bar_dy: i64) -> i64
197func bsc_mean(sum: i64, n: i64) -> i64
212func bsc_bar_verdict(acc: *i64, declared: i64, bar_pm: i64, bar_dy: i64) -> i64
called by 2: mainmain
224func bsc_pair_verdict(on_pm: i64, on_n: i64, off_pm: i64, off_n: i64, band: i64) -> i64
called by 2: mainmain
237func bsc_verdict_name(v: i64) -> *u8
called by 1: main
242func bsc_pair_name(v: i64) -> *u8
called by 1: main
250func bsc_conf_int(key: *u8) -> i64
255func bsc_bar_pm() -> i64 { return bsc_conf_int("matched-permil-min\x00" as *u8) }
called by 2: mainmain calls 1: bsc_conf_int
256func bsc_bar_dy() -> i64 { return bsc_conf_int("mean-dy-max\x00" as *u8) }
called by 2: mainmain calls 1: bsc_conf_int
257func bsc_pair_band() -> i64 { return bsc_conf_int("pair-variance-permil\x00" as *u8) }
called by 2: mainmain calls 1: bsc_conf_int
259func bsc_bar_sites(out: *u8, cap: i64) -> i64
called by 2: mainmain calls 1: lcf_str_of