code wiki / _hdl_build / nx_vizsla_calendar_gate.nx

nx_vizsla_calendar_gate.nx

buildroot/runtime/_hdl_build/nx_vizsla_calendar_gate.nx

10983 B276 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_calendar_gate.nx -- VIZSLA R-CAL.0 gate: the calendar substrate (events + FREE/BUSY) is gate-proven against construction-known fixtures with HAND-COMPUTED interval arithmetic (the oracle lives in THIS header, not the module under test). 100% sovereign: self-writes fixtures via the organ's own syscalls, forks the organ elf, greps stdout -- no bash, no foreign tooling. fixture events (seg-5001), all on 2026-06-22: standup 09:00 +30 -> [540,570) review 09:15 +45 -> [555,600) (overlaps standup -> merged busy [540,600) = 09:00-10:00) lunch 12:00 +60 -> [720,780) = 12:00-13:00 hand math: sorted standup(540) review(555) lunch(720); merged BUSY = [540,600) + [720,780) => 2 blocks, busy_min = 60+60 = 120; FREE complement of [0,1440) = [0,540)+[600,720)+[780,1440) => 3 blocks, free_min = 540+120+660 = 1320; busy_min+free_min = 1440 (invariant). empty day 2026-06-23 => 0 events, FREE 00:00-24:00, free_min=1440. Rows: 1 loud-fail-missing-events load on absent file => exit 1 [negative control] 2 cal-load 3 EVENT -> new=3 committed seg-5001 3 idempotent-reload new=0 dup_instore=3 segment=none (law 10) 4 day-event-sorted standup line exact (sort + HH:MM) 5 day-overlap-end review end=10:00 (start+dur math) 6 busy-merge BUSY 09:00-10:00 (overlap merged into one block) 7 free-gap FREE 10:00-12:00 (the complement between busy blocks) 8 day-verdict events=3 busy_min=120 free_min=1320 busy_blocks=2 free_blocks=3 9 empty-day-filter 2026-06-23 => FREE 00:00-24:00 + events=0 free_min=1440 free_blocks=1 (date filter) 10 day-determinism byte-identical twice 11 loud-fail-bad-date day on 2026-13-99 => exit 1 [negative control] Evidence: VIZSLA-CAL-GATE line -> stdout + knowledge/status/vizsla_gate.log; exit 0 iff 11/11. spec: knowledge/research/2026-06-22-vizsla-sclass-roadmap.md license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_vizsla_calendar_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 og_p sys_write og_slen sys_openat_rd sys_close og_runv sys_fork sys_openat_wr sys_dup3 sys_mmap sys_execve sys_exit sys_wait4 og_args sys_mmap ↻ sys_mmap ↻ og_cat og_catn sys_mmap ↻ sys_now_us sys_mmap ↻ sys_clock_gettime_mono og_write sys_openat_wr ↻ sys_write ↻ og_slen ↻ sys_close ↻ og_row og_p ↻ og_has sys_mmap ↻ og_readall sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ og_slen ↻ og_fileeq

structs

none

consts

none

functions

31func og_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: og_pog_writeog_has
32func og_p(s: *u8) -> i64 { sys_write(1, s, og_slen(s)); return 0 }
called by 2: og_rowmain calls 2: sys_writeog_slen
34func og_cat(dst: *u8, off: i64, s: *u8) -> i64
called by 1: main
40func og_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
53func og_write(path: *u8, content: *u8) -> i64
61func og_readall(path: *u8, szout: *i64) -> *u8
78func og_runv(elf: *u8, args: *i64, outpath: *u8) -> i64
108func og_has(path: *u8, needle: *u8) -> i64
called by 1: main calls 3: sys_mmapog_readallog_slen
127func og_fileeq(p1: *u8, p2: *u8) -> i64
called by 1: main calls 2: sys_mmapog_readall
142func og_row(name: *u8, pass: i64) -> i64
called by 1: main calls 1: og_p
149func og_args(a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8) -> *i64
called by 1: main calls 1: sys_mmap
160func main(argc: i64, argv: *i64) -> i64