code wiki / _hdl_build / nx_feeder.nx
nx_feeder.nx
buildroot/runtime/_hdl_build/nx_feeder.nx
about
nx_feeder.nx -- AUTONOMOUS BACKLOG FEEDER, operational-gap half (ws=ws-intel8, 2026-07-20).
The INPUT side of the intake pipeline: until now a request only existed if a human or an
agent thought to file one. This organ makes the ECOSYSTEM NOTICE ITS OWN DROPPED THREADS
and file its own tickets, from signals it already records:
(1) DROPPED WORKSTREAM -- a ws_sync lane with a KICKOFF, no DONE, silent > threshold
(2) EXPIRED LEASE -- an nx_claims resource held past its TTL, never released
Each finding becomes ONE nx_pm_intake REQ carrying a STABLE MARKER, so a re-run never
re-files it (idempotent by construction), and each run is CAPPED so the queue can never
be flooded. NOTHING IS FABRICATED: every proposal cites its measured age/holder/checkpoint;
a source with no finding files nothing. Downstream: nx_triage routes it, /intake renders it.
Composes nx_ws_sync + nx_claims + nx_pm_intake; duplicates none of them.
F208 COORDINATION: the ATLAS-sourced feeder half (maturity-gap x momentum -> F-rows,
researcher+architect, nx_atlas_discover/recombine) is NOT claimed here -- different
sources, complementary; this is the operational-gap half owned by the coordination lane.
SCALE LAW: windowed reads + declared envelope (window_bytes/truncated/filed/skipped/capped).
license_tier: ORIGINAL No hw writes (Rule 26).
scan <ws_jrnl> <claims_jrnl> <intake_jrnl> -> JSON findings (READ-ONLY)
run <ws_jrnl> <claims_jrnl> <intake_jrnl> <actor> -> file them, JSON summary
selftest <scratch-journal> -> gate T1..T8 (pre-cleaned)
dependencies 2 imports · 0 importers
imports: nx_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
| 22 | const FD_MAGIC_4096: i64 = 4096 |
| 23 | const FD_MAGIC_2000: i64 = 2000 |
| 24 | const FD_MAGIC_1024: i64 = 1024 |
| 25 | const FD_MAGIC_1000000: i64 = 1000000 |
| 27 | const FD_WIN: i64 = 4194304 |
| 28 | const FD_OUT: i64 = 262144 |
| 29 | const FD_SOFT: i64 = 49152 |
| 30 | const FD_NOTE: i64 = 1024 |
| 31 | const FD_NAME_MAX: i64 = 120 |
| 32 | const FD_NOTE_MAX: i64 = 200 |
| 34 | const FD_DROPPED_SEC: i64 = 172800 |
| 35 | const FD_MAXFILE: i64 = 5 |
functions
| 37 | func fd_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 } |
| 38 | func fd_catn(d: *u8, o: i64, v: i64) -> i64 |
| 50 | func fd_vlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 51 | func fd_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 60 | func fd_le(q: *u8, i: i64, n: i64) -> i64 |
| 66 | func fd_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 |
| 82 | func fd_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64 |
| 88 | func fd_span_eq(q: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64 |
| 94 | func fd_atoi(q: *u8, s: i64, e: i64) -> i64 |
| 101 | func fd_find(d: *u8, dn: i64, lit: *u8) -> i64 |
| 115 | func fd_append_req(journal: *u8, id: i64, actor: *u8, note: *u8) -> i64 |
| 144 | func fd_id_taken(q: *u8, n: i64, idv: i64) -> i64 |
| 156 | func fd_ws_first_kick(q: *u8, upto: i64, ws_s: i64, ws_e: i64) -> i64 |
| 169 | func fd_ws_has(q: *u8, n: i64, verb: *u8, ws_s: i64, ws_e: i64) -> i64 |
| 182 | func fd_ws_last_ts(q: *u8, n: i64, ws_s: i64, ws_e: i64) -> i64 |
| 196 | func fd_ws_last_note(q: *u8, n: i64, ws_s: i64, ws_e: i64, out: *i64) -> i64 |
| 213 | func fd_ws_dropped(q: *u8, n: i64, now: i64, ws_s: i64, ws_e: i64) -> i64 |
| 223 | func fd_cl_state(q: *u8, n: i64, now: i64, res_s: i64, res_e: i64, out: *i64) -> i64 |
| 264 | func fd_res_seen(q: *u8, upto: i64, r_s: i64, r_e: i64) -> i64 |
| 276 | func fd_note_dropped(nb: *u8, q: *u8, ws_s: i64, ws_e: i64, age_min: i64, note_s: i64, note_e: i64, hasnote: i64) -> i64 |
| 296 | func fd_note_expired(nb: *u8, q: *u8, r_s: i64, r_e: i64, h_s: i64, h_e: i64, over_sec: i64, ttl: i64) -> i64 |
| 316 | func fd_marker_dropped(mb: *u8, q: *u8, ws_s: i64, ws_e: i64) -> i64 |
| 325 | func fd_marker_expired(mb: *u8, q: *u8, r_s: i64, r_e: i64) -> i64 |
| 337 | func fd_sweep(wq: *u8, wn: i64, cq: *u8, cn: i64, iq: *u8, iN: i64, ij: *u8, actor: *u8, now: i64, mode: i64, maxfile: i64, cx: *i64) -> i64 |
| 406 | func fd_key(d: *u8, o: i64, name: *u8) -> i64 |
| 416 | func fd_qlit(d: *u8, o: i64, s: *u8) -> i64 |
| 423 | func fd_summary(d: *u8, modename: *u8, cx: *i64, wn: i64, cn: i64, iN: i64, trunc: i64, maxfile: i64) -> i64 |
| 471 | func fd_mkpath(dst: *u8, src: *u8, suf: *u8) -> i64 |
| 478 | func fd_wr(path: *u8, body: *u8) -> i64 |
| 487 | func fd_selftest(base: *u8) -> i64 |
| 563 | func main(argc: i64, argv: *i64) -> i64 |