nx_crm_store.nx
buildroot/runtime/nx_crm_store.nx
about
nx_crm_store.nx -- PERSISTENCE for deals + giving (the DEPTH rung after full-presence 1000): the pipeline and
the church statements survive across runs on the sovereign APPEND-ONLY seg_store (additive, tombstone-not-delete,
content-addressed = tamper-evident, on YOUR hardware -- the CRM exceed made concrete for the money records).
Records: key "dea:"+cid {kind=dea,name,account,amount,stage} ยท key "giv:"+cid {kind=giv,donor,fund,amount,gtype}.
THE DEPTH PROOF: the weighted forecast and the household giving statement are recomputed FROM THE STORE and must
equal the in-memory oracles of nx_crm/nx_org ($122,500 forecast; $1,350 received) -- two independent paths, one
truth. Saves VALIDATE (unknown stage / bad gift type = LOUD -1, nothing committed). Additivity proven: a second
commit adds a deal and the recomputed forecast moves exactly (+Lead 40000 -> +4000 weighted).
Composes the nx_crm pure core (stage_prob/stage_open/gift vocab lives beside) + canon_cid + seg_store.
Argless = selftest gate. license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_crm.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
structs
| none |
consts
| 14 | const K_MAGIC_2048: i64 = 2048 |
| 15 | const K_MAGIC_50000: i64 = 50000 |
| 16 | const K_MAGIC_120000: i64 = 120000 |
| 17 | const K_MAGIC_30000: i64 = 30000 |
| 18 | const K_MAGIC_20000: i64 = 20000 |
| 19 | const K_MAGIC_200000: i64 = 200000 |
| 20 | const K_MAGIC_122500: i64 = 122500 |
| 21 | const K_MAGIC_1350: i64 = 1350 |
| 22 | const K_MAGIC_40000: i64 = 40000 |
| 23 | const K_MAGIC_240000: i64 = 240000 |
| 24 | const K_MAGIC_126500: i64 = 126500 |
functions
| 26 | func cs_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64 |
| 32 | func cs_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64 |
| 36 | func cs_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64 |
| 59 | func cs_atoi(s: *u8) -> i64 |
| 69 | func cs_gift_ok(t: *u8) -> i64 |
| 78 | func cs_save_deal(w: *i64, name: *u8, account: *u8, amount: i64, stage: *u8) -> i64 |
| 101 | func cs_save_gift(w: *i64, donor: *u8, fund: *u8, amount: i64, gtype: *u8) -> i64 |
| 124 | func cs_forecast(prefix: *u8, out: *i64) -> i64 |
| 172 | func cs_giving(prefix: *u8, fundfilter: *u8, out: *i64) -> i64 |
| 216 | func main() -> i64 |