code wiki / _hdl_build / nx_flip_gate.nx

nx_flip_gate.nx

buildroot/runtime/_hdl_build/nx_flip_gate.nx

12685 B211 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic flip
docsdependenciesstructsconstsfunctions

about

nx_flip_gate.nx -- THE REGRESSION GATE for the flip lane (organs 1-4). Until now every one of the lane's ~26 proofs was a ONE-TIME hand verification: correct when made, and completely unable to stop the next session silently breaking it. This makes them re-runnable. Forks each live organ via tr_run_capture and asserts BOTH the exit code AND a required substring of its output -- so a verdict that flips, a number that drifts, or a fail-closed path that stops firing all turn this RED. D001: emits a `verdict=` anchor so the ecosystem judge can read it. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_gate_lib.nx nx_flip_lib.nx nx_tool_run.nx nx_syscalls.nx nx_flip_gate.nx

imports: nx_gate_lib.nxnx_flip_lib.nxnx_tool_run.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 sts_mm sys_mmap sts_werr sys_write sys_exit fg_case sts_mm ↻ 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 fg_contains fg_bcat fx_bcat fg_bcatn fx_bcatn sts_mm ↻ fg_av sts_mm ↻ gl_log sys_openat_append sys_mmap ↻ gl_bcatn sys_mmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gl_bcat sys_write ↻ sys_close ↻

structs

none

consts

14const FG_OUT: i64 = 1
15const FG_OUTCAP: i64 = 262144
16const FG_AVCAP: i64 = 192
17const FG_TMPCAP: i64 = 32
18const FG_D0: i64 = 48
19const FG_BASE10: i64 = 10
20const FG_NL: i64 = 10
21const FG_BUF: i64 = 262144
22const FG_SCRATCH: i64 = 32
23const FG_EXIT_RED: i64 = 1

functions

34func fg_puts(s: *u8) -> i64 { return fx_puts(s) }
called by 1: main calls 1: fx_puts
35func fg_putn(n: i64) -> i64 { return fx_putn(n) }
called by 1: main calls 1: fx_putn
36func fg_bcat(b: *u8, o: i64, s: *u8) -> i64 { return fx_bcat(b, o, s) }
called by 1: fg_case calls 1: fx_bcat
37func fg_bcatn(b: *u8, o: i64, n: i64) -> i64 { return fx_bcatn(b, o, n) }
called by 1: fg_case calls 1: fx_bcatn
39func fg_contains(h: *u8, n: i64, needle: *u8) -> i64
called by 1: fg_case
61func fg_av(p: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8, a7: *u8, a8: *u8, a9: *u8) -> *i64
called by 1: main calls 1: sts_mm
79func fg_case(nm: *u8, path: *u8, av: *i64, want_exit: i64, want_sub: *u8, counts: *i64, pb: *u8, po: i64) -> i64
101func main(argc: i64, argv: *i64) -> i64