code wiki / _hdl_build / nx_vizsla_calendar_gate.nx
nx_vizsla_calendar_gate.nx
buildroot/runtime/_hdl_build/nx_vizsla_calendar_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 31 | func og_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 32 | func og_p(s: *u8) -> i64 { sys_write(1, s, og_slen(s)); return 0 } |
| 34 | func og_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 40 | func og_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 53 | func og_write(path: *u8, content: *u8) -> i64 |
| 61 | func og_readall(path: *u8, szout: *i64) -> *u8 |
| 78 | func og_runv(elf: *u8, args: *i64, outpath: *u8) -> i64 |
| 108 | func og_has(path: *u8, needle: *u8) -> i64 |
| 127 | func og_fileeq(p1: *u8, p2: *u8) -> i64 |
| 142 | func og_row(name: *u8, pass: i64) -> i64 |
| 149 | func og_args(a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8) -> *i64 |
| 160 | func main(argc: i64, argv: *i64) -> i64 |