nx_fin_rules.nx
buildroot/runtime/nx_fin_rules.nx
about
nx_fin_rules.nx -- R6 of THE NISHI FINANCIAL ECOSYSTEM: the SOVEREIGN RULE-PACK STORE. This is what
makes the engine "robust for anyone / any jurisdiction / any insurer" (#6/#11/#25): the audit/debt rule
packs (NCCI bundle pairs, MUE limits, Medicare benchmarks, ...) are DATA stored in the sovereign
seg-store, keyed by a pack id, NOT hardcoded and NOT gate-supplied. A different jurisdiction/insurer =
a different stored pack; the same engine runs on whichever pack you load.
A pack is an i64 array (callers interleave structured packs, e.g. bundle = [A0,B0,A1,B1,...],
MUE = [code0,max0,...], benchmark = [code0,allowed0,...]). Stored little-endian, length-prefixed, under
key "rule:<packid>:<kind>". Reuses nx_seg_store (append-only, content-safe). Commit segid = sys_now_us()
(per-op commits must NOT collide on ms-resolution -- see reference-segstore-segid-use-now-us). No floats,
no hardware writes. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_seg_store.nx
imported by: nx_fin_rules_gate.nx
structs
| none |
consts
| none |
functions
| 16 | func rp_w64(buf: *u8, off: i64, v: i64) -> i64 called by 1: rp_put |
| 23 | func rp_r64(buf: *u8, off: i64) -> i64 called by 1: rp_get |
| 32 | func rp_key(packid: *u8, kind: *u8, out: *u8) -> i64 |
| 47 | func rp_put(prefix: *u8, packid: *u8, kind: *u8, vals: *i64, n: i64) -> i64 |
| 61 | func rp_get(prefix: *u8, packid: *u8, kind: *u8, out: *i64, cap: i64) -> i64 |