code wiki / _hdl_build / nx_feeder.nx

nx_feeder.nx

buildroot/runtime/_hdl_build/nx_feeder.nx

24193 B605 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_feeder.nx

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

main gv_puts sys_write sys_exit fd_vlen fd_lit_eq fd_selftest gv_ctr sys_mmap gv_head gv_puts ↻ sys_mmap ↻ fd_mkpath fd_cat fd_read sys_openat_rd sys_read sys_close fd_sweep sys_mmap ↻ fd_le fd_col fd_lit_eq ↻ fd_ws_first_kick sys_mmap ↻ fd_le ↻ fd_col ↻ fd_lit_eq ↻ fd_span_eq fd_ws_dropped fd_ws_has sys_mmap ↻ fd_le ↻ fd_col ↻ fd_lit_eq ↻ fd_span_eq ↻ fd_ws_last_ts sys_mmap ↻ fd_le ↻ fd_col ↻

structs

none

consts

22const FD_MAGIC_4096: i64 = 4096
23const FD_MAGIC_2000: i64 = 2000
24const FD_MAGIC_1024: i64 = 1024
25const FD_MAGIC_1000000: i64 = 1000000
27const FD_WIN: i64 = 4194304
28const FD_OUT: i64 = 262144
29const FD_SOFT: i64 = 49152
30const FD_NOTE: i64 = 1024
31const FD_NAME_MAX: i64 = 120
32const FD_NOTE_MAX: i64 = 200
34const FD_DROPPED_SEC: i64 = 172800
35const FD_MAXFILE: i64 = 5

functions

37func 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 }
38func fd_catn(d: *u8, o: i64, v: i64) -> i64
50func fd_vlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 3: fd_findfd_wrmain
51func fd_read(path: *u8, buf: *u8, cap: i64) -> i64
60func fd_le(q: *u8, i: i64, n: i64) -> i64
66func fd_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64
82func fd_lit_eq(q: *u8, s: i64, e: i64, lit: *u8) -> i64
88func fd_span_eq(q: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64
94func fd_atoi(q: *u8, s: i64, e: i64) -> i64
101func fd_find(d: *u8, dn: i64, lit: *u8) -> i64
called by 2: fd_sweepfd_selftest calls 1: fd_vlen
115func fd_append_req(journal: *u8, id: i64, actor: *u8, note: *u8) -> i64
144func fd_id_taken(q: *u8, n: i64, idv: i64) -> i64
called by 1: fd_sweep calls 4: sys_mmapfd_lefd_colfd_atoi
156func fd_ws_first_kick(q: *u8, upto: i64, ws_s: i64, ws_e: i64) -> i64
169func fd_ws_has(q: *u8, n: i64, verb: *u8, ws_s: i64, ws_e: i64) -> i64
182func fd_ws_last_ts(q: *u8, n: i64, ws_s: i64, ws_e: i64) -> i64
196func fd_ws_last_note(q: *u8, n: i64, ws_s: i64, ws_e: i64, out: *i64) -> i64
213func fd_ws_dropped(q: *u8, n: i64, now: i64, ws_s: i64, ws_e: i64) -> i64
called by 1: fd_sweep calls 2: fd_ws_hasfd_ws_last_ts
223func fd_cl_state(q: *u8, n: i64, now: i64, res_s: i64, res_e: i64, out: *i64) -> i64
264func fd_res_seen(q: *u8, upto: i64, r_s: i64, r_e: i64) -> i64
276func 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
called by 1: fd_sweep calls 2: fd_catfd_catn
296func 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
called by 1: fd_sweep calls 2: fd_catfd_catn
316func fd_marker_dropped(mb: *u8, q: *u8, ws_s: i64, ws_e: i64) -> i64
called by 1: fd_sweep calls 1: fd_cat
325func fd_marker_expired(mb: *u8, q: *u8, r_s: i64, r_e: i64) -> i64
called by 1: fd_sweep calls 1: fd_cat
337func 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
406func fd_key(d: *u8, o: i64, name: *u8) -> i64
called by 1: fd_summary calls 1: fd_cat
416func fd_qlit(d: *u8, o: i64, s: *u8) -> i64
called by 1: fd_summary calls 1: fd_cat
423func fd_summary(d: *u8, modename: *u8, cx: *i64, wn: i64, cn: i64, iN: i64, trunc: i64, maxfile: i64) -> i64
called by 1: main calls 3: fd_keyfd_catnfd_qlit
471func fd_mkpath(dst: *u8, src: *u8, suf: *u8) -> i64
called by 1: fd_selftest calls 1: fd_cat
478func fd_wr(path: *u8, body: *u8) -> i64
487func fd_selftest(base: *u8) -> i64
563func main(argc: i64, argv: *i64) -> i64