code wiki / _hdl_build / nx_vizsla_dedup_gate.nx
nx_vizsla_dedup_gate.nx
buildroot/runtime/_hdl_build/nx_vizsla_dedup_gate.nx
about
nx_vizsla_dedup_gate.nx -- VIZSLA dedup/merge gate. Construction-known oracle + contact->dedup integration.
Ingest 5 fields via BLESSED nx_vizsla_contact (date 2026-01-01) -- TWO records of the same person:
momA email=mom@x.com name=Mom momB email=mom@x.com phone=5551212 dad email=dad@x.com
momA+momB share email mom@x.com => duplicate candidates. dad's email is unique => NOT a candidate.
merge survivor=momA loser=momB @2026-02-01 ; unified view of momA = email+name+phone (phone pulled from the
merged-in loser) = 3 fields. canonical(momB)=momA. After merge mommaster<-momA, canonical(momB)=mommaster.
Rows:
1 ingest-fields contact load new=5 seg-4101 (integration precondition)
2 detect candidate value=mom@x.com count=2 ; dad@x.com NOT a candidate ; candidates=1
3 merge survivor=momA loser=momB new=1 (additive mrg: record, loser NOT destroyed)
4 canonical-loser canonical momB -> momA
5 unified-view view momA -> fields=3 AND key=phone value=5551212 (UNION pulled loser's field)
6 view-via-loser view momB -> SUMMARY contact=momA fields=3 (query loser, get survivor's merged profile)
7 transitive merge mommaster<-momA ; canonical momB -> mommaster (chain momB->momA->mommaster)
8 idempotent re-merge momA<-momB same date -> new=0 (CID dedup)
9 neg-self-merge merge momA<-momA -> fail loud exit 1
Evidence: VIZSLA-DEDUP-GATE -> stdout + knowledge/status/vizsla_gate.log; exit 0 iff 9/9.
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
| 21 | func og_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 22 | func og_p(s: *u8) -> i64 { sys_write(1, s, og_slen(s)); return 0 } |
| 24 | func og_cat(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 30 | func og_catn(dst: *u8, off: i64, v: i64) -> i64 |
| 43 | func og_write(path: *u8, content: *u8) -> i64 |
| 51 | func og_readall(path: *u8, szout: *i64) -> *u8 |
| 65 | func og_runv(elf: *u8, args: *i64, outpath: *u8) -> i64 |
| 90 | func og_idx(buf: *u8, sz: i64, needle: *u8) -> i64 |
| 104 | func og_has(path: *u8, needle: *u8) -> i64 |
| 111 | func og_row(name: *u8, pass: i64) -> i64 |
| 117 | func og_args(a1: *u8, a2: *u8, a3: *u8, a4: *u8, a5: *u8, a6: *u8) -> *i64 |
| 123 | func main(argc: i64, argv: *i64) -> i64 |