code wiki / _hdl_build / nx_vizsla_dedup.nx

nx_vizsla_dedup.nx

buildroot/runtime/_hdl_build/nx_vizsla_dedup.nx

18868 B460 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic vizsla
docsdependenciesstructsconstsfunctions

about

nx_vizsla_dedup.nx -- NISHI VIZSLA: DEDUP / MERGE (PRM/CRM depth). Operator 2026-06-23: real-system depth + "import my linkedin my email my phone" -- imports from multiple sources create DUPLICATES of the same person. A real CRM detects them and merges into one canonical contact WITHOUT losing data. This: detect <prefix> <key> contacts sharing the same CURRENT value for <key> (e.g. email) = duplicate candidates (>=2 distinct ids on one value). merge <prefix> <survivor> <loser> <date> record a merge as an ADDITIVE "mrg:" record (rule 13: NEVER deletes the loser -- history sacred, soft-merge, reversible). canonical <prefix> <id> resolve the merge chain (transitive, latest-by-date) to the survivor. view <prefix> <id> the UNIFIED profile: resolve to canonical, union the fields of the survivor + every merged-in loser (latest-value-per-key wins). Composes the fld: store (nx_vizsla_contact) for fields; mrg: records for the merge graph. Local, no cloud. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_canon_cid.nx nx_seg_store.nx nx_vizsla_dedup.nx

imports: nx_syscalls.nxnx_canon_cid.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main vd_p sys_write vd_slen vd_eq vd_cmd_detect vd_p ↻ sys_mmap vd_collect_fld sys_mmap ↻ ss_manifest ss_manifest_file sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close vd_cat ss_readall ↻ ss_r32 vd_iskind vd_slen ↻ vd_kmemeq vd_slen ↻ vd_field ss_r32 ↻ vd_kmemeq ↻ vd_dup vd_slen ↻ sys_mmap ↻ vd_datedays sys_mmap ↻ vd_eq ↻ vd_latest_fld vd_eq ↻ vd_cpy vd_dup ↻

structs

none

consts

16const K_MAGIC_1970: i64 = 1970
17const K_MAGIC_146097: i64 = 146097
18const K_MAGIC_719468: i64 = 719468
19const K_MAGIC_4096: i64 = 4096
20const K_MAGIC_1024: i64 = 1024
21const K_MAGIC_65536: i64 = 65536
22const K_MAGIC_2048: i64 = 2048

functions

24func vd_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
25func vd_p(s: *u8) -> i64 { sys_write(1, s, vd_slen(s)); return 0 }
27func vd_eq(a: *u8, b: *u8) -> i64
34func vd_dup(s: *u8) -> *u8
42func vd_cpy(out: *u8, cap: i64, s: *u8) -> i64
50func vd_cat(dst: *u8, off: i64, s: *u8) -> i64
56func vd_catn(dst: *u8, off: i64, v: i64) -> i64
69func vd_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: vd_iskindvd_field calls 1: vd_slen
76func vd_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
82func vd_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
106func vd_datedays(s: *u8) -> i64
142func vd_collect_fld(prefix: *u8, rct: *i64, rkey: *i64, rval: *i64, rdate: *i64) -> i64
184func vd_latest_fld(rct: *i64, rkey: *i64, rval: *i64, rdate: *i64, n: i64, contact: *u8, key: *u8, out: *u8, cap: i64) -> i64
called by 1: vd_cmd_detect calls 2: vd_eqvd_cpy
198func vd_collect_mrg(prefix: *u8, ml: *i64, ms: *i64, md: *i64) -> i64
239func vd_canonical(ml: *i64, ms: *i64, md: *i64, m: i64, id: *u8, out: *u8, cap: i64) -> i64
261func vd_cmd_detect(argc: i64, argv: *i64) -> i64
327func vd_cmd_merge(argc: i64, argv: *i64) -> i64
374func vd_cmd_canonical(argc: i64, argv: *i64) -> i64
393func vd_cmd_view(argc: i64, argv: *i64) -> i64
451func main(argc: i64, argv: *i64) -> i64