nx_bills_store.nx
buildroot/runtime/nx_bills_store.nx
about
nx_bills_store.nx -- per-respondent BILL STORE so the climb-out runs on the person's REAL recurring bills,
not representative ones. nx_bills is the pure engine (monthly/due-soon/overdue over arrays); this is the
sovereign persistence under it: each person's bills live as a content-addressed seg-store record keyed
"bills:<respondent>" (last-wins), a packed i64 buffer [count, then count*5 fields]. A bill = amount(cents),
cadence(months), due_day(1..31), category(BL_*), paid(0/1). Add is read-modify-write (idempotent-safe per
commit). No floats, no .tsv, no hardware writes -- pure sovereign storage feeding the existing engine.
license_tier: ORIGINAL
dependencies 3 imports · 6 importers
imports: nx_syscalls.nxnx_seg_store.nxnx_bills.nx
imported by: nx_bills_entry.nxnx_bills_entry_gate.nxnx_bills_store_gate.nxnx_climbout_real.nxnx_climbout_real_gate.nxnx_finance_web.nx
structs
| none |
consts
| 12 | const BS_FIELDS: i64 = 5 // amount, cadence, due_day, category, paid |
| 13 | const BS_MAX: i64 = 64 // cap on bills per person (a packed-record bound, DATA) |
functions
| 16 | func bs_key(respondent: *u8, out: *u8) -> i64 |
| 29 | func bs_load_raw(prefix: *u8, respondent: *u8, buf: *i64) -> i64 |
| 48 | func bs_add(prefix: *u8, respondent: *u8, amount: i64, cadence: i64, due_day: i64, cat: i64, paid: i64) -> i64 |
| 69 | func bs_count(prefix: *u8, respondent: *u8) -> i64 |
| 75 | func bs_load(prefix: *u8, respondent: *u8, out_amount: *i64, out_cadence: *i64, out_dueday: *i64, out_cat: *i64, out_paid: *i64, cap: i64) -> i64 |