code wiki / (root) / nx_gateemit_gate.nx

nx_gateemit_gate.nx

buildroot/runtime/nx_gateemit_gate.nx

10699 B214 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_gateemit_gate.nx -- WHAT FRACTION OF PROMOTED GATES CAN BE READ BY A RULER? R4 of the SOTA plan asks that every gate be non-vacuous: able to fail, and able to prove it looked. That cannot be CLAIMED fleet-wide without being MEASURED fleet-wide -- which is the same mistake the whole coverage taxonomy is about. This measures it. THE EMIT CONTRACT a ruler needs (learned the hard way today, from my own gates being UNPARSED): 1. `passed N/M verdict=` on stdout -- so nx_gateverify can parse a pass ratio 2. a durable line in knowledge/status/ -- because stdout is watched for ten seconds and the LOG is what every ruler reads forever A gate missing either is CORRECT but INVISIBLE, and an invisible gate contributes nothing to any rollup. I shipped four such gates today before noticing. ⚠⚠ THIS IS A STATIC PROXY AND SAYS SO. It greps the promoted BINARY for the emit strings. That proves the gate CAN emit, not that it DOES on every path -- only running it proves that, and running 379 gates costs hours (one finance gate alone takes 156s). Binary presence is a LOWER BOUND on capability and an UPPER BOUND on nothing. Cf. the recorded law: BINARY GREP IS VALID ONE WAY ONLY -- a string's PRESENCE is evidence it shipped; a string's ABSENCE is the only thing this can assert about emit. The authoritative per-gate check remains nx_gateverify, which RUNS the gate and compares printed vs logged. This is the cheap sweep that tells you WHERE to point it. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 D001 MIGRATE-ON-TOUCH, applied to this gate BY ITS OWN SUBJECT MATTER. The promote chokepoint refused an earlier revision with: "this gate rolls its own verdict instead of inheriting nx_gate_verdict, so nothing can read its outcome" -- i.e. the gate that MEASURES emit-contract adoption was itself only MIMICKING the strings rather than inheriting the lib. Mimicry passes a grep and still leaves no harness.jrnl frame, so flake and erosion stay invisible for it exactly as for the 307 it names. ★★★★★★ EMITTING THE RIGHT STRING IS NOT THE SAME AS INHERITING THE CONTRACT -- one satisfies a reader, the other joins the ledger. The enforcement caught me; that is the enforcement working.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_dirent.nx nx_gate_verdict.nx nx_gateemit_gate.nx

imports: nx_syscalls.nxnx_dirent.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 ge_p ge_len sys_write sys_mmap sys_openat_rd sys_getdents64 dirent_reclen dirent_name ge_is_gate ge_len ↻ sys_read sys_close ge_has ge_len ↻ ge_pn sys_mmap ↻ sys_write ↻ sys_openat_append ge_wf ge_len ↻ sys_write ↻ ge_pnf sys_mmap ↻ sys_write ↻ gv_ctr sys_mmap ↻ gv_head gv_puts sys_write ↻ gv_check gv_puts ↻ gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append ↻

structs

none

consts

34const GE_LOG: *u8 = "knowledge/status/gateemit_gate.log"
35const GE_MODE: i64 = 420
36const GE_CAP: i64 = 4194304

functions

38func ge_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
39func ge_p(s: *u8) -> i64 { let n: i64 = ge_len(s); sys_write(1, s, n); return 0 }
called by 1: main calls 2: ge_lensys_write
40func ge_wf(fd: i64, s: *u8) -> i64 { let n: i64 = ge_len(s); sys_write(fd, s, n); return 0 }
called by 1: main calls 2: ge_lensys_write
41func ge_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
52func ge_pnf(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
63func ge_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: ge_len
79func ge_is_gate(nm: *u8) -> i64
called by 1: main calls 1: ge_len
89func main() -> i64