code wiki / _hdl_build / nx_feed_gate.nx

nx_feed_gate.nx

buildroot/runtime/_hdl_build/nx_feed_gate.nx

13961 B246 linesdepth 6pulls 6 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 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 ↻ fdg_case sys_mmap ↻ tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close_inherited sys_close_inherited_proc sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen sys_close ↻ sys_munmap sys_execve tr_exec_failed sys_write ↻ sys_exit ↻ sys_read sys_wait4 wait_status_rc

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
25const FDG_RETRY_MS: i64 = 2000

functions

31func fdg_puts(s: *u8) -> i64 { return gl_puts(s) }
called by 1: main calls 1: gl_puts
32func fdg_putn(v: i64) -> i64 { return gl_putn(v) }
called by 1: main calls 1: gl_putn
33func fdg_bcat(b: *u8, o: i64, s: *u8) -> i64 { return gl_bcat(b, o, s) }
called by 2: fdg_casemain calls 1: gl_bcat
34func fdg_bcatn(b: *u8, o: i64, v: i64) -> i64 { return gl_bcatn(b, o, v) }
called by 2: fdg_casemain calls 1: gl_bcatn
35func fdg_contains(h: *u8, n: i64, needle: *u8) -> i64 { return gl_contains(h, n, needle) }
called by 2: fdg_casemain calls 1: gl_contains
51func fdg_case(nm: *u8, fetcher: *u8, url: *u8, counts: *i64, pb: *u8, po: i64) -> i64
89func main(argc: i64, argv: *i64) -> i64