code wiki / _hdl_build / nx_vizsla_bills_gate.nx

nx_vizsla_bills_gate.nx

buildroot/runtime/_hdl_build/nx_vizsla_bills_gate.nx

11359 B274 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_bills_gate.nx -- VIZSLA bills gate: the recurring-payables tracker proven against a HAND-COMPUTED fixture (oracle = this header). No mocks: drives the real organ over real seg_store PAID records + civil-date math. bills (soon_days=7): rent $1800 due-1 MANUAL; electric $120 due-15 MANUAL; netflix $15.99 due-20 AUTO; water $45 due-10 MANUAL; phone $60 due-25 MANUAL. paid: PAID rent 2026-06-02 (June); PAID netflix 2026-05-20 (MAY, not June). today=2026-06-14: rent paid this month -> PAID, next due 2026-07-01 electric due-15 unpaid, 1d off -> DUE (<=soon) owed 12000 netflix due-20 unpaid (May!=Jun)-> DUE (6d) owed 1599 water due-10 unpaid, -4d -> OVERDUE owed 4500 phone due-25 unpaid, 11d>7 -> UPCOMING owed 6000 => bills=5 paid=1 upcoming=1 due=2 overdue=1 owed_cents=24099 DATA-DRIVEN soon_days=14: phone 11d<=14 -> DUE => due=3 upcoming=0 (owed same). Rows: 1 loud-fail-missing-bills status on absent file => exit 1 2 loud-fail-bad-cadence a non-MONTHLY bill => malformed => exit 1 3 load-paid scanned=2 new=2 segment=seg-5001 4 idempotent-reload new=0 dup_instore=2 segment=none (law 10) 5 bill-paid rent PAID, next due 2026-07-01 6 bill-due electric DUE due=2026-06-15 7 bill-overdue water OVERDUE 8 bill-upcoming phone UPCOMING 9 paid-this-month-scoped netflix DUE (its PAID was MAY, not June) 10 status-verdict 5/1/1/2/1 owed_cents=24099 11 data-driven-soon-days soon_days=14 => due=3 upcoming=0, same binary 12 status-determinism byte-identical twice Evidence: VIZSLA-BILL-GATE -> stdout + knowledge/status/vizsla_gate.log; exit 0 iff 12/12. Tamper: bogus instrument argv[1] => all rows FAIL => RED. spec: knowledge/specs/2026-06-10-nishi-vizsla-ladder.md license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_vizsla_bills_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rg_p sys_write rg_slen sys_openat_rd sys_close rg_run sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 sys_mmap ↻ rg_cat rg_catn sys_mmap ↻ sys_now_us sys_mmap ↻ sys_clock_gettime_mono rg_write sys_openat_wr ↻ sys_write ↻ rg_slen ↻ sys_close ↻ rg_row rg_p ↻ rg_has sys_mmap ↻ rg_readall sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ rg_slen ↻ rg_fileeq sys_mmap ↻ rg_readall ↻

structs

none

consts

none

functions

35func rg_slen(s: *u8) -> i64
called by 3: rg_prg_writerg_has
41func rg_p(s: *u8) -> i64
called by 2: rg_rowmain calls 2: sys_writerg_slen
46func rg_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
52func rg_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
65func rg_write(path: *u8, content: *u8) -> i64
73func rg_readall(path: *u8, szout: *i64) -> *u8
90func rg_run(elf: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, outpath: *u8) -> i64
117func rg_has(path: *u8, needle: *u8) -> i64
called by 1: main calls 3: sys_mmaprg_readallrg_slen
136func rg_fileeq(p1: *u8, p2: *u8) -> i64
called by 1: main calls 2: sys_mmaprg_readall
151func rg_row(name: *u8, pass: i64) -> i64
called by 1: main calls 1: rg_p
158func main(argc: i64, argv: *i64) -> i64