code wiki / _hdl_build / nx_gate_rollup.nx
nx_gate_rollup.nx
buildroot/runtime/_hdl_build/nx_gate_rollup.nx
about
nx_gate_rollup.nx -- ONE ANSWER TO "ARE ALL THE GATES GREEN?" (eats debt seq986).
WHY THIS EXISTS (measured 2026-07-25): the tickless clock daemon dispatches gate jobs on schedule, but
clk_dispatch_run counts a job as dispatched whenever it merely RAN -- it never distinguishes exit 0 from
exit 1 and discards the child's stdout. So each gate now appends its own verdict to knowledge/status/
<gate>.log. That made a RED DURABLE, but durable is not the same as SURFACED: a line in a file nobody
reads still fails silently. This organ is the reader.
SURVEYED FIRST (operator standing instruction, don't duplicate): nx_ecosystem_maturity_rollup exists but
answers a DIFFERENT question from a DIFFERENT source (maturity depth x breadth from the ecomat seg_store
+ autonomy ledger). nx_deploy_ready is a pre-deploy safety gate. Neither reads gate verdict logs. There
are 91 knowledge/status/*.log files and nothing rolls up their verdicts -- this is genuinely net-new.
DATA-DRIVEN (rule 11): the roster lives in the plane `knowledge/store/gatereg-` as
id | gate-banner | log-path
so registering a new gate is a STORE ROW, not a rebuild of this organ.
FAIL-CLOSED: a log that is MISSING, EMPTY, or whose newest line carries no verdict= is reported as
UNKNOWN and counted RED. "I could not tell" must never read as "fine" -- that is the whole failure mode
this organ exists to remove.
D001: emits a `verdict=` anchor. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_gate_lib.nxnx_gate_verdict_lib.nxnx_syscalls.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
| 26 | const GR_MAGIC_65536: i64 = 65536 |
| 27 | const GR_MAGIC_4096: i64 = 4096 |
| 28 | const GR_MAGIC_1024: i64 = 1024 |
| 30 | const GR_CONF: *u8 = "knowledge/gatereg.conf" |
| 31 | const GR_LOGCAP: i64 = 262144 |
| 32 | const GR_EXIT_RED: i64 = 1 |
functions
| 41 | func main(argc: i64, argv: *i64) -> i64 |