code wiki / _hdl_build / nx_vizsla_relate_register.nx
nx_vizsla_relate_register.nx source
↩ module page · 47 lines · 5067 B
1// nx_vizsla_relate_register.nx -- registers VIZSLA V4 (relationships / PRM
2// keystone) via the Librarian. ENGINEER evidence = the V4 gate re-run from its
3// DURABLE home (13 KAT rows; missing-instrument tamper run RED proven).
4// Closes the no-orphans gap: V4 now carries an OWNER (publish chain), a
5// CONNECT POINT (module:/depends:/capability: header on nx_vizsla_relate), and
6// a ROADMAP (the VIZSLA ladder + the thankyounotes.com TYN ladder).
7// license_tier: ORIGINAL
8import "nx_cap_register.nx"
9import "nx_capreg_librarian.nx"
10import "nx_syscalls.nx"
11
12func vlreg_run(path: *u8, a1: *u8) -> i64 {
13 let pid: i64 = sys_fork()
14 if pid == 0 {
15 let dn: i64 = sys_openat_wr("/dev/null" as *u8, 0x1a4)
16 if dn >= 0 { sys_dup3(dn, 1, 0); sys_dup3(dn, 2, 0) }
17 let argv: *i64 = sys_mmap(32) as *i64
18 argv[0] = path as i64
19 var i: i64 = 1
20 if (a1 as i64) != 0 { argv[i] = a1 as i64; i = i + 1 }
21 argv[i] = 0
22 let envp: *i64 = sys_mmap(16) as *i64; envp[0] = 0
23 sys_execve(path, argv, envp); sys_exit(127)
24 }
25 let st: *i64 = sys_mmap(16) as *i64
26 sys_wait4(pid, st, 0)
27 return st[0]
28}
29
30func main() -> i64 {
31 var allok: i64 = 1
32 if vlreg_run("_offc/nx_vizsla_relate_gate.elf" as *u8, "_offc/nx_vizsla_relate.elf" as *u8) != 0 { allok = 0 }
33 cr_w(1, "ENGINEER: vizsla V4 relate/PRM gate (13 KAT rows) pass=" as *u8); cr_wn(1, allok); cr_w(1, "\n" as *u8)
34 let eng: i64 = ig_engineer(1, 1, 1, allok)
35 let dec: i64 = ig_decision(eng, ig_council(eng, 1, 1, 2), 1)
36 if dec != IG_INGEST { cr_w(1, "HELD\n" as *u8); sys_exit(1) }
37 if cr_can_register(5, 2, 6, dec) != 1 { cr_w(1, "REFUSED\n" as *u8); sys_exit(1) }
38 let lp: *u8 = "/tmp/nishi_cap_registry.log" as *u8
39 let jp: *u8 = "knowledge/status/cap_registry_durable.log" as *u8
40 let idx: i64 = cl_next_idx(lp, jp)
41 let ok: i64 = cl_register_dual(lp, jp, idx, 5,
42 2, "GEN NISHI-VIZSLA-V4 RELATIONSHIPS/PRM-KEYSTONE (arc=VIZSLA rung V4; operator directive 2026-06-14: build the project management and PRM ... help us manage our contacts, thank yous). The sovereign home of the retired stand-alone nishi-prm Tom-Hagen consigliere design (proactive counsel + a BIDIRECTIONAL obligation ledger). nx_vizsla_relate INHERITS (not reinvents) the touch-ledger, keep-warm cadence, CID/seg_store substrate, and Hinnant civil-date math from V2c nx_vizsla_recruiter. THEORY AS DATA (contacts.txt: CONF soon_days, TIER <name> <cadence_days>, CONTACT <id> <display> <tier> <birthday MM-DD|->; retuning cadence/window = data edit, gate-PROVEN no recompile). Event journal relate_log.txt -> canonical NXR1 -> CID rel: keys on seg_store (additive, idempotent by construction, law 10): TOUCH | OBLIGATION <dir OWE|DUE> <ref> <amount_cents> <desc> | SETTLE <ref> (closes -- ADDITIVE, never delete, law 13) | THANKS | SENT (closes a thank-you). Commands: cadence (per-contact tier-driven FRESH/DUE-reconnect/NEW-introduce from latest touch); ledger (bidirectional open OWE/DUE after SETTLE, per-direction counts + cent totals); thanks (open thank-yous with no matching SENT: days-owed, PENDING<=soon_days / OVERDUE -- gratitude as a tracked debt); brief (the consigliere daily counsel composing follow-ups + upcoming birthdays + open thank-yous + open obligations). today via argv = deterministic; outward-facing SENDS stay human (V4b drafting / thankyounotes.com). GATE nx_vizsla_relate_gate 13/13=1000 GREEN sovereign first-compile (loud-fail missing contacts; load 11 events seg-4001; idempotent reload new=0 dup_instore=11 segment=none; cadence mom FRESH 4d / alex DUE 133d>90 / sam+pat NEW + verdict 4/1/1/2; ledger bidirectional open=3 owe=1 due=2 due_amount=5000 settled=1 + settled loan-200 ABSENT from open ledger; thanks mom 2d PENDING / alex 44d OVERDUE + sam holiday-card SENT-closed + verdict 2/1/1/1; brief verdict followups=3 birthdays=1 thankyous=2 obligations=3 + mom BIRTHDAY in=6d; DATA-DRIVEN soon_days=1 file flips thanks pending=0 overdue=2 same binary; cadence determinism); missing-instrument tamper 0/13 RED (every row liveness-guarded, the absence assertion cannot pass vacuously); re-gated GREEN from durable _offc home. LIVE: contacts.txt + relate_log.txt partnership templates; relate- store loadable. EXCEED (honest, feature-class -- not throughput): no consumer PRM (Clay/Dex/Folk/Monica) models a BIDIRECTIONAL obligation ledger or thank-you-as-managed-owed->sent-debt, and none keep additive tamper-evident relationship history with as-of time-travel. Catalog product_catalog.tsv family personal-assistant (VIZSLA-V0..V6 + V4) + thankyounotes (TYN-001..006); genealogy lineage.tsv nx_vizsla_relate. Blessed _offc/nx_vizsla_relate{,_gate}.elf; spec knowledge/specs/2026-06-10-nishi-vizsla-ladder.md (V4 section) + 2026-06-14-thankyounotes-product-spec.md" as *u8)
43 if ok != 1 { cr_w(1, "DUAL-WRITE FAILED\n" as *u8); sys_exit(1) }
44 cr_w(1, "CAPREG idx=" as *u8); cr_wn(1, idx); cr_w(1, " REGISTERED (NISHI VIZSLA V4 relationships/PRM keystone)\n" as *u8)
45 sys_exit(0)
46 return 0
47}