code wiki / _hdl_build / nx_favela_decay.nx
nx_favela_decay.nx
buildroot/runtime/_hdl_build/nx_favela_decay.nx
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
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
structs
| none |
consts
| 25 | const K_MAGIC_1784576000: i64 = 1784576000 |
| 26 | const K_MAGIC_1048576: i64 = 1048576 |
| 27 | const K_MAGIC_4000: i64 = 4000 |
| 28 | const K_MAGIC_3000: i64 = 3000 |
| 29 | const K_MAGIC_65536: i64 = 65536 |
| 30 | const K_MAGIC_262144: i64 = 262144 |
| 31 | const K_MAGIC_86400: i64 = 86400 |
functions
| 33 | func 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 } |
| 34 | func 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 |
| 35 | func 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 |
| 36 | func fd_catn(o: *u8, at: i64, v: i64) -> i64 |
| 48 | func fd_zlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 50 | func fd_slice_eq(a: *u8, an: i64, b: *u8, bn: i64) -> i64 |
| 57 | func fd_atoi(p: *u8, n: i64) -> i64 |
| 69 | func fd_earliest(lb: *u8, ln: i64, cls: *u8, cn: i64) -> i64 |
| 103 | func fd_cfg_days(lb: *u8, ln: i64) -> i64 |
| 133 | func main(argc: i64, argv: *i64) -> i64 |