code wiki / (root) / nx_fetchwall_gate.nx

nx_fetchwall_gate.nx source

↩ module page · 167 lines · 10424 B

1// nx_fetchwall_gate.nx -- THE GATE FOR THE FETCH-WALL CLASSIFIER, 2026-09-03. 2// 3// SUBJECT: fw_classify / fw_classify_file in-process (nx_fetchwall_lib has no main). 4// 5// THE FIXTURES ARE REAL, NOT PLANTED. The positive is the actual Google AI Mode share body mirrored by 6// nx_research_fetch on 2026-09-03 (status=200, 92982 bytes, a JS gate carrying none of the answer). The 7// false-positive controls are the SEVENTEEN curated phototwin reference mirrors -- real fetched pages that 8// were adjudicated and re-fetched by the refs lane -- because a detector bite-proven only on planted 9// fixtures is not calibrated, which is exactly how nx_mirrorintegrity shipped a 941-permil false-positive 10// rate onto real data. EVERY control row is PRINTED with its permil so a genuine wall hiding among the 11// mirrors is visible as a finding rather than swallowed as a failure. 12// 13// Teeth, in order: 14// T1 the real wall body classifies as a WALL at all. 15// T2 it is named WALL-JS-GATED, not merely convicted. 16// T3 the STRUCTURAL axis is what fired: its fitted-text permil is under the bar. 17// T4 FALSE-POSITIVE CONTROL over all seventeen real mirrors. 18// T5 NEG-CONTROL: dense prose with no markers reads CONTENT. 19// T6 NEG-CONTROL: dense prose that MENTIONS sign-in and cookies STILL reads CONTENT -- markers must never 20// override structure, and without this tooth the marker list would convict half the estate's corpus. 21// T7 NEG-CONTROL: a thin JS-gate body reads WALL-JS-GATED -- so T6 cannot pass by the markers being dead. 22// T6 and T7 are the SAME ordering proven from both sides; either alone is vacuous. 23// T8 NEG-CONTROL: a zero-length body ABSTAINS as UNPROVEN and never reads as content. 24// T9 NEG-CONTROL: a body under the prose floor reads EMPTY, not a convicted wall. 25// license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 26import "nx_syscalls.nx" 27import "nx_gate_verdict.nx" 28import "nx_fetchwall_lib.nx" 29 30const FWG_WALL: *u8 = "knowledge/fetched/cmp_aimode_q4rAREPI.html" 31const FWG_NC: i64 = 17 32const FWG_MIN_CONTENT: i64 = 14 33const FWG_SLOT: i64 = 8 34 35const FWG_PROSE: *u8 = "<html><body><article><h1>Colour management on cotton</h1><p>An ICC profile describes what gamut a device can reproduce, so an image and a substrate meet in one space and the difference between them is stated in the unit the whole field uses rather than argued about in adjectives. </p><p>Wash fastness is measured on the actual blank rather than promised in a brochure, and the licence chain travels with every item as data on the row beside it. </p></article></body></html>" 36const FWG_PROSE_MARKED: *u8 = "<html><body><article><h1>Colour management on cotton</h1><p>An ICC profile describes what gamut a device can reproduce, so an image and a substrate meet in one space and the difference between them is stated in the unit the whole field uses rather than argued about in adjectives. </p><p>This article discusses paywalls, and notes that some publishers ask you to sign in to continue and to accept all cookies before you continue reading their material. </p></article></body></html>" 37const FWG_WALLJS: *u8 = "<html><head><title>Google Search</title><script>window.g=window.g||{};function q(a,b){return a+b}var z=q(1,2);function r(x){var y=0;while(y<x){y=y+1}return y}var w=r(64);function s(k){return k*3}var v=s(w);function t(m){return m-1}var u=t(v);</script></head><body><noscript><meta content='0;url=/httpservice/retry/enablejs' http-equiv='refresh'><div>Please click here if you are not redirected within a few seconds.</div></noscript><script>var aa=1;var bb=2;var cc=3;function dd(){return aa+bb+cc}var ee=dd();function ff(){return ee*2}</script></body></html>" 38const FWG_SHORT: *u8 = "<html><body><p>hi</p></body></html>" 39 40func fwg_len(s: *u8) -> i64 { 41 var n: i64 = 0 42 while s[n] != (0 as u8) { n = n + 1 } 43 return n 44} 45func fwg_row(tag: *u8, path: *u8, o: *i64) -> i64 { 46 gv_puts(tag) 47 gv_puts(path) 48 gv_puts(" -> " as *u8) 49 gv_puts(fw_name(o[FW_O_VERDICT])) 50 gv_puts(" body=" as *u8); gv_num(o[FW_O_BODY]) 51 gv_puts(" text=" as *u8); gv_num(o[FW_O_TEXT]) 52 gv_puts(" permil=" as *u8); gv_num(o[FW_O_PERMIL]) 53 gv_puts(" sig js=" as *u8); gv_num(o[FW_O_JS]) 54 gv_puts(" chal=" as *u8); gv_num(o[FW_O_CHAL]) 55 gv_puts(" cons=" as *u8); gv_num(o[FW_O_CONS]) 56 gv_puts(" login=" as *u8); gv_num(o[FW_O_LOGIN]) 57 gv_puts("\n" as *u8) 58 return 0 59} 60 61func main(argc: i64, argv: *i64) -> i64 { 62 let ctr: *i64 = gv_ctr() 63 gv_head("nx_fetchwall gate -- does a fetched body carry content, or is it a wall wearing a 200" as *u8) 64 65 let o: *i64 = sys_mmap(FW_O_SLOTS * FWG_SLOT) as *i64 66 67 // ---- T1..T3 the REAL wall specimen ---- 68 let wv: i64 = fw_classify_file(FWG_WALL, o) 69 fwg_row(" [wall] " as *u8, FWG_WALL, o) 70 let wperm: i64 = o[FW_O_PERMIL] 71 let wtext: i64 = o[FW_O_TEXT] 72 let wbody: i64 = o[FW_O_BODY] 73 let wjs: i64 = o[FW_O_JS] 74 gv_check("the-real-google-ai-mode-mirror-classifies-as-a-wall" as *u8, fw_is_wall(wv), ctr) 75 gv_check("the-real-wall-is-NAMED-js-gated-not-merely-convicted" as *u8, (wv == FW_WALL_JS) as i64, ctr) 76 var st: i64 = 0 77 if wv != FW_UNPROVEN { if o[FW_O_PERMIL] < FW_CONTENT_PERMIL { st = 1 } } 78 gv_check("the-structural-axis-is-what-fired-on-the-real-wall (fitted-text permil under the bar)" as *u8, st, ctr) 79 80 // ---- T4 FALSE-POSITIVE CONTROL over every curated mirror ---- 81 let p: *i64 = sys_mmap(FWG_NC * FWG_SLOT) as *i64 82 p[0] = "knowledge/fetched/cmp_phototwin_supima.html" as i64 83 p[1] = "knowledge/fetched/cmp_phototwin_epson.html" as i64 84 p[2] = "knowledge/fetched/cmp_phototwin_aatcc61.html" as i64 85 p[3] = "knowledge/fetched/cmp_phototwin_iso105c06.html" as i64 86 p[4] = "knowledge/fetched/cmp_phototwin_copyright.html" as i64 87 p[5] = "knowledge/fetched/cmp_phototwin_fotoroom.html" as i64 88 p[6] = "knowledge/fetched/cmp_phototwin_kornitguide.html" as i64 89 p[7] = "knowledge/fetched/cmp_phototwin_fespa.html" as i64 90 p[8] = "knowledge/fetched/cmp_phototwin_deltae.html" as i64 91 p[9] = "knowledge/fetched/cmp_phototwin_kornitbest.html" as i64 92 p[10] = "knowledge/fetched/cmp_phototwin_icc.html" as i64 93 p[11] = "knowledge/fetched/cmp_phototwin_fiberguide.html" as i64 94 p[12] = "knowledge/fetched/cmp_phototwin_supimaguide.html" as i64 95 p[13] = "knowledge/fetched/cmp_phototwin_srgbpage.html" as i64 96 p[14] = "knowledge/fetched/cmp_phototwin_kornit.html" as i64 97 p[15] = "knowledge/fetched/cmp_phototwin_gelato.html" as i64 98 p[16] = "knowledge/fetched/cmp_phototwin_ofblank.html" as i64 99 var ncontent: i64 = 0 100 var nwall: i64 = 0 101 var nunproven: i64 = 0 102 var i: i64 = 0 103 while i < FWG_NC { 104 let cv: i64 = fw_classify_file(p[i] as *u8, o) 105 fwg_row(" [ctrl] " as *u8, p[i] as *u8, o) 106 if cv == FW_CONTENT { ncontent = ncontent + 1 } 107 if fw_is_wall(cv) == 1 { nwall = nwall + 1 } 108 if cv == FW_UNPROVEN { nunproven = nunproven + 1 } 109 i = i + 1 110 } 111 gv_puts(" [T4] controls=" as *u8); gv_num(FWG_NC) 112 gv_puts(" content=" as *u8); gv_num(ncontent) 113 gv_puts(" wall=" as *u8); gv_num(nwall) 114 gv_puts(" unproven=" as *u8); gv_num(nunproven) 115 gv_puts(" floor=" as *u8); gv_num(FWG_MIN_CONTENT) 116 gv_puts("\n" as *u8) 117 gv_check("false-positive-control-real-curated-mirrors-read-as-content-at-or-above-the-floor" as *u8, (ncontent >= FWG_MIN_CONTENT) as i64, ctr) 118 119 // ---- T5 dense prose, no markers ---- 120 let n5: i64 = fwg_len(FWG_PROSE) 121 let v5: i64 = fw_classify(FWG_PROSE, n5, o) 122 fwg_row(" [neg ] " as *u8, "synthetic-dense-prose-no-markers" as *u8, o) 123 gv_check("neg-control-dense-prose-with-no-markers-reads-content" as *u8, (v5 == FW_CONTENT) as i64, ctr) 124 125 // ---- T6 dense prose that MENTIONS the marker vocabulary ---- 126 let n6: i64 = fwg_len(FWG_PROSE_MARKED) 127 let v6: i64 = fw_classify(FWG_PROSE_MARKED, n6, o) 128 fwg_row(" [neg ] " as *u8, "synthetic-dense-prose-MENTIONING-signin-and-cookies" as *u8, o) 129 var t6: i64 = 0 130 if v6 == FW_CONTENT { if o[FW_O_CONS] + o[FW_O_LOGIN] > 0 { t6 = 1 } } 131 gv_check("neg-control-markers-do-NOT-override-structure (the fixture DID carry marker hits and still read content)" as *u8, t6, ctr) 132 133 // ---- T7 thin JS gate ---- 134 let n7: i64 = fwg_len(FWG_WALLJS) 135 let v7: i64 = fw_classify(FWG_WALLJS, n7, o) 136 fwg_row(" [neg ] " as *u8, "synthetic-thin-js-gate" as *u8, o) 137 gv_check("neg-control-a-thin-js-gate-is-named-js-gated (so T6 cannot pass by the markers being dead)" as *u8, (v7 == FW_WALL_JS) as i64, ctr) 138 139 // ---- T8 abstain on nothing ---- 140 let v8: i64 = fw_classify(FWG_PROSE, 0, o) 141 gv_puts(" [T8] zero_length -> " as *u8); gv_puts(fw_name(v8)); gv_puts("\n" as *u8) 142 gv_check("neg-control-a-zero-length-body-abstains-as-unproven-and-never-reads-as-content" as *u8, (v8 == FW_UNPROVEN) as i64, ctr) 143 144 // ---- T9 short body is EMPTY, not a convicted wall ---- 145 let n9: i64 = fwg_len(FWG_SHORT) 146 let v9: i64 = fw_classify(FWG_SHORT, n9, o) 147 gv_puts(" [T9] short_body bytes=" as *u8); gv_num(n9); gv_puts(" -> " as *u8); gv_puts(fw_name(v9)); gv_puts("\n" as *u8) 148 gv_check("neg-control-a-body-under-the-prose-floor-reads-empty-not-a-convicted-wall" as *u8, (v9 == FW_EMPTY) as i64, ctr) 149 150 // RECAP. The ship loop surfaces only the gate TAIL, so a RED in T1..T4 scrolled off the top and the 151 // reader could not tell WHICH condition failed -- a verdict whose evidence is unreachable is the same 152 // defect as a count without a worklist. These rows are restated here where they cannot be cut off. 153 gv_puts(" [RECAP] wall=" as *u8); gv_puts(fw_name(wv)) 154 gv_puts(" body=" as *u8); gv_num(wbody) 155 gv_puts(" text=" as *u8); gv_num(wtext) 156 gv_puts(" permil=" as *u8); gv_num(wperm) 157 gv_puts(" js=" as *u8); gv_num(wjs) 158 gv_puts(" bar=" as *u8); gv_num(FW_CONTENT_PERMIL) 159 gv_puts(" | controls=" as *u8); gv_num(FWG_NC) 160 gv_puts(" content=" as *u8); gv_num(ncontent) 161 gv_puts(" wallish=" as *u8); gv_num(nwall) 162 gv_puts(" unproven=" as *u8); gv_num(nunproven) 163 gv_puts(" floor=" as *u8); gv_num(FWG_MIN_CONTENT) 164 gv_puts("\n" as *u8) 165 166 return gv_verdict("fetchwall" as *u8, ctr, "a fetched body is classified content or wall by structure first and named by marker second, proven on the real specimen and against real curated mirrors" as *u8) 167}