code wiki / _hdl_build / nx_vizsla_relate_gate.nx
nx_vizsla_relate_gate.nx
buildroot/runtime/_hdl_build/nx_vizsla_relate_gate.nx
about
nx_vizsla_relate_gate.nx -- VIZSLA V4 gate: the relationships/PRM engine is
gate-proven against a HAND-COMPUTED fixture (the oracle is THIS header, not
the module under test). No mocks: it drives the real organ over real
seg_store records and hand-counted civil-date arithmetic.
contacts (soon_days=14): TIER inner 30, close 90, network 180;
mom(inner, bday 06-20), alex(close, bday 03-15), sam(network, bday 12-01),
pat(close, bday -)
relate_log (11 events):
TOUCH 2026-06-10 mom ; TOUCH 2026-02-01 alex
OBLIGATION 2026-05-01 OWE alex book-loan 0 borrowed-book (open)
OBLIGATION 2026-05-10 DUE sam favor-intro 0 made-intro (open)
OBLIGATION 2026-04-01 OWE mom loan-200 20000 cash-loan (SETTLED below)
OBLIGATION 2026-05-05 DUE pat loan-50 5000 lent-cash (open)
SETTLE 2026-05-20 loan-200 repaid
THANKS 2026-06-12 mom birthday-gift (open, 2d)
THANKS 2026-05-01 alex referral (open, 44d)
THANKS 2026-04-01 sam holiday-card (SENT below -> closed)
SENT 2026-04-05 sam holiday-card
today=2026-06-14 hand-computed:
cadence: mom days=4 FRESH(<=30); alex days=133 DUE(>90); sam/pat NEW
=> contacts=4 fresh=1 due=1 new=2
ledger : open=3 [alex OWE 0, sam DUE 0, pat DUE 5000]; mom SETTLED
=> open=3 owe=1 due=2 owe_amount=0 due_amount=5000 settled=1
thanks : mom 2d PENDING(<=14), alex 44d OVERDUE; sam SENT-closed
=> open=2 pending=1 overdue=1 sent=1
brief : followups=3 (alex DUE, sam/pat NEW), birthdays=1 (mom 06-20 in 6d),
thankyous=2, obligations=3
DATA-DRIVEN: contacts with soon_days=1 (only change) => thanks
open=2 pending=0 overdue=2 sent=1 (mom flips PENDING->OVERDUE),
same binary.
Rows:
1 loud-fail-missing-contacts cadence on absent file => exit 1
2 load-events scanned=11 new=11 segment=seg-4001
3 idempotent-reload new=0 dup_instore=11 segment=none (law 10)
4 cadence-fresh mom FRESH days=4 cadence=30
5 cadence-due alex DUE days=133 reconnect
6 cadence-new-verdict sam NEW + verdict 4/1/1/2
7 ledger-bidirectional alex OWE + pat DUE 5000 lent-cash + verdict
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| none |
functions
| 54 | func rg_slen(s: *u8) -> i64 |
| 60 | func rg_p(s: *u8) -> i64 |
| 65 | func rg_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 71 | func rg_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 84 | func rg_write(path: *u8, content: *u8) -> i64 |
| 92 | func rg_readall(path: *u8, szout: *i64) -> *u8 |
| 109 | func rg_run(elf: *u8, a1: *u8, a2: *u8, a3: *u8, a4: *u8, outpath: *u8) -> i64 |
| 136 | func rg_has(path: *u8, needle: *u8) -> i64 |
| 155 | func rg_fileeq(p1: *u8, p2: *u8) -> i64 |
| 170 | func rg_row(name: *u8, pass: i64) -> i64 |
| 177 | func main(argc: i64, argv: *i64) -> i64 |