code wiki / (root) / nx_sota_why_gate.nx

nx_sota_why_gate.nx

buildroot/runtime/nx_sota_why_gate.nx

10500 B188 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic sota
docsdependenciesstructsconstsfunctions

about

nx_sota_why_gate.nx -- proves the per-domain board reader, BOTH POLARITIES. WHAT IS ACTUALLY UNDER TEST HERE IS THE REFUSALS. nx_sota_why has one job people will trust it for -- "where does this domain stand" -- and five ways to be wrong about it that all look like an answer: answering from a ledger that is absent, truncated, self-inconsistent or stale, or answering about a DIFFERENT domain whose name merely contains this one. Each gets a tooth with the EXIT CODE pinned, because the exit code is the contract for every caller that is not a human reading prose. FIXTURES ARE ASSEMBLED AT RUNTIME under /tmp/<gate>_<clock>/ via gk_fixture_dir, never in knowledge/store: a gate that shares a directory with a production beat measures the STATE OF THAT DIRECTORY and reports it as a verdict about the code. The subject is located from /proc/self/exe, not from the CWD, because the end-to-end teeth deliberately chdir into the fixture tree and a relative elf path would then resolve to nothing -- which reads as a crashed subject rather than as a moved harness. license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gatekit_lib.nx nx_gate_verdict.nx nx_string_ops.nx nx_sota_why_lib.nx nx_sota_why_gate.nx

imports: nx_syscalls.nxnx_gatekit_lib.nxnx_gate_verdict.nxnx_string_ops.nxnx_sota_why_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ sw_cat nx_str_find gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check ↻ sw_row_end sw_row_has nx_str_find ↻ nx_str_len gv_bite gv_puts ↻ sg_selfdir sys_readlinkat

structs

none

consts

21const SG_PATH: i64 = 512
22const SG_OUT: i64 = 65536
23const SG_BIG: i64 = 1048576
24const SG_SLASH: i64 = 47
25const SG_BIGROWS: i64 = 3200
26const SG_LEDGER_CAP: i64 = 262144 // must equal SW_CAP in the subject; T11 asserts we exceeded it
27const SG_ROW1_END: i64 = 33 // end of the first fixture row -- MEASURED by T2, not guessed: my first draft said 34 and the fixture-reached tooth caught it

functions

30func sg_selfdir(out: *u8) -> i64
called by 1: main calls 1: sys_readlinkat
41func main() -> i64