code wiki / _hdl_build / nx_favela_decay.nx

nx_favela_decay.nx

buildroot/runtime/_hdl_build/nx_favela_decay.nx

18174 B370 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_favela_decay.nx -- the TIME DIMENSION on the favela census (operator 2026-07-20: "are landmines getting eaten along with all of our debt"). MEASURED ANSWER THAT MOTIVATED IT: favela rooted_permil=94 vs debt eaten 490permil -- landmines get ROOTED ~5x slower than debt gets eaten. ROOT ASYMMETRY: "mitigated" is a TERMINAL state in the 7-field favela manifest (there is NO time field at all) and it earns HALF CREDIT FOREVER. A mitigation here is overwhelmingly "a WARNING line in MEMORY.md", so tribal knowledge is a load-bearing safety mechanism -- exactly what rule 26 forbids ("proven mechanically, never asserted"). THIS ORGAN GIVES A MITIGATION AN EXPIRY. Data-driven per rule 11: the decay window is a CONFIG ROW in the ledger, NEVER a constant in code. Evidence-derived per the R2b law: age comes from an APPEND-ONLY ledger of observations, never from prose and never from an assertion. FAIL-CLOSED: a missing/unreadable config measures decay_days=0 => every mitigation is ALREADY expired => maximally loud. A missing config can never silently grant infinite grace. HONEST: the clock starts at FIRST OBSERVATION, not at the true mitigation date (unknowable -- no historical record exists); the output DECLARES this rather than faking a backdate. COMPOSES, DOES NOT DUPLICATE (board queried before building, 2026-07-20): cap-autonomy owns auto-filing to intake/debt/frontier -- this organ EMITS the DECAYED signal and THAT lane files it. ws-intel8 owns nx_feeder gap-derivation. tsv-to-native-planes owns the favela_classes.tsv migration, so this adds NO TSV: the ledger is an append-only evidence log (the ws_sync.jrnl / token_efficiency.log pattern), conflict-free under concurrent seats via O_APPEND. VERBS: check (default -- auto-stamps then evaluates) | stamp | config <days> | selftest license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_favela_decay.nx

imports: nx_syscalls.nxnx_estate_path.nx

imported by: nobody (leaf or entry point)

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

main ep_anchor sys_openat_rd sys_close sys_chdir sys_mmap fd_zlen fd_slice_eq fd_puts sys_write sys_exit fd_atoi sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_mmap ↻ fd_catn sys_mmap ↻ fd_cat sys_openat_append sys_write ↻ sys_close ↻ fd_cfg_days sys_mmap ↻ fd_slice_eq ↻ fd_atoi ↻ fd_earliest sys_mmap ↻ fd_slice_eq ↻ fd_atoi ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ fd_catf sys_openat_wr

structs

none

consts

25const K_MAGIC_1784576000: i64 = 1784576000
26const K_MAGIC_1048576: i64 = 1048576
27const K_MAGIC_4000: i64 = 4000
28const K_MAGIC_3000: i64 = 3000
29const K_MAGIC_65536: i64 = 65536
30const K_MAGIC_262144: i64 = 262144
31const K_MAGIC_86400: i64 = 86400

functions

33func fd_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
34func fd_cat(o: *u8, at: i64, s: *u8) -> i64 { var i: i64=0; var a: i64=at; while s[i]!=(0 as u8){o[a]=s[i]; a=a+1; i=i+1} return a }
called by 1: main
35func fd_catf(o: *u8, at: i64, p: *u8, n: i64) -> i64 { var i: i64=0; var a: i64=at; while i<n { o[a]=p[i]; a=a+1; i=i+1 } return a }
called by 1: main
36func fd_catn(o: *u8, at: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
48func fd_zlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
50func fd_slice_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64
57func fd_atoi(p: *u8, n: i64) -> i64
69func fd_earliest(lb: *u8, ln: i64, cls: *u8, cn: i64) -> i64
called by 1: main calls 3: sys_mmapfd_slice_eqfd_atoi
103func fd_cfg_days(lb: *u8, ln: i64) -> i64
called by 1: main calls 3: sys_mmapfd_slice_eqfd_atoi
133func main(argc: i64, argv: *i64) -> i64