code wiki / (root) / nx_market_ladder_gate.nx

nx_market_ladder_gate.nx

buildroot/runtime/nx_market_ladder_gate.nx

9934 B141 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic market
docsdependenciesstructsconstsfunctions

about

nx_market_ladder_gate.nx -- THE GATE FOR THE MARKET-ENTRY VERDICT (nx_market_ladder_lib + the CLI), 2026-08-24. SUBJECT: the lib in-process AND the nx_market_ladder ELF forked for real (its exit code is the contract). FIXTURES ARE ASSEMBLED AT RUNTIME in /tmp/nx_market_ladder_gate/: a matrix with two watch rows pointing at a fixture organ, a plan with two rungs and five ladder levels, and the organ declaring ONE of the two symbols. Expected: Open (no requirement) NO-REQUIREMENT; Half (R1,R2) GROW-FIRST binding R2; None (R2) HOLD; Wrong (authored ENTER, requires R2) DISAGREE; Ghost (R9, no such rung) UNRESOLVED -- never a silent ENTER. THE BITE: append the second symbol to the fixture organ and the HOLD level must flip to ENTER (the verdict tracks the SOURCE through the one symbol ruler, not a cached claim). THE NEG-CONTROL for the exit contract: a plan whose authored words all agree exits 0; the plan with a wrong word exits 1. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_market_ladder_lib.nx nx_market_ladder_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nxnx_market_ladder_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 ↻ gv_puts ↻ sys_mkdir sys_unlinkat mg_write_text sys_openat_wr sys_write ↻ sys_close

structs

none

consts

17const MG_SUBJECT_DEFAULT: *u8 = "nx_market_ladder.elf"
18const MG_DIR: *u8 = "/tmp/nx_market_ladder_gate"
19const MG_DIR_SLASH: *u8 = "/tmp/nx_market_ladder_gate/"
20const MG_MATRIX: *u8 = "/tmp/nx_market_ladder_gate/fx.matrix"
21const MG_PLAN: *u8 = "/tmp/nx_market_ladder_gate/fx.plan"
22const MG_PLAN_OK: *u8 = "/tmp/nx_market_ladder_gate/fxok.plan"
23const MG_MATRIX_OK: *u8 = "/tmp/nx_market_ladder_gate/fxok.matrix"
24const MG_ORGAN: *u8 = "/tmp/nx_market_ladder_gate/fx_organ.nx"
25const MG_MODE_DIR: i64 = 493
26const MG_MODE_0644: i64 = 420
27const MG_CAPTURE_CAP: i64 = 65536
28const MG_ARGV_SLOTS: i64 = 8
29const MG_SLOT: i64 = 8
30const MG_EXIT_OK: i64 = 0
31const MG_EXIT_DISAGREE: i64 = 1

functions

33func mg_write_text(path: *u8, s: *u8) -> i64
43func mg_append_text(path: *u8, s: *u8) -> i64
52func mg_run(subject: *u8, dom: *u8, dir: *u8, out: *u8, outlen: *i64) -> i64
61func main(argc: i64, argv: *i64) -> i64