nx_browser_struct_col_lib.nx
buildroot/runtime/nx_browser_struct_col_lib.nx
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
imports: nx_syscalls.nxnx_lineconf_lib.nx
imported by: nx_browser_census.nxnx_browser_struct_col_gate.nx
structs
| none |
consts
| 46 | const BSC_PM_FULL: i64 = 1000 |
| 47 | const BSC_PM_NONE: i64 = 1001 |
| 48 | const BSC_UNMEASURED: i64 = 0 - 1 |
| 54 | const BSC_BAND_FLOOR_AT_900: i64 = 10 |
| 58 | const BSC_MET: i64 = 0 |
| 59 | const BSC_UNMET: i64 = 1 |
| 60 | const BSC_UNOBSERVABLE: i64 = 3 |
| 63 | const BSC_PAIR_TIED: i64 = 0 |
| 64 | const BSC_PAIR_ON: i64 = 1 |
| 65 | const BSC_PAIR_OFF: i64 = 2 |
| 66 | const BSC_PAIR_UNOBSERVABLE: i64 = 3 |
| 69 | const BSC_A_ROWS: i64 = 0 |
| 70 | const BSC_A_MEASURED: i64 = 1 |
| 71 | const BSC_A_SUMPM: i64 = 2 |
| 72 | const BSC_A_SUMDY: i64 = 3 |
| 73 | const BSC_A_SUMDX: i64 = 4 |
| 74 | const BSC_A_BARN: i64 = 5 |
| 75 | const BSC_A_BARMET: i64 = 6 |
| 76 | const BSC_A_WORSTPM: i64 = 7 |
| 77 | const BSC_A_WORSTDY: i64 = 8 |
| 78 | const BSC_A_WORSTDX: i64 = 9 |
| 79 | const BSC_A_UNMEASURED: i64 = 10 |
| 80 | const BSC_A_UNDERPOWERED: i64 = 11 |
| 81 | const BSC_A_SLOTS: i64 = 12 |
| 82 | const BSC_WORD: i64 = 8 |
| 83 | const BSC_A_BYTES: i64 = 96 // BSC_A_SLOTS * BSC_WORD |
| 85 | const BSC_CONF: *u8 = "knowledge/browser_br2_bar.conf\x00" |
| 86 | const BSC_SITECAP: i64 = 512 |
| 87 | const BSC_COMMA: i64 = 44 |
| 88 | const BSC_ZERO: i64 = 48 |
| 89 | const BSC_NINE: i64 = 57 |
functions
| 91 | func bsc_acc() -> *i64 |
| 104 | func bsc_field_int(p: *u8, n: i64) -> i64 |
| 124 | func bsc_band_floor(bar_pm: i64) -> i64 |
| 135 | func bsc_is_bar_site(csv: *u8, site: *u8, slen: i64) -> i64 |
| 162 | func bsc_bar_declared(csv: *u8) -> i64 |
| 173 | func 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 |
| 197 | func bsc_mean(sum: i64, n: i64) -> i64 |
| 212 | func bsc_bar_verdict(acc: *i64, declared: i64, bar_pm: i64, bar_dy: i64) -> i64 |
| 224 | func bsc_pair_verdict(on_pm: i64, on_n: i64, off_pm: i64, off_n: i64, band: i64) -> i64 |
| 237 | func bsc_verdict_name(v: i64) -> *u8 called by 1: main |
| 242 | func bsc_pair_name(v: i64) -> *u8 called by 1: main |
| 250 | func bsc_conf_int(key: *u8) -> i64 |
| 255 | func bsc_bar_pm() -> i64 { return bsc_conf_int("matched-permil-min\x00" as *u8) } |
| 256 | func bsc_bar_dy() -> i64 { return bsc_conf_int("mean-dy-max\x00" as *u8) } |
| 257 | func bsc_pair_band() -> i64 { return bsc_conf_int("pair-variance-permil\x00" as *u8) } |
| 259 | func bsc_bar_sites(out: *u8, cap: i64) -> i64 |