nx_field_beat.nx
buildroot/runtime/nx_field_beat.nx
about
nx_field_beat.nx -- THE OFF-PEAK FIELD BEAT (/compare/fieldwatch FW4, 2026-09-05): re-runs nx_field_discover for every
domain on regen.list that carries a .seeds file, so the discovered field is LIVING -- re-read on a beat, never authored
once. "Not during peak times" (operator, 2026-09-05) is MEASURED, not guessed: the clock row `fieldbeat` is listed in
knowledge/status/clock_heavy.conf, so nx_clock_tickless defers it through clk_storm_defer while nx_ioadmit_lib reports
zero spawn budget (the same D-state line /api/build refuses on); a wall-clock window would be a magic number that
dispatches into a storm at 03:00 and idles a quiet afternoon.
Stamp: knowledge/status/fieldbeat.stamp, truncate-written LAST (ts= domains= ran= ok= failed= skipped_no_seeds= sum=
candidates_total= drifted_total= capped= verdict=GREEN|RED|EMPTY); a non-default list stamps <list>.stamp so a trial run can
never forge the production heartbeat. Journal: knowledge/status/fieldbeat.jrnl, one row per domain per run (append).
The decisions live in nx_field_beat_lib (gated in-process); the first production stamp is the wire's witness.
fw_beat is the FW4 watch symbol: it IS the loop, not a name written to flip a cell. fw_refetch_drift is the FW5 watch
symbol: the discover organ re-fetches every seed on every run and reports drifted= (a mirror whose bytes changed since
the previous fetch); this beat sums it into drifted_total= -- a COUNT, never an alarm, because a dynamic page carrying a
per-request nonce drifts every beat; the alarm is the .field diff FW9 raises when a rival appears or vanishes.
Usage: nx_field_beat [list-path] default buildroot/knowledge/compare/regen.list
Exits: 0 every domain with seeds ran OK | 1 at least one domain FAILED (stamp written, verdict=RED) | 2 usage
| 3 refused: list unreadable or names no domain (NO stamp), or no domain carried seeds (stamp verdict=EMPTY)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tool_run.nxnx_field_beat_lib.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
| 23 | const FB_ROOT: *u8 = "/volume1/homes/elderwesto/nishihost/" |
| 24 | const FB_DISCOVER: *u8 = "/volume1/homes/elderwesto/nishihost/nx_field_discover.elf" |
| 25 | const FB_LIST_DEFAULT: *u8 = "buildroot/knowledge/compare/regen.list" |
| 26 | const FB_SEEDS_DIR: *u8 = "buildroot/knowledge/compare/" |
| 27 | const FB_SEEDS_EXT: *u8 = ".seeds" |
| 28 | const FB_JRNL: *u8 = "knowledge/status/fieldbeat.jrnl" |
| 29 | const FB_PATH_CAP: i64 = 1024 |
| 30 | const FB_CAPCAP: i64 = 262144 // one discover receipt: FIELD-SEED lines for up to FD_MAX_SEEDS=62 seeds plus the FIELD-OK line, 256 KiB is 40x the measured 43-seed run |
| 31 | const FB_ARGVN: i64 = 4 |
| 32 | const FB_DOMAIN_TIMEOUT_MS: i64 = 1800000 // one domain's discovery: at most FD_MAX_SEEDS=62 fetches through the sovereign fetcher, whose own per-fetch deadline bounds each; a domain past 30 minutes is counted FAILED and announced, never waited on forever |
| 33 | const FB_T_OK: i64 = 0 // slots of the totals vector fw_beat fills |
| 34 | const FB_T_FAILED: i64 = 1 |
| 35 | const FB_T_SKIPPED: i64 = 2 |
| 36 | const FB_T_CANDS: i64 = 3 |
| 37 | const FB_T_DRIFT: i64 = 4 // FW5: seed mirrors that changed since the previous fetch, summed over the domains that ran |
| 38 | const FB_T_N: i64 = 5 |
| 39 | const FB_EXIT_RED: i64 = 1 |
| 40 | const FB_EXIT_USAGE: i64 = 2 |
| 41 | const FB_EXIT_REFUSE: i64 = 3 |
| 42 | const FB_OUTFD: i64 = 1 |
| 43 | const FB_ERRFD: i64 = 2 |
functions
| 45 | func fbp_out(s: *u8) -> i64 { fb_puts(FB_OUTFD, s); return 0 } |
| 46 | func fbp_err(s: *u8) -> i64 { fb_puts(FB_ERRFD, s); return 0 } |
| 47 | func fbp_exists(path: *u8) -> i64 |
| 56 | func fw_refetch_drift(cap: *u8, n: i64) -> i64 { return fb_receipt_int(cap, n, "drifted" as *u8) } |
| 60 | func fw_beat(names: *u8, n: i64, ts: i64, jfd: i64, tot: *i64) -> i64 |
| 110 | func main(argc: i64, argv: *i64) -> i64 |