code wiki / (root) / nx_fetchfail.nx

nx_fetchfail.nx

buildroot/runtime/nx_fetchfail.nx

30146 B628 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_fetchfail.nx -- WIRES THE CONTENT AXIS TO A PLANE. It adds NO ruler of its own. WHY THIS EXISTS AND WHAT IT DELIBERATELY DOES NOT DO. On 2026-08-25 a sibling seat landed the content classifier (mi_content_class, in nx_mirrorintegrity_lib.nx) which decides whether a stored mirror is the DOCUMENT or merely a bot wall, a login gate, an error page or a JS shell. Measured the same hour: that function had exactly ONE reference in the whole tree -- its own definition, over 23,234 files at corpus_complete=1 -- and the conf it reads did not exist. It was BUILT + UNWIRED, and a classifier nobody calls is a comment. So this organ is the wiring, not a second opinion: A DUPLICATE RULER IS THE DEBT. EXTEND THE INCUMBENT, NEVER ADD A SECOND. Every classification below comes from mi_content_class. If its verdict is wrong, it is fixed THERE. TWO VERBS, AND THE FIRST ONE EXISTS BECAUSE THE BAR HAD TO BE DERIVED RATHER THAN PICKED: probe -- walk the corpus and print the PROSE-BYTE DISTRIBUTION. No plane write, no verdict. This is the measurement from which prose-floor-bytes is chosen, and the lib's own comment requires that the shipped bar carry the distribution it came from. A threshold picked by taste is a magic number wearing a config key. census -- classify with the conf bar and emit the plane. (default) THE PLANE: knowledge/store/fetchfail- (seg-store; sovereign rows, NO third-party format anywhere). The prefix is spelled in FULL and never bare: a bare prefix resolves against CWD and makes a populated plane answer EMPTY, which reads exactly like a plane that was never seeded. Row key = the mirror path (stable, so a re-run UPDATES rather than duplicates: rule 10) Row value = url|mirror|class|reason|remedy|prose|bytes|detected_at|state state is OPEN while the body still classifies as a failure and flips to RESOLVED on the first run after it is re-fetched clean -- AN AUTOFILED ROW WITH NO AUTO-CLOSE IS A LATCH, NOT A DETECTOR. nx_fetchfail [probe|census] [dir] default: census knowledge/fetched license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_mirrorintegrity_lib.nx nx_seg_store.nx nx_fetchfail.nx

imports: nx_mirrorintegrity_lib.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ff_streq mi_prose_floor lc_geti sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ lc_read sys_openat_rd sys_read sys_close lc_slen mi_w sys_write ↻ ff_refs_load ff_refs_load_one mi_isdotdot mi_slen mi_cat ss_begin_cap sys_mmap ↻ ss_open ss_open2 ss_open3 sys_now_us sys_mmap ↻ sys_clock_gettime_mono sys_mmap ↻

structs

none

consts

32const FF_PLANE: *u8 = "knowledge/store/fetchfail-\x00"
40const FF_REFSDIR_A: *u8 = "buildroot/knowledge/compare\x00"
41const FF_REFSDIR_B: *u8 = "knowledge/compare\x00"
42const FF_REFSDIR_ABS: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/knowledge/compare\x00"
43const FF_REFSEXT: *u8 = ".refs\x00"
44const FF_ST_OPEN: *u8 = "OPEN\x00"
45const FF_ST_RES: *u8 = "RESOLVED\x00"
46const FF_URL_FIELD: i64 = 3 // refs row: ref|key|cite|url|mirror|pin|accessed|class|grounds
47const FF_MIR_FIELD: i64 = 4
48const FF_MAXREFS: i64 = 512 // declared: .refs files loaded; overflow ANNOUNCES, never silent
49const FF_MAXFIELD: i64 = 32
50const FF_ROWCAP: i64 = 4096
51const FF_KIND_LIVE: i64 = 1 // seg-store live-row kind (0 is a tombstone)
52const FF_DIRBUF: i64 = 131072
53const FF_PATHCAP: i64 = 4096
54const FF_MAXDEPTH: i64 = 8
55const FF_DT_DIR: i64 = 4
56const FF_WORKCAP: i64 = 1048576
57const FF_WORKFLUSH: i64 = 1047000
58const FF_BAR: i64 = 124 // '|'
59const FF_NL: i64 = 10
66const FF_QPFX: *u8 = "q:\x00"
67const FF_MAXPRIOR: i64 = 65536 // declared: prior rows loaded for auto-close; overflow ANNOUNCES
68const FF_PRIORBUF: i64 = 16777216
71const FF_C_FILES: i64 = 0
72const FF_C_FLAG: i64 = 1
73const FF_C_OK: i64 = 2
74const FF_C_NOTHTML: i64 = 3
75const FF_C_RESOLV: i64 = 4
76const FF_C_UNREAD: i64 = 5
80const FF_NBUCK: i64 = 8
81const FF_B1: i64 = 1
82const FF_B2: i64 = 16
83const FF_B3: i64 = 64
84const FF_B4: i64 = 256
85const FF_B5: i64 = 1024
86const FF_B6: i64 = 4096
87const FF_B7: i64 = 16384

functions

89func ff_streq(a: *u8, b: *u8) -> i64
called by 2: ff_prior_openmain
100func ff_bucket(p: i64) -> i64
called by 1: ff_walk
110func ff_bucket_lo(i: i64) -> i64
called by 1: main
124func ff_refs_load_one(dir: *u8, ptrs: *i64, lens: *i64, ovf: *i64) -> i64
179func ff_refs_load(ptrs: *i64, lens: *i64, ovf: *i64, which: *i64) -> i64
called by 1: main calls 1: ff_refs_load_one
194func ff_url_for(mirror: *u8, ptrs: *i64, lens: *i64, nrefs: i64, out: *u8) -> i64
called by 1: ff_walk calls 2: mi_slenmi_find
265func ff_qkey(buf: *u8, n: i64) -> i64
called by 2: ff_prior_loadff_walk calls 2: mi_catmi_catn
276func ff_prior_load(h: *i64, paths: *i64, states: *i64, blob: *u8, ovf: *i64) -> i64
called by 1: main calls 3: ff_qkeyss_hgetmi_find
314func ff_prior_open(path: *u8, paths: *i64, states: *i64, n: i64) -> i64
called by 1: ff_walk calls 1: ff_streq
324func ff_walk(p: *u8, pn: i64, depth: i64, mode: i64, floor: i64,
448func main(argc: i64, argv: *i64) -> i64