nx_fetch_any_gate.nx
buildroot/runtime/nx_fetch_any_gate.nx
about
nx_fetch_any_gate.nx -- teeth for the intelligent fetch dispatcher (operator 2026-07-14: researcher/census/
adversary/critic must "not get errors and return nothing without informing the user"). ADVERSARY DISCIPLINE:
the classifier is LAW only if it discriminates a REAL page from the exact thing that fools a naive fetcher --
a Cloudflare 200-OK CHALLENGE page. Gates fa_status / fa_challenge / fa_is_real / fa_body_off / fa_to_body.
license_tier: ORIGINAL
D001 MIGRATION 2026-09-01 (/compare/mediaingest). This gate had no elf, and the reason was not neglect:
/api/promote REFUSES a gate that rolls its own verdict, because nothing outside can read its outcome --
nx_gate_green cannot judge it and it records no harness.jrnl frame, so flake and erosion stay invisible.
The teeth here were already good (13 of them, with a real adversary case), which is precisely why the
refusal was expensive: a well-designed gate that cannot be promoted proves nothing at all.
EVERY SUBJECT, ORDER AND ASSERTION IS UNCHANGED. Only the verdict machinery moved onto nx_gate_verdict:
gv_ctr/gv_check make declared == executed by construction (the hand-rolled pass/tot incremented both from
the same line, so a tooth that stopped running lowered nothing and still read GREEN), and gv_verdict puts
the outcome in the exit code where the judge can reach it.
The four teeth that assert a REFUSAL are renamed neg-control-* so the L2 census can SEE them -- they always
were negative controls, and were invisible purely by naming.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_fetch_any.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
| 24 | const G_B: i64 = 66 // 'B' -- the first byte of BODYSTART, so the body-offset teeth assert a byte we chose |
| 25 | const G_HTTP_OK: i64 = 200 |
| 26 | const G_HTTP_FORBIDDEN: i64 = 403 |
| 27 | const G_HTTP_ERR: i64 = 500 |
| 28 | const G_TINY_LEN: i64 = 2 |
| 29 | const G_CPCAP: i64 = 4096 |
functions
| 22 | func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 31 | func main() -> i64 |