code wiki / (root) / nx_research_page.nx

nx_research_page.nx source

↩ module page · 305 lines · 24793 B

1// nx_research_page.nx -- EMIT the live nishifamily.com/research page. 2// The beyond-SOTA frontier board + the fetch doctrine. Content is the researcher's; this organ 3// authors document structure and design tokens only, and NEVER rewrites a claim. 4// license_tier: ORIGINAL 5// 6// genealogy_id: nishi_research_board 7// lineage_id: nx_research_page_v1 8// 9// WHY THIS ORGAN EXISTS AT ALL. Before today /research was a HAND-WRITTEN file in the docroot with 10// no emitter anywhere in the estate: proven 2026-08-25 by nx_absent over all 23,239 .nx sources 11// (coverage_complete=1 corpus_complete=1) for the page's own prose -- an emitter must contain the 12// strings it emits, and none did. nx_games_page.nx already states the law this violated: 13// "HTML is never hand-written into a docroot", and 14// ***A TOKEN SSOT THAT NO PAGE EMITTER CALLS IS A SECOND DESIGN SYSTEM, NOT A SHARED ONE.*** 15// So the page was raised by giving it an OWNER, not by hand-editing it a second time. Editing the 16// HTML directly would have hardcoded a second copy of the palette into the docroot -- the 17// duplicate-ruler defect wearing a colour. 18// 19// MEASURED BEFORE (nx_ui_audit, live, 2026-08-25): score 3/12 DEV-GRADE -- 20// design-tokens 2/3 (15 var(--) uses) . theme-aware 0/2 . responsive 0/3 (0 @media, viewport=1) 21// . type-scale 1/2 (8 font-size, clamp=0) . polish 0/2 (0 transition/animation/:focus) 22// Each of the five is a real missing ingredient, and each is fixed below by a real mechanism: 23// theme-aware -- the page was DARK-ONLY. A prefers-color-scheme block on an already-dark page is 24// a NO-OP that buys the point and changes nothing for a user, so the palette was 25// inverted properly: light default + a real dark override from the SSOT. 26// responsive -- 0 breakpoints and a 4-column table with white-space:nowrap on its label column. 27// That table could not reflow. Fixed by removing the nowrap and by scrolling wide 28// content in its OWN container, so the page body can never scroll sideways. 29// type-scale -- six ad-hoc sizes (15/13.5/13/12.5/12/11px) collapsed onto a 4-step token scale, 30// with a FLUID h1 whose max is the incumbent 25px, so desktop is unchanged. 31// polish -- :focus-visible rings (WCAG 2.1 SC 2.4.7, an external bar) + a colour transition, 32// wrapped in prefers-reduced-motion:no-preference so motion-sensitive users opt out. 33// ***A SCORE IS NOT A GOAL. Every point above is the receipt of a change a visitor can feel; none of 34// it is padding, and the one dimension that CANNOT be read as evidence is named next.*** 35// 36// ***explicit_colors WILL READ 0 AND THAT IS NOT EVIDENCE OF ANYTHING.*** nx_ui_audit counts the 37// substring ":#" while bt_emit_root_buf emits ": " and then the value, i.e. ": #f6f7f4". Every 38// SSOT-emitted colour is invisible to that counter whether or not hardcoded colours were removed. 39// Do not report the 8 -> 0 move as "hardcoded colours removed". 40import "nx_brand_tokens.nx" 41 42const RP_OUT: *u8 = "sites/nishifamily/research.html" 43const RP_TMP: *u8 = "sites/nishifamily/research.html.tmp" 44// Publish is tmp+rename, not a truncating write over the live page: an emitter that dies mid-write 45// leaves a HALF PAGE served to every visitor. nx_ui_audit already publishes its own artifact this way. 46const RP_CAP: i64 = 65536 47// Scratch for ONE emitted token block. The brand below is 19 token rows + 8 dark rows; the light 48// block measures well under 1 KB and the dark under 400 B, so this is roughly 8x headroom, not a 49// taste. It is asserted, not assumed: bt_app SATURATES silently at cap (it increments only inside 50// `if p < cap`), so an undersized cap truncates a palette mid-block while still returning a positive 51// number. The RP_TOKCAP teeth below are what make that loud. 52const RP_TOKCAP: i64 = 8192 53// RESPONSIVE BREAKPOINTS. NOT tasted: both are the estate's existing ladder, taken from 54// sites/nishifamily/nishi-ds.css section 5 RESPONSIVE (lines 262 and 265) and already reused by 55// nx_games_page. A third set of numbers here would be the duplicate-ruler defect wearing a constant. 56const RP_BP_MD: i64 = 860 57const RP_BP_SM: i64 = 640 58const RP_MODE_0644: i64 = 0x1a4 59 60// stderr/stdout writers that DERIVE their length from the string. A hand-counted length beside a 61// string literal is a second copy of that literal's shape and the two drift silently. 62func rp_err(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(2, s, n); return 0 } 63func rp_out(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } 64 65// append a nul-terminated string into the page buffer. This is bt_app, the SSOT's own BOUNDED 66// appender -- not a local re-implementation. nx_games_page's gm_cat takes no cap at all. 67func rp_s(out: *u8, pos: i64, s: *u8) -> i64 { return bt_app(out, pos, RP_CAP, s) } 68 69// decimal, bounded. Signed because a silent empty emit on a negative would be a wrong answer 70// rather than an error. 71func rp_num(out: *u8, pos: i64, cap: i64, v: i64) -> i64 { 72 var p: i64 = pos 73 var m: i64 = v 74 if m < 0 { if p < cap { out[p] = 45 as u8; p = p + 1 } m = 0 - m } 75 let t: *u8 = sys_mmap(28) 76 var k: i64 = 0 77 if m == 0 { t[0] = 48 as u8; k = 1 } 78 while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } 79 while k > 0 { k = k - 1; if p < cap { out[p] = t[k]; p = p + 1 } } 80 return p 81} 82 83// copy one emitted token block into the page buffer. 84func rp_blk(out: *u8, pos: i64, tb: *u8, n: i64) -> i64 { 85 var p: i64 = pos 86 var i: i64 = 0 87 while i < n { if p < RP_CAP { out[p] = tb[i]; p = p + 1 } i = i + 1 } 88 return p 89} 90 91// THE PALETTE, AS DATA (nx_brand_tokens .brand format -- the estate's design-token SSOT). 92// `token|...` = the DEFAULT (light) theme. `dark|...` = the prefers-color-scheme:dark override. 93// 94// COLOUR VALUES ARE NOT NEW AND ARE NOT MINE. Every colour below is BYTE-IDENTICAL to the value 95// nx_games_page.nx already ships for the same semantic name, so /research and /games are one brand 96// rather than two that happen to look similar. The incumbent /research palette was GitHub's dark 97// theme (#0b0e14 / #58a6ff), which is the visual signature of a dev dump, not of this estate. 98// 99// MOTION values are byte-identical to bt_default_brand()'s own motion scale in nx_brand_tokens.nx 100// (fast 150ms, ease cubic-bezier(.2,.7,.2,1)) -- the SSOT's numbers, not a fresh guess. 101// 102// LAYOUT wrap is the INCUMBENT's 1080px, kept rather than adopting games' 980px: this page carries a 103// four-column research table and games does not. Type sizes are derived from the incumbent too -- 104// size-h1's MAX is 1.5625rem = the incumbent's exact 25px, so desktop h1 rendering is unchanged BY 105// CONSTRUCTION; its min 1.25rem is the phone floor that stops the heading overflowing. 106// 107// ***A THEME YOU ADD WITHOUT MEASURING ITS PAIRS IS A CONTRAST REGRESSION YOU HAVE NOT FOUND YET.*** 108// All 12 foreground/background pairs this stylesheet actually creates were measured with nx_contrast 109// on 2026-08-25, with the canonical WCAG example (767676 on ffffff = 4.54) run first as a POSITIVE 110// CONTROL so a ruler that returns a constant could not have passed unnoticed: 111// LIGHT ink/bg 16.54 . muted/bg 5.76 . primary/bg 8.53 . good/bg 5.85 . muted/panel 6.19 112// . primary/raised 8.00 113// DARK ink/bg 16.26 . ink/panel 14.68 . muted/bg 7.10 . muted/panel 6.42 . primary/bg 9.58 114// . good/bg 7.56 . primary/raised 7.56 115// ALL 12 clear WCAG 2.1 SC 1.4.3 AA (4.5:1). STATED HONESTLY RATHER THAN FLATTERINGLY: the worst 116// pair moves from the incumbent's 6.58:1 (its --dim on --bg, measured) to 5.76:1. That is a real 117// REDUCTION IN HEADROOM above the same bar, not an improvement, and it is the price of a light 118// default. It is recorded here so the next reader does not have to rediscover it. 119func rp_brand() -> *u8 { 120 return "token|color|bg|#f6f7f4\ntoken|color|ink|#14181f\ntoken|color|muted|#58626e\ntoken|color|primary|#174e5e\ntoken|color|line|#d8dcd5\ntoken|color|panel|#ffffff\ntoken|color|raised|#eef0ec\ntoken|color|good|#2f6b4e\ntoken|layout|wrap|1080px\ntoken|layout|gutter|clamp(14px,4vw,20px)\ntoken|font|leading|1.55\ntoken|font|size-h1|clamp(1.25rem,4.2vw,1.5625rem)\ntoken|font|size-base|.9375rem\ntoken|font|size-sm|.8125rem\ntoken|font|size-xs|.6875rem\ntoken|space|2|16px\ntoken|radius|sm|6px\ntoken|motion|fast|150ms\ntoken|motion|ease|cubic-bezier(.2,.7,.2,1)\ndark|color|bg|#0b0f14\ndark|color|ink|#e6edf3\ndark|color|muted|#8aa0b4\ndark|color|primary|#4cc2ff\ndark|color|line|#243140\ndark|color|panel|#131b24\ndark|color|raised|#1b2733\ndark|color|good|#3fb950\n" as *u8 121} 122 123func main() -> i64 { 124 // WRONG-TREE GUARD. This estate has TWO trees (nishihost and buildroot) and a relative path 125 // resolves against whichever one the caller happened to fork from. sys_openat_wr CREATES, so a 126 // run from the wrong cwd would silently author a brand-new page in a tree nothing serves and 127 // report success. Refusing unless the target ALREADY EXISTS makes that failure loud, and this 128 // organ only ever overwrites a page that is already there. 129 let probe: i64 = sys_openat_rd(RP_OUT) 130 if probe < 0 { 131 rp_err("FATAL: sites/nishifamily/research.html does not exist from this cwd -- refusing to author a page into the wrong tree. Run from the nishihost root.\n" as *u8) 132 sys_exit(2) 133 return 2 134 } 135 sys_close(probe) 136 137 let h: *u8 = sys_mmap(RP_CAP) 138 var w: i64 = 0 139 let bd: *u8 = rp_brand() 140 let bn: i64 = bt_len(bd) 141 let tb: *u8 = sys_mmap(RP_TOKCAP) 142 143 // ---------- head ---------- 144 w = rp_s(h, w, "<!doctype html><html lang='en'><head><meta charset='utf-8'>" as *u8) 145 w = rp_s(h, w, "<meta name='viewport' content='width=device-width,initial-scale=1'>" as *u8) 146 w = rp_s(h, w, "<title>Nishi Research &mdash; beyond-SOTA frontier &amp; fetch spec</title>" as *u8) 147 w = rp_s(h, w, "<meta name='description' content='Per-lane: the top UNPROVEN beyond-SOTA opportunity and exactly what to look for when we fetch. Every row is a filed frontier rung, momentum-ranked from real corpora.'>" as *u8) 148 w = rp_s(h, w, "<link rel='canonical' href='https://nishifamily.com/research'>" as *u8) 149 w = rp_s(h, w, "<style>" as *u8) 150 151 // ---------- tokens: the SSOT light block ---------- 152 // bt_emit_root_buf returns -1 when NOT ONE token parsed, so this FATAL is a live non-vacuity 153 // assertion on the emitted artifact: an emitter that cannot fail when its data is empty ships a 154 // page with no palette and still reports success. Absent CSS has no failure mode. 155 let lw: i64 = bt_emit_root_buf(bd, bn, tb, RP_TOKCAP) 156 if lw < 0 { 157 rp_err("FATAL: brand parsed ZERO light tokens -- refusing to emit a page with no palette\n" as *u8) 158 sys_exit(2) 159 return 2 160 } 161 if lw >= RP_TOKCAP - 1 { 162 rp_err("FATAL: light token block hit RP_TOKCAP -- the palette is TRUNCATED, not short\n" as *u8) 163 sys_exit(2) 164 return 2 165 } 166 w = rp_blk(h, w, tb, lw) 167 168 // Page-local ALIASES over the SSOT names: one indirection, so a brand DATA edit re-themes the 169 // whole page and every rule below keeps reading the short names the incumbent stylesheet read. 170 // They are var() REFERENCES, not copies, so they resolve at use time -- which is exactly why the 171 // dark block below re-points all eight without a second alias layer inside the media query. 172 w = rp_s(h, w, ":root{--bg:var(--nx-color-bg);--ink:var(--nx-color-ink);--dim:var(--nx-color-muted);--acc:var(--nx-color-primary);--line:var(--nx-color-line);--pan:var(--nx-color-panel);--raise:var(--nx-color-raised);--ok:var(--nx-color-good)}" as *u8) 173 174 // ---------- tokens: the SSOT dark override ---------- 175 // bt_emit_dark_root_buf returns 0 (NEVER negative) when the brand carries no dark line, so the 176 // guard is <= 0. A `< 0` guard here would be a tooth that can never fire. 177 let dw: i64 = bt_emit_dark_root_buf(bd, bn, tb, RP_TOKCAP) 178 if dw <= 0 { 179 rp_err("FATAL: brand carries NO dark override -- the page would ship theme-blind\n" as *u8) 180 sys_exit(2) 181 return 2 182 } 183 if dw >= RP_TOKCAP - 1 { 184 rp_err("FATAL: dark token block hit RP_TOKCAP -- the override is TRUNCATED\n" as *u8) 185 sys_exit(2) 186 return 2 187 } 188 w = rp_blk(h, w, tb, dw) 189 190 // ---------- breakpoints: TOKENS ONLY, never components ---------- 191 // The same discipline nishi-ds.css states in its own dark block, and the reason it is safe: a 192 // token carries no paint, so a breakpoint cannot restyle anything the page did not already opt 193 // into by reading that token. The numbers are interpolated from the consts, never retyped. 194 w = rp_s(h, w, "@media (max-width:" as *u8) 195 w = rp_num(h, w, RP_CAP, RP_BP_MD) 196 w = rp_s(h, w, "px){:root{--nx-layout-gutter:clamp(12px,3.6vw,16px)}}" as *u8) 197 w = rp_s(h, w, "@media (max-width:" as *u8) 198 w = rp_num(h, w, RP_CAP, RP_BP_SM) 199 w = rp_s(h, w, "px){:root{--nx-layout-wrap:100%;--nx-layout-gutter:12px}}" as *u8) 200 201 // ---------- base layer ---------- 202 // Not one colour literal survives below: every paint reads a token. 203 w = rp_s(h, w, "*{box-sizing:border-box}" as *u8) 204 w = rp_s(h, w, "body{margin:0;background:var(--bg);color:var(--ink);font:var(--nx-font-size-base)/var(--nx-font-leading) -apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}" as *u8) 205 // Skip link: WCAG 2.1 SC 2.4.1 Bypass Blocks. Off-screen until focused, so it costs a sighted 206 // visitor nothing and gives a keyboard visitor the table without tabbing the whole intro. 207 w = rp_s(h, w, ".skip{position:absolute;left:-9999px;top:0;background:var(--pan);color:var(--acc);padding:var(--nx-space-2);border:1px solid var(--line);border-radius:var(--nx-radius-sm);z-index:9}" as *u8) 208 w = rp_s(h, w, ".skip:focus{left:var(--nx-space-2);top:var(--nx-space-2)}" as *u8) 209 w = rp_s(h, w, ".wrap{max-width:var(--nx-layout-wrap);margin:0 auto;padding:26px var(--nx-layout-gutter) 70px}" as *u8) 210 w = rp_s(h, w, "h1{font-size:var(--nx-font-size-h1);line-height:1.2;margin:0 0 2px}" as *u8) 211 w = rp_s(h, w, ".sub{color:var(--dim);margin:0 0 16px;font-size:var(--nx-font-size-sm)}" as *u8) 212 w = rp_s(h, w, "h2{font-size:var(--nx-font-size-xs);letter-spacing:.1em;text-transform:uppercase;color:var(--acc);margin:30px 0 8px;border-bottom:1px solid var(--line);padding-bottom:6px}" as *u8) 213 // WIDE CONTENT SCROLLS IN ITS OWN CONTAINER, so the page body can never scroll sideways. This is 214 // the half of the reflow fix that needs no breakpoint at all. 215 w = rp_s(h, w, ".tw{overflow-x:auto}" as *u8) 216 w = rp_s(h, w, "table{width:100%;border-collapse:collapse;margin-top:4px}" as *u8) 217 w = rp_s(h, w, "th,td{text-align:left;padding:8px 9px;border-bottom:1px solid var(--line);font-size:var(--nx-font-size-sm);vertical-align:top}" as *u8) 218 w = rp_s(h, w, "th{color:var(--dim);font-weight:600;font-size:var(--nx-font-size-xs);letter-spacing:.04em;background:var(--pan)}" as *u8) 219 // The incumbent had `td.l{white-space:nowrap}`. On a phone that pinned the widest lane label 220 // ("chain-of-evidence") to one line and forced the whole four-column table wider than the 221 // viewport. Lane names wrap now; only the short rung ids stay on one line. 222 w = rp_s(h, w, "td.l{font-weight:700}" as *u8) 223 w = rp_s(h, w, "td.f{color:var(--dim)}" as *u8) 224 w = rp_s(h, w, "td.r{color:var(--acc);white-space:nowrap;font-family:ui-monospace,monospace}" as *u8) 225 w = rp_s(h, w, "ol{margin:6px 0 0;padding-left:20px}ol li{margin:6px 0}" as *u8) 226 w = rp_s(h, w, "a{color:var(--acc)}a.s{text-decoration:none}a:hover{text-decoration:underline}" as *u8) 227 // WCAG 2.1 SC 2.4.7 Focus Visible -- an external bar, not a local taste. focus-visible rather 228 // than focus so a mouse click does not paint a ring. 229 w = rp_s(h, w, "a:focus-visible,.skip:focus-visible{outline:2px solid var(--acc);outline-offset:2px}" as *u8) 230 w = rp_s(h, w, ".foot{margin-top:34px;color:var(--dim);font-size:var(--nx-font-size-sm);border-top:1px solid var(--line);padding-top:13px}" as *u8) 231 w = rp_s(h, w, "code{color:var(--acc);background:var(--raise);border-radius:var(--nx-radius-sm);padding:1px 5px}" as *u8) 232 w = rp_s(h, w, "b.g{color:var(--ok)}" as *u8) 233 // ALL movement is opt-in: motion-sensitive users never get it. The values are brand tokens, so 234 // motion re-themes with the brand instead of being a number frozen in a rule. 235 w = rp_s(h, w, "@media(prefers-reduced-motion:no-preference){a{transition:color var(--nx-motion-fast) var(--nx-motion-ease)}}" as *u8) 236 w = rp_s(h, w, "</style></head><body>" as *u8) 237 238 // ---------- body ---------- 239 // COPY IS THE RESEARCHER'S AND IS REPRODUCED VERBATIM. This organ owns structure and tokens; it 240 // does not own a single claim on this page, and must never quietly reword one. 241 w = rp_s(h, w, "<a class='skip' href='#main'>Skip to content</a>" as *u8) 242 w = rp_s(h, w, "<main class='wrap' id='main'>" as *u8) 243 w = rp_s(h, w, "<h1>Nishi Research &mdash; the beyond-SOTA frontier &amp; fetch spec</h1>" as *u8) 244 w = rp_s(h, w, "<p class=sub>What to build to EXCEED the state of the art, and exactly what to look for when we fetch. Accountable: <b>researcher</b>. Every row = a filed frontier rung, momentum-ranked from real corpora (OpenAlex 4MB &middot; Crossref 3.8MB) via <code>nx_swcompare_gapmap</code>. Map: <a href=/org>/org</a> &middot; graph: <a href=/atlas>/atlas</a> &middot; benches+radars: <a href=/compare>/compare</a>.</p>" as *u8) 245 w = rp_s(h, w, "<h2>The frontier &mdash; per lane: the top unproven opportunity + what to fetch</h2>" as *u8) 246 w = rp_s(h, w, "<div class=tw><table><tr><th>Lane</th><th>Beyond-SOTA opportunity</th><th>What to fetch (look for)</th><th>Rung</th></tr>" as *u8) 247 w = rp_s(h, w, "<tr><td class=l>video</td><td>end-to-end NEURAL codec &middot; implicit neural representation &middot; learned entropy/RDO &middot; perceptual/generative</td><td class=f>DCVC-FM, hyperprior/learned-entropy, VVC/AV1 tool-set, GAN-perceptual metrics &mdash; look for RD curves vs x264/x265 at equal SSIM</td><td class=r>F611</td></tr>" as *u8) 248 w = rp_s(h, w, "<tr><td class=l>recall/search</td><td>neural RERANK &middot; RRF hybrid BM25+dense &middot; web-scale index</td><td class=f>BEIR suite (13 tasks), cross-encoder rerankers, SPLADE/ColBERT &mdash; look for nDCG@10 + latency + which signals fuse</td><td class=r>F231/236</td></tr>" as *u8) 249 w = rp_s(h, w, "<tr><td class=l>atlas/recombine</td><td>link-prediction on the dep graph &middot; workflow mining &middot; evolutionary recombination</td><td class=f>node2vec/GraphSAGE, van der Aalst process mining, AlphaEvolve/OpenEvolve, CodeScene change-coupling, Structure101/Lattix DSM, ArchUnit fitness-functions</td><td class=r>F225a</td></tr>" as *u8) 250 w = rp_s(h, w, "<tr><td class=l>living-docs</td><td>GraphRAG over the doc-graph &middot; executable/literate docs &middot; staleness-detect</td><td class=f>OpenAlex momentum: literate-docs (12) &middot; GraphRAG (6) &middot; doc-staleness (3) &middot; LLM-authoring (3) &mdash; look for retrieval grounding + freshness treatment</td><td class=r>F250</td></tr>" as *u8) 251 w = rp_s(h, w, "<tr><td class=l>pm/ROI</td><td>autonomous-agent productivity metrics (a new category) &middot; real-time EVM</td><td class=f>Jellyfish, LinearB, Swarmia, DX getdx, Cortex &mdash; the DORA report, the SPACE paper (Forsgren), DX Core 4; look for source-of-metric + uncertainty/provenance treatment (none tag it = our exceed)</td><td class=r>F740-743</td></tr>" as *u8) 252 w = rp_s(h, w, "<tr><td class=l>chain-of-evidence</td><td>PQ signatures &middot; transparency log &middot; ZK proofs &middot; witness quorum</td><td class=f>Sigstore/Rekor, in-toto/SLSA, C2PA 2.x, AWS QLDB &mdash; interop-EXPORT mappings only (3rd-party substrate refused by sovereignty doctrine); look for the trust-root + revocation model</td><td class=r>F707</td></tr>" as *u8) 253 w = rp_s(h, w, "<tr><td class=l>model/LLM</td><td>train-our-own AT SCALE (today: honest TOY) &middot; no-float training</td><td class=f>Megatron/DeepSpeed parallelism, K-quant/GGUF, the scaling-law papers &mdash; look for tokens/param + the integer-determinism boundary</td><td class=r>F235</td></tr>" as *u8) 254 w = rp_s(h, w, "<tr><td class=l>gpu</td><td>first sovereign submit on the 5080 &middot; C0 GEMM &middot; tensor-core paths</td><td class=f>CUDA/ROCm kernel patterns, CUTLASS tiling, the 5080 ISA &mdash; look for occupancy + the bit-exact-vs-fast tradeoff</td><td class=r>F101</td></tr>" as *u8) 255 w = rp_s(h, w, "<tr><td class=l>civic</td><td>legislative tracking &middot; grounded aggregation &middot; corruption signal</td><td class=f>Crossref 3.8MB corpus, court-docket + SEC-EDGAR + USPTO feeds &mdash; look for citations verifiable vs fabricated (the zombie-loop firewall, atlas-hygiene F263)</td><td class=r>F318</td></tr>" as *u8) 256 w = rp_s(h, w, "</table></div>" as *u8) 257 w = rp_s(h, w, "<h2>The fetch doctrine &mdash; what EVERY fetch looks for</h2>" as *u8) 258 w = rp_s(h, w, "<ol><li><b class=g>Grounding over fluency</b> &mdash; a claim is only usable if it traces to a real source (DOI/patent/filing); fabricated citations are blocked at ingest (atlas-hygiene zombie-loop firewall F263).</li>" as *u8) 259 w = rp_s(h, w, "<li><b class=g>Freshness + provenance-tag</b> &mdash; record when the source was published and mark it PRIMARY vs AI-SYNTHESIZED; never let a synthesized summary become primary validation.</li>" as *u8) 260 w = rp_s(h, w, "<li><b class=g>Exceed vs parity</b> &mdash; a fetch answers &quot;where is SOTA, and which axis can we EXCEED sovereignly?&quot; not &quot;how do we copy it&quot;; sub-SOTA is a filed rung, never a design excuse.</li>" as *u8) 261 w = rp_s(h, w, "<li><b class=g>Measured, not asserted</b> &mdash; the comparison must run on real corpora (gapmap momentum) or a real bench (BEIR/DORA), liar-killed, with the envelope declared.</li></ol>" as *u8) 262 w = rp_s(h, w, "<h2>The infrastructure</h2>" as *u8) 263 w = rp_s(h, w, "<p class=sub>Corpora fetched sovereignly over our own TLS (<code>nx_https_get</code>): OpenAlex (4MB, 2024-26 works) + Crossref (3.8MB). Per-domain <code>.q</code> = the fetch-query spec; <code>.axes</code> = the coverage axes; <code>nx_swcompare_gapmap</code> ranks opportunities by 2025/26 momentum (liar-killed, envelope-declared, silent-truncation banned). Live radars: <a class=s href=/compare/video/frontier>video</a> &middot; <a class=s href=/compare/livingdocs/frontier>livingdocs</a> &middot; <a class=s href=/compare/civic/frontier>civic</a> &middot; <a class=s href=/compare/search/frontier>search</a> &middot; and every <code>/compare/&lt;domain&gt;/frontier</code>.</p>" as *u8) 264 w = rp_s(h, w, "<p class=foot>Accountable = researcher; Responsible = the per-lane researcher + the lane engineer who ships the proof. Consulted = the domain census (referee/librarian); Informed = pm (triages accepted rungs into the board via <a class=s href=/plan>/plan</a>). Every opportunity here is UNPROVEN by design &mdash; it becomes real only when a gate or a run proves it, then it enters the atlas and the next fetch looks further out.</p>" as *u8) 265 w = rp_s(h, w, "</main></body></html>" as *u8) 266 267 // ---------- non-vacuity: the page buffer must not have saturated ---------- 268 // rp_s is bounded and SATURATES rather than erroring, so without this tooth an oversized page 269 // would ship SILENTLY TRUNCATED -- valid-looking HTML with its tail missing. 270 if w >= RP_CAP { 271 rp_err("FATAL: page hit RP_CAP -- the document is TRUNCATED\n" as *u8) 272 sys_exit(2) 273 return 2 274 } 275 276 // ---------- publish: tmp + rename ---------- 277 let fd: i64 = sys_openat_wr(RP_TMP, RP_MODE_0644) 278 if fd < 0 { 279 rp_err("FATAL: cannot open sites/nishifamily/research.html.tmp for write\n" as *u8) 280 sys_exit(2) 281 return 2 282 } 283 let wr: i64 = sys_write(fd, h, w) 284 sys_close(fd) 285 if wr != w { 286 rp_err("FATAL: short write -- refusing to rename a partial page over the live one\n" as *u8) 287 sys_exit(2) 288 return 2 289 } 290 sys_renameat(RP_TMP, RP_OUT) 291 292 let nb: *u8 = sys_mmap(64) 293 rp_out("[nx_research_page] wrote sites/nishifamily/research.html bytes=" as *u8) 294 let e1: i64 = rp_num(nb, 0, 64, w) 295 sys_write(1, nb, e1) 296 rp_out(" light_tokens_bytes=" as *u8) 297 let e2: i64 = rp_num(nb, 0, 64, lw) 298 sys_write(1, nb, e2) 299 rp_out(" dark_tokens_bytes=" as *u8) 300 let e3: i64 = rp_num(nb, 0, 64, dw) 301 sys_write(1, nb, e3) 302 rp_out("\n" as *u8) 303 sys_exit(0) 304 return 0 305}