code wiki / _hdl_build / nx_feed_gate.nx

nx_feed_gate.nx

buildroot/runtime/_hdl_build/nx_feed_gate.nx

10654 B189 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic feed
docsdependenciesstructsconstsfunctions

about

nx_feed_gate.nx -- KEYLESS-FEED REACHABILITY GATE (eats debt seq856). WHY: on 2026-07-25 the live nx_https_get went chrome-hello-ONLY and silently broke api.nhtsa.gov, data.sec.gov and efts.sec.gov for ~a day. Nothing gated the feed surface, so a fetcher promote that regresses a feed was invisible until a consumer failed. This organ forks the LIVE sovereign fetcher once per keyless feed and asserts exit 0 AND an "HTTP/1.1 200" status line -- so a TLS-hello change, a cert-store break, or a server-side drift turns RED the next time the beat runs. The nhtsa case specifically exercises the plain-hello FALLBACK path; the worldbank case exercises the chrome-first path -- both hello paths are load-bearing and both are gated. argv[1] (optional) = fetcher elf path override; default = the live nx_https_get_cli2.elf. If the live row is ever repointed, update FDG default (or the pinned row arg) in the same rung. D001: emits a `verdict=` anchor. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_tool_run.nx nx_gate_lib.nx nx_syscalls.nx nx_feed_gate.nx

imports: nx_tool_run.nxnx_gate_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap fdg_case sys_mmap ↻ tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close ↻ sys_execve sys_exit sys_read sys_wait4 wait_exit_code fdg_contains gl_contains fdg_bcat gl_bcat fdg_bcatn gl_bcatn sys_mmap ↻ tr_run_capture ↻ fdg_contains ↻ fdg_bcat ↻ fdg_bcatn ↻ gl_log sys_openat_append sys_mmap ↻ gl_bcatn ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gl_bcat ↻ sys_write sys_close ↻ fdg_puts gl_puts

structs

none

consts

16const FDG_OUTCAP: i64 = 1048576 // 1 MiB per-fetch capture (h6 page > 64KB; complaints excluded by design)
17const FDG_BUF: i64 = 65536
18const FDG_AVCAP: i64 = 64
19const FDG_SCRATCH: i64 = 32
20const FDG_EXIT_RED: i64 = 1

functions

26func fdg_puts(s: *u8) -> i64 { return gl_puts(s) }
called by 1: main calls 1: gl_puts
27func fdg_putn(v: i64) -> i64 { return gl_putn(v) }
called by 1: main calls 1: gl_putn
28func fdg_bcat(b: *u8, o: i64, s: *u8) -> i64 { return gl_bcat(b, o, s) }
called by 2: fdg_casemain calls 1: gl_bcat
29func fdg_bcatn(b: *u8, o: i64, v: i64) -> i64 { return gl_bcatn(b, o, v) }
called by 2: fdg_casemain calls 1: gl_bcatn
30func fdg_contains(h: *u8, n: i64, needle: *u8) -> i64 { return gl_contains(h, n, needle) }
called by 2: fdg_casemain calls 1: gl_contains
33func fdg_case(nm: *u8, fetcher: *u8, url: *u8, counts: *i64, pb: *u8, po: i64) -> i64
55func main(argc: i64, argv: *i64) -> i64