code wiki / _hdl_build / nx_vizsla_notes_register.nx
nx_vizsla_notes_register.nx source
↩ module page · 48 lines · 4612 B
1// nx_vizsla_notes_register.nx -- registers VIZSLA V4b (event-anchored timed
2// meaningful-note engine; the meaningfulnotes.com product core) via the
3// Librarian. ENGINEER evidence = the V4b gate re-run from its DURABLE home
4// (14 KAT rows; missing-instrument tamper run RED proven).
5// NOTE: a *_register organ SELF-REGISTERS when nx_sov_build_run smoke-tests it
6// (main runs with no args) -- build it ONCE and do NOT re-run, or you double
7// the CAPREG entry (lesson from the V4 425/426 dup).
8// license_tier: ORIGINAL
9import "nx_cap_register.nx"
10import "nx_capreg_librarian.nx"
11import "nx_syscalls.nx"
12
13func vnreg_run(path: *u8, a1: *u8) -> i64 {
14 let pid: i64 = sys_fork()
15 if pid == 0 {
16 let dn: i64 = sys_openat_wr("/dev/null" as *u8, 0x1a4)
17 if dn >= 0 { sys_dup3(dn, 1, 0); sys_dup3(dn, 2, 0) }
18 let argv: *i64 = sys_mmap(32) as *i64
19 argv[0] = path as i64
20 var i: i64 = 1
21 if (a1 as i64) != 0 { argv[i] = a1 as i64; i = i + 1 }
22 argv[i] = 0
23 let envp: *i64 = sys_mmap(16) as *i64; envp[0] = 0
24 sys_execve(path, argv, envp); sys_exit(127)
25 }
26 let st: *i64 = sys_mmap(16) as *i64
27 sys_wait4(pid, st, 0)
28 return st[0]
29}
30
31func main() -> i64 {
32 var allok: i64 = 1
33 if vnreg_run("_offc/nx_vizsla_notes_gate.elf" as *u8, "_offc/nx_vizsla_notes.elf" as *u8) != 0 { allok = 0 }
34 cr_w(1, "ENGINEER: vizsla V4b meaningful-notes gate (14 KAT rows) pass=" as *u8); cr_wn(1, allok); cr_w(1, "\n" as *u8)
35 let eng: i64 = ig_engineer(1, 1, 1, allok)
36 let dec: i64 = ig_decision(eng, ig_council(eng, 1, 1, 2), 1)
37 if dec != IG_INGEST { cr_w(1, "HELD\n" as *u8); sys_exit(1) }
38 if cr_can_register(5, 2, 6, dec) != 1 { cr_w(1, "REFUSED\n" as *u8); sys_exit(1) }
39 let lp: *u8 = "/tmp/nishi_cap_registry.log" as *u8
40 let jp: *u8 = "knowledge/status/cap_registry_durable.log" as *u8
41 let idx: i64 = cl_next_idx(lp, jp)
42 let ok: i64 = cl_register_dual(lp, jp, idx, 5,
43 2, "GEN NISHI-VIZSLA-V4b MEANINGFUL-NOTES-ENGINE (arc=VIZSLA rung V4b; the meaningfulnotes.com product core; operator directive 2026-06-14: make the thank you personalized -- capturing signatures or notes and letting it SIT till a timed event ... beyond thank you notes to meaningfulnotes.com where it can be PRIOR, ON, or AFTER a significant event to SIGNAL something). nx_vizsla_notes INHERITS (not reinvents) the load-journal-to-CID gene + heap-mmap collect-block idiom + Hinnant civil-date math from V4 nx_vizsla_relate. A personalized NOTE (captured signature/handwritten/voice/text reference) is ANCHORED to an EVENT with relation BEFORE|ON|AFTER + offset_days; release+deadline computed (BEFORE: release=event-off deadline=event; ON: release=event deadline=event+window; AFTER: release=event+off deadline=release+window); state machine WAITING (sits) -> DUE (send now) -> LATE (moment passed) + SENT closes; nv_daystr = the INVERSE Hinnant civil_from_days so it prints the exact send date. THEORY AS DATA notes_conf.txt CONF window_days (gate-PROVEN flip 3->1 turns a DUE note LATE, same binary). Commands: load (EVENT/NOTE/SENT -> NXR1 -> CID note: keys, additive idempotent); schedule (every note WAITING/DUE/LATE/SENT with release+deadline dates); due (only ready-to-send now). today via argv = deterministic; outward SENDS stay human. GATE nx_vizsla_notes_gate 14/14=1000 GREEN sovereign first-compile (loud-fail missing conf + unknown-EVENT; load 10 seg-7001; idempotent reload dup_instore=10; BEFORE-waiting/AFTER-due/BEFORE-late/ON-waiting/SENT-closes; verdict notes=5 waiting=2 due=1 late=1 sent=1; due-filter only DUE; days->date inverse release=2026-06-13 + personalization carried; DATA-DRIVEN window=1 verdict due=0 late=2 same binary; determinism); missing-instrument tamper 0/14 RED; re-gated GREEN from durable _offc. LIVE: notes_log.txt + notes_conf.txt partnership templates. EXCEED (honest, feature-class): card/print apps (Punkpost/Postable/Hallmark) send an artifact NOW; none hold a personalized note ANCHORED to a future moment and release it at the right time relative to that moment. Catalog product_catalog.tsv family meaningful-notes (TYN-001 DONE = this engine, TYN-002..006 ROADMAP); genealogy lineage.tsv nx_vizsla_notes. Blessed _offc/nx_vizsla_notes{,_gate}.elf; spec knowledge/specs/2026-06-14-thankyounotes-product-spec.md (reframed to meaningfulnotes.com)" as *u8)
44 if ok != 1 { cr_w(1, "DUAL-WRITE FAILED\n" as *u8); sys_exit(1) }
45 cr_w(1, "CAPREG idx=" as *u8); cr_wn(1, idx); cr_w(1, " REGISTERED (NISHI VIZSLA V4b meaningful-notes engine)\n" as *u8)
46 sys_exit(0)
47 return 0
48}