code wiki / _hdl_build / nx_compare_rank_gate.nx
nx_compare_rank_gate.nx
buildroot/runtime/_hdl_build/nx_compare_rank_gate.nx
about
nx_compare_rank_gate.nx -- THE LIAR-KILLER ON THE RANKER (operator 2026-08-18: "validate it ... if some
stupid shit like your made up magic numbers come into the system or any other stupid blockers happen
the team can overcome the blocker ... a liar killer extraordinaire ... not allowing you to build shitty
clay and polish it and call it sota").
A ranker that cannot be refused is another authoritative number nobody audits. This gate makes every
failure class the operator named UNPASSABLE in silence, and every RED prints the UNBLOCK ACTION so a
team member acts without the seat that caused it:
T1 NO CHOSEN COEFFICIENTS: nx_law_warden countfile on the ranker's own source must be 0 inline
magic. A seat that smuggles a constant back in turns this RED before the ranking is trusted.
T2 GRAPHICS VALIDATION: on the REAL graphics board the top critical-path rung must be the referee
panel (cjc_panel) -- the pre-declared Phase-0 gate: nothing above it is measurable without it.
A wrong first pick means the mathematics regressed. (Runs the live ranker on the live board.)
T3 CLAY-POLISH REFUSAL: on the fixture, a rung whose row shows EVERY rival LEADING (the field is
lapping us -- catch-up gap) must rank ABOVE an equal-cost rung nobody has (the exceed lane) --
polishing a lead while the field laps you on fundamentals is the clay-polish failure by name.
(CoD makes this true: leading/rivals=1 doubles the value.)
T4 DERIVATION FIRES: fixture rungs with est=- print UNESTIMATED; two rungs on one organ print
cluster=2; enablement counts a dependency root ABOVE its dependents. Anti-vacuity: the derivation
is proven to move numbers, not just to print names.
T5 SPONSOR BITES BOTH WAYS: a minus2 sponsor row on the fixture domain LOWERS the affected rung's
priority versus the run without it, and the run names the row -- a plane write that cannot move
the number means the term is dead. neg-control-sponsor-absent = the run without the row.
T6 THE RANKER COUNTS ITSELF: done + open == rungs on the summary line (partition sums), else RED.
T7 SUMMARY CARRIES THE RULE: the published rule line names WSJF+real-options+dep-graph -- a
ranker whose printed rule drifts from its header is a lie with a trusted byline.
Fixture is assembled at RUNTIME (never checked in: a detector that scans source would find its own
fixture). The ranker reads buildroot/knowledge/compare/<dom>.* by construction, so the fixture domain
`rankgatefx` is written THERE and REMOVED at the end -- and it is harmless on any early-exit path:
no regen.list row names it, so no page can ever emit it, and the fixture sponsor row is closed.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tool_run.nxnx_gate_verdict.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
| 36 | const RG_CAP: i64 = 262144 |
| 37 | const RG_TIMEOUT_MS: i64 = 240000 |
| 38 | const RG_FX_DOM: *u8 = "rankgatefx" |
| 39 | const RG_FX_PLAN: *u8 = "buildroot/knowledge/compare/rankgatefx.plan" |
| 40 | const RG_FX_MATRIX: *u8 = "buildroot/knowledge/compare/rankgatefx.matrix" |
| 41 | const RG_RANKER: *u8 = "./nx_compare_rank.elf" |
| 42 | const RG_RANKER_BUILD: *u8 = "./buildroot/_build/nx_compare_rank.sov.elf" |
| 43 | const RG_RANKER_STAGED: *u8 = "./nx_compare_rank.sov.elf.new" |
| 45 | const RG_MODE_RW: i64 = 420 |
| 163 | const RGD_DIR: *u8 = "buildroot/knowledge/compare" |
| 164 | const RGD_BASE: *u8 = "knowledge/status/rungid_dup.conf" |
| 165 | const RGD_DBUF: i64 = 65536 |
| 166 | const RGD_MAXID: i64 = 1024 |
| 167 | const RGD_IDLEN: i64 = 24 |
| 168 | const RGD_DENT_NAME_OFF: i64 = 19 // getdents64: d_ino 8 + d_off 8 + d_reclen 2 + d_type 1 |
| 169 | const RGD_DENT_RECLEN_OFF: i64 = 16 |
functions
| 47 | func rg_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 48 | func rg_has(hay: *u8, hlen: i64, needle: *u8) -> i64 |
| 62 | func rg_find(hay: *u8, hlen: i64, needle: *u8, from: i64) -> i64 |
| 75 | func rg_int_after(hay: *u8, hlen: i64, needle: *u8) -> i64 |
| 87 | func rg_pri_of(out: *u8, olen: i64, rid: *u8) -> i64 |
| 100 | func rg_rank_of(out: *u8, olen: i64, rid: *u8) -> i64 |
| 122 | func rg_write(path: *u8, body: *u8) -> i64 |
| 129 | func rg_run(dom: *u8, out: *u8, olen: *i64) -> i64 |
| 171 | func rgd_slen(a: *u8) -> i64 { var n: i64 = 0; while a[n] != (0 as u8) { n = n + 1 } return n } called by 1: rgd_ends_plan |
| 172 | func rgd_cat(d: *u8, p: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { d[p + i] = src[i]; i = i + 1 } d[p + i] = 0 as u8; return p + i } |
| 173 | func rgd_ends_plan(nm: *u8) -> i64 |
| 184 | func rgd_id_eq(tbl: *u8, k: i64, id: *u8, idn: i64) -> i64 called by 1: rgd_scan_plan |
| 192 | func rgd_scan_plan(dirp: *u8, nm: *u8, rep: *u8, repos: *i64, repcap: i64) -> i64 |
| 256 | func rgd_fleet(rep: *u8, repcap: i64, files: *i64) -> i64 { return rgd_fleet_in(RGD_DIR, rep, repcap, files) } |
| 259 | func rgd_fleet_in(dirp: *u8, rep: *u8, repcap: i64, files: *i64) -> i64 |
| 293 | func main(argc: i64, argv: *i64) -> i64 |