code wiki / _hdl_build / nx_backlog_feeder.nx
nx_backlog_feeder.nx
buildroot/runtime/_hdl_build/nx_backlog_feeder.nx
about
nx_backlog_feeder.nx -- F208 AUTONOMOUS BACKLOG FEEDER, evidence->FRONTIER half (ws=auto-f208-feeder, 2026-07-21).
nx_feeder (ws-intel8) notices dropped threads and files INTAKE proposals; the router triages them;
but NOTHING committed deps-resolved F-rows onto the frontier from measured evidence. This organ is
that committer, rung 1 = the DEBT source: every OPEN debt at sev >= minsev becomes ONE frontier row
F<auto> "debt <epoch>: <desc>" weight=<sev> prio=1 <owner> T deps=- [FEED:debt:<epoch>.<k>] <lane>
HONEST WEIGHTS: the row weight IS the measured debt sev, so nx_seat ready (w-desc) ranks feeder rows
truthfully against hand-filed rungs (RANKW1 contract). DEPS-RESOLVED: deps=- (a debt is actionable now).
SAFETY BY CONSTRUCTION:
- ids are NEVER fixed: F<max+1> batch-assigned under the SAME <prefix>plock nx_frontier_put takes
(frontier ids collide across lanes; addauto semantics reused, computed in ONE critical section)
- CONTENT-IDEMPOTENT: marker [FEED:debt:<epoch>.<k>] in the extra col; a re-run on unchanged
evidence adds ZERO rows. k = the epoch's occurrence ordinal among debt rows, so D025 epoch-id
collisions (two debts, same epoch) still yield DISTINCT markers -- never a wrong-row dedupe.
- per-run cap: the frontier can never be flooded; capped findings are REPORTED, not lost (next run).
- ONE sts_seed per run (one new segment) -- honors the seg-store quadratic lesson; a run that adds
nothing commits NOTHING (no segment churn, planeguard-quiet).
- fail-closed: unseeded frontier plane -> refuse, commit nothing (mirrors nx_frontier_put).
NOTHING IS FABRICATED: every row cites its debt epoch + measured sev; eaten/low-sev debts are skipped.
Residual sources (gap queues, atlas maturity-gap, intake-TRIAGED promotion) = FILED follow-on rungs.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
scan <minsev> <maxfile> [debt-prefix] [frontier-prefix] -> JSON (READ-ONLY)
run <minsev> <maxfile> <owner> <lane> [debt-prefix] [frontier-prefix] [exportpath] -> commit, JSON
selftest <scratch-prefix-base> -> gate T1..T9
dependencies 4 imports · 0 importers
imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nxnx_gate_verdict.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
| 29 | const BF_CAP: i64 = 1048576 |
| 30 | const BF_TAB: i64 = 9 |
| 31 | const BF_NL: i64 = 10 |
| 32 | const BF_STDERR: i64 = 2 |
| 33 | const BF_LOCK_EX: i64 = 2 |
| 34 | const BF_MODE: i64 = 420 |
| 35 | const BF_SPAN: i64 = 16 |
| 36 | const BF_PATHCAP: i64 = 256 |
| 37 | const BF_HDRCAP: i64 = 512 |
| 38 | const BF_OUTJSON: i64 = 8192 |
| 39 | const BF_MARKCAP: i64 = 128 |
| 40 | const BF_TITLE_MAX: i64 = 140 |
| 41 | const BF_EXIT_USAGE: i64 = 2 |
| 42 | const BF_MAGIC_28: i64 = 28 |
functions
| 44 | func bf_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } calls 1: sys_write |
| 45 | func bf_werr(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(BF_STDERR, s, n); return 0 } |
| 46 | func bf_vlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 47 | func bf_cat(d: *u8, o: i64, s: *u8) -> i64 { var p: i64 = o; var i: i64 = 0; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p } |
| 48 | func bf_catn(d: *u8, o: i64, v: i64) -> i64 { let t: *u8 = sys_mmap(BF_MAGIC_28); var m: i64 = v; var p: i64 = o; if m < 0 { m = 0 } var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { d[p] = t[k-1-i]; p = p + 1; i = i + 1 } return p } |
| 49 | func bf_atoi_c(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v } called by 1: main |
| 50 | func bf_le(q: *u8, i: i64, n: i64) -> i64 { var e: i64 = i; var s: i64 = 1; while s == 1 { if e >= n { s = 0 } else { if q[e] == (BF_NL as u8) { s = 0 } else { e = e + 1 } } } return e } |
| 51 | func bf_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 |
| 67 | func bf_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 73 | func bf_span_eq(q: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64 called by 1: bf_epoch_ordinal |
| 79 | func bf_atoi_span(q: *u8, s: i64, e: i64) -> i64 called by 1: bf_sweep |
| 86 | func bf_find(d: *u8, dn: i64, lit: *u8) -> i64 |
| 101 | func bf_lock(prefix: *u8) -> i64 |
| 112 | func bf_export(path: *u8, rows: *u8, n: i64) -> i64 |
| 124 | func bf_max_fid(q: *u8, n: i64, letter: i64) -> i64 |
| 146 | func bf_epoch_ordinal(q: *u8, n: i64, upto: i64, e_s: i64, e_e: i64) -> i64 |
| 158 | func bf_marker(mb: *u8, q: *u8, e_s: i64, e_e: i64, ord: i64) -> i64 |
| 172 | func bf_catn3(d: *u8, o: i64, v: i64) -> i64 |
| 180 | func bf_append_row(out: *u8, o: i64, fid: i64, q: *u8, e_s: i64, e_e: i64, d_s: i64, d_e: i64, sev: i64, owner: *u8, lane: *u8, mb: *u8) -> i64 |
| 225 | func bf_sweep(dpfx: *u8, fpfx: *u8, minsev: i64, maxfile: i64, owner: *u8, lane: *u8, expath: *u8, mode: i64, cx: *i64) -> i64 |
| 284 | func bf_key(d: *u8, o: i64, name: *u8) -> i64 |
| 294 | func bf_qlit(d: *u8, o: i64, s: *u8) -> i64 |
| 303 | func bf_summary(d: *u8, modename: *u8, cx: *i64, minsev: i64, maxfile: i64) -> i64 |
| 370 | func bf_mkpfx(dst: *u8, base: *u8, suf: *u8) -> i64 |
| 378 | func bf_count_id(q: *u8, n: i64, lit: *u8) -> i64 |
| 390 | func bf_row_tabs(q: *u8, n: i64, needle: *u8) -> i64 |
| 409 | func bf_row_col(q: *u8, n: i64, needle: *u8, c: i64, out: *i64) -> i64 |
| 424 | func bf_selftest(base: *u8) -> i64 |
| 509 | func main(argc: i64, argv: *i64) -> i64 |