nx_firstbyte.nx
buildroot/runtime/nx_firstbyte.nx
about
nx_firstbyte.nx -- FIRST-BYTE-UP ANALYSIS FOR /compare: what does a rung REST ON, where does its
chain stop being sound, and WHICH unsound link is the one you can actually act on?
WHY THIS EXISTS (measured 2026-08-23). Five foundation defects were each found LATE, by a lane
trying to build the rung ABOVE them: nx_skeleton capped at 32 bones / 2048 verts against a corpus of
104-370 joints and 14,164-423,919 verts; nx_gsplat pinned to a compile-time 512x384 while every
inner kernel was ALREADY viewport-agnostic; PF_NB=48 binning an oracle holding 4096 points/section;
the LANGUAGE having no vector types; and nothing able to bind a generated mesh to a generated
skeleton. In EVERY case /compare showed the rung OPEN and never showed WHAT IT RESTS ON.
*** NOT A SECOND GRAPH. *** nx_eco_graph_build already walks and persists the import graph, and
eg_ancestors is "roots-to-god (transitive imports, down to leaves)" -- that IS the first-byte-up
chain, and it had never been pointed at a compare board. This organ derives NO edges: it is the JOIN
between <domain>.matrix rows and that closure, plus a per-link soundness query.
*** THE CAP AXIS IS MEASURED. *** `nx_capcensus file <path>` answers per module IN ITS EXIT CODE --
0 CLEAN / 1 CAPPED / 3 UNREADABLE -- so a foundation check BRANCHES WITHOUT PARSING. We compose that
verdict; we never re-implement its classifier. Because the answer is the exit code and not the text,
a truncated capture cannot change it. ABSTENTION IS INHERITED: the census refuses to report CLEAN
over a module it never read, so this organ refuses READY over a chain containing such a module.
*** RANKING: "NEAREST" IS NOT "MOST ACTIONABLE". ***
v1 named the FIRST capped link found. With only 2.56% of estate bounds DERIVED, most chains carry
SEVERAL capped links -- so v1 reported `first_unsound=nx_syscalls.nx` on rungs whose real problem was
elsewhere: true, and completely non-actionable. A CAP IN A LEAF EVERYONE SHARES IS A DIFFERENT
FINDING FROM A CAP IN YOUR OWN MODULE, AND REPORTING THE FIRST HIDES THE SECOND. Every capped link
is now reported, classified and ranked:
OWN the rung's own source -- the lane that owns this rung owns the fix. Ranked first.
RARE few dependents -- a targeted fix. Ranked by ASCENDING fan-in, rarest first.
UBIQUITOUS appears in EVERY resolved chain on this board -- an estate-wide concern, never a
rung's blocker. Ranked last so it can never mask an actionable link again.
BOTH CLASS BOUNDARIES ARE DERIVED, NOT PICKED. "Ubiquitous" is defined by the board itself (present
in all N resolved chains, N counted this run), and "rare" is ordered by the graph's own fan-in via
eg_ca -- the closure is already computed, so the dependent count is free. There is no threshold
constant anywhere in this classification, because a picked one would be the seventh phony cap.
A rung with ONE capped link in its own module and a rung with NINE scattered through shared leaves
are different situations, and the per-rung own/rare/ubiq counts now say which is which.
KNOWN ERROR TERM ON EVERY CAPPED VERDICT, disclosed by the census itself: it flagged CE_C_SHOWMAX=12
-- a COUNTER INDEX, not a capacity bound -- because the name contains "MAX".
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_eco_graph.nxnx_gatekit_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 78 | const FB_STORE: *u8 = "knowledge/store/ecograph_full" as *u8 |
| 79 | const FB_MATPFX: *u8 = "buildroot/knowledge/compare/" as *u8 |
| 80 | const FB_MATSFX: *u8 = ".matrix" as *u8 |
| 81 | const FB_CENSUS: *u8 = "./nx_capcensus.elf" as *u8 |
| 82 | const FB_RTPFX: *u8 = "buildroot/runtime/" as *u8 |
| 83 | const FB_HDLPFX: *u8 = "buildroot/runtime/_hdl_build/" as *u8 |
| 84 | const FB_PATHW: i64 = 4096 |
| 85 | const FB_NAMEW: i64 = 256 |
| 88 | const FB_CAPBUF: i64 = 65536 |
| 90 | const FB_EXIT_NOTREADY: i64 = 1 |
| 91 | const FB_EXIT_USAGE: i64 = 2 |
| 92 | const FB_EXIT_NOGRAPH: i64 = 3 |
| 93 | const FB_EXIT_NOMATRIX: i64 = 4 |
| 95 | const FB_READY: i64 = 0 |
| 96 | const FB_PLACEHOLDER: i64 = 1 |
| 97 | const FB_ABSENT: i64 = 2 |
| 98 | const FB_UNKNOWN: i64 = 3 |
| 99 | const FB_EMPTY: i64 = 4 |
| 100 | const FB_CAPPED: i64 = 5 |
| 101 | const FB_UNOBS: i64 = 6 |
| 103 | const FB_Q_CLEAN: i64 = 1 |
| 104 | const FB_Q_CAPPED: i64 = 2 |
| 105 | const FB_Q_UNREAD: i64 = 3 |
| 108 | const FB_K_OWN: i64 = 0 |
| 109 | const FB_K_RARE: i64 = 1 |
| 110 | const FB_K_UBIQ: i64 = 2 |
functions
| 125 | func fb_rank_class(node: i64, own: i64, nres: i64) -> i64 called by 1: main |
| 131 | func fb_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 132 | func fb_span(b: *u8, s: i64, e: i64) -> i64 { if e > s { sys_write(1, ((b as i64) + s) as *u8, e - s) } return 0 } |
| 134 | func fb_wn(v: i64) -> i64 |
| 147 | func fb_join(dst: *u8, pfx: *u8, base: *u8) -> i64 |
| 157 | func fb_matpath(dom: *u8) -> i64 |
| 168 | func fb_cap_query(base: *u8) -> i64 |
| 184 | func fb_state_of(g: *EcoGraph, node: i64) -> i64 |
| 193 | func fb_field(b: *u8, ls: i64, le: i64, idx: i64, fe: *i64) -> i64 called by 1: main |
| 211 | func fb_basename(b: *u8, s: i64, e: i64) -> i64 called by 1: main |
| 222 | func fb_is_absent_sym(b: *u8, s: i64, e: i64) -> i64 called by 1: main |
| 233 | func main(argc: i64, argv: *i64) -> i64 |