code wiki / (root) / nx_sweep_daemon_gate.nx

nx_sweep_daemon_gate.nx

buildroot/runtime/nx_sweep_daemon_gate.nx

6800 B118 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic sweep
docsdependenciesstructsconstsfunctions

about

nx_sweep_daemon_gate.nx -- gates the standing sweep on a fixture registry (runner: cd a scratch dir). THE SOTA PROPERTY under test: a check that overruns its deadline is KILLED and scored TIMEOUT -- the sweep never hangs. Also: PASS/FAIL verdicts are correct, the registry is data-driven (3 rows parsed), consecutive-red counts, and the plain-English status renders the right chips. Uses /bin/true, /bin/false, and /bin/sleep as the fixture victims (testing OUR killer -- the coreutils are the controlled subjects). Exit 0 only on all-PASS. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_sweep_daemon_lib.nx nx_seg_store.nx nx_sweep_daemon_gate.nx

imports: nx_sweep_daemon_lib.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main gg_writefile ss_writefile sys_openat_wr sys_write sys_close sys_fsync sd_new sd_load sc_arr vw_read sys_openat_rd sys_read sys_close ↻ sd_field sd_ws sd_build_argv sd_atoi mr_hash gg_check sd_app_stub sc_arr ↻ sw_mono_ms sys_mmap sys_clock_gettime_mono sys_munmap sd_run_all sc_arr ↻ sw_mono_ms ↻ sw_run_deadline sys_pipe2 sys_fork sys_close ↻ sys_dup3 sys_chdir sys_mmap ↻ sys_mmap ↻ sys_execve sys_exit sw_mono_ms ↻

structs

none

consts

10const GG_CHECKS: i64 = 12
11const GG_STALE: i64 = 1 // subtract from stored mtime to force the "changed" reload path
12const GG_PTR: i64 = 16
13const GG_HANG_MS: i64 = 5000 // "did not hang" bound
14const GG_HTML_CAP: i64 = 262144
15const GG_FIX_N: i64 = 3 // fixture check count
16const GG_YES_LEN: i64 = 3 // "YES" chip substring length
17const GG_ASCII_Y: i64 = 89 // 'Y'
18const GG_ASCII_E: i64 = 69 // 'E'
19const GG_ASCII_S: i64 = 83 // 'S'

functions

21func sd_app_stub(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: gg_checkmain
22func gg_check(name: *u8, ok: i64, pass: *i64) -> i64
called by 1: main calls 1: sd_app_stub
27func gg_writefile(path: *u8, body: *u8) -> i64 { var n: i64 = 0; while body[n] != (0 as u8) { n = n + 1 } return ss_writefile(path, body, n) }
called by 1: main calls 1: ss_writefile
29func gg_idx(ctx: *i64, name: *u8) -> i64
called by 1: main calls 3: sc_arrsc_nsd_len
42func main() -> i64