code wiki / (root) / nx_bills_store.nx

nx_bills_store.nx

buildroot/runtime/nx_bills_store.nx

3824 B91 linesdepth 4pulls 5 transitivereach 12 importersview sourcekind librarytopic bills
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_seg_store.nx nx_bills.nx nx_bills_store.nx nx_bills_entry.nx nx_bills_entry_gate.nx nx_bills_store_gate.nx nx_climbout_real.nx nx_climbout_real_gate.nx nx_finance_web.nx

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

12const BS_FIELDS: i64 = 5 // amount, cadence, due_day, category, paid
13const BS_MAX: i64 = 64 // cap on bills per person (a packed-record bound, DATA)

functions

16func bs_key(respondent: *u8, out: *u8) -> i64
called by 2: bs_load_rawbs_add
29func bs_load_raw(prefix: *u8, respondent: *u8, buf: *i64) -> i64
48func bs_add(prefix: *u8, respondent: *u8, amount: i64, cadence: i64, due_day: i64, cat: i64, paid: i64) -> i64
69func bs_count(prefix: *u8, respondent: *u8) -> i64
called by 2: mainmain calls 2: sys_mmapbs_load_raw
75func bs_load(prefix: *u8, respondent: *u8, out_amount: *i64, out_cadence: *i64, out_dueday: *i64, out_cat: *i64, out_paid: *i64, cap: i64) -> i64