nx_field_beat_gate.nx
buildroot/runtime/nx_field_beat_gate.nx
about
nx_field_beat_gate.nx -- THE GATE FOR THE FIELD BEAT'S DECISIONS (nx_field_beat_lib, /compare/fieldwatch FW4).
Drives the decision core IN-PROCESS on fixtures assembled at RUNTIME under /tmp/nx_field_beat_gate/ (no fork of the
discover organ, no production stamp, no journal row). What it must catch: a list reader that counts comment or blank
lines as domains or keeps a CR inside a name; a receipt reader that takes a seed line's candidates= for the run's, or
reads an absent field as zero; a classifier that calls a clean exit with no receipt OK; a stamp path that lets a trial
run write the production heartbeat; a stamp whose partition does not sum; a verdict that reads GREEN over zero runs.
The fork of nx_field_discover is deliberately not exercised here (that would share the production artifact with a
beat); the first production stamp with domains= and sum= is the wire's witness.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
| 15 | const G_DIR: *u8 = "/tmp/nx_field_beat_gate" |
| 16 | const G_STAMP: *u8 = "/tmp/nx_field_beat_gate/fixture.stamp" |
| 17 | const G_STAMP_RED: *u8 = "/tmp/nx_field_beat_gate/fixture_red.stamp" |
| 18 | const G_MODEDIR: i64 = 493 |
| 19 | const G_CAP: i64 = 65536 |
| 20 | const G_PATH: i64 = 1024 |
| 22 | const G_LIST: *u8 = "@ comment line\nmodding~\n fieldwatch \n\nsearch\n@ tail\n" |
| 23 | const G_COMMENTS: *u8 = "@ a\n@ b\n\n" |
| 24 | const G_RECEIPT: *u8 = "[nx_field_discover] CWD anchored\nFIELD-SEED key=nexus kind=named url=https://a/ candidates=5\nFIELD-OK dom=modding seeds=43 scanned=40 fetched=2 reused=38 failed=3 sum=43 named=31 candidates=736 mentions=1200 capped=0 bytes=9999 out=/x\n" |
| 25 | const G_NO_OK: *u8 = "FIELD-SEED key=nexus kind=named url=https://a/ candidates=5\nFIELD-REFUSE no seeds file\n" |
| 26 | const G_CH_AT: i64 = 64 |
| 27 | const G_CH_TILDE: i64 = 126 |
| 28 | const G_CH_HASH: i64 = 35 |
| 29 | const G_CH_CR: i64 = 13 |
| 30 | const G_TS: i64 = 1788648000 |
| 31 | const G_LISTPATH: *u8 = "/tmp/nx_field_beat_gate/list.txt" |
| 32 | const G_OVER: i64 = 3 // rows past FB_MAX_DOMAINS in the capped fixture |
functions
| 34 | func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 35 | func g_fix(src: *u8) -> *u8 |
| 49 | func g_read(path: *u8, lenout: *i64) -> *u8 |
| 57 | func main(argc: i64, argv: *i64) -> i64 |