code wiki / (root) / nx_swcompare_shape_gate.nx

nx_swcompare_shape_gate.nx

buildroot/runtime/nx_swcompare_shape_gate.nx

11134 B173 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic swcompare
docsdependenciesstructsconstsfunctions

about

nx_swcompare_shape_gate.nx -- END-TO-END gate for the /compare matrix ROW SHAPE (operator 2026-09-05: "you have random shit in the compare that makes no sense to a human ... make it sound like a positive ... improve the /compare emitter to be more intelligent like a pros vs cons instead of single shaping everything"). The generator used to render every row as a glyph strip plus a raw adoption token styled like a badge. This gate builds a FIXTURE domain in /tmp/<gate>/ (the fixture-ratchet law: never a production file), forks the SUBJECT generator on it with CWD inside the fixture, and asserts the derived Pros / Cons strip says the right thing, signed the right way, for each row shape: A Nishi present, one rival LEADS, one rival present, two absent -> ahead of two, behind the leader B an open watch contract (_ABSENT_:) -> "open contract" con C Nishi present, every rival absent -> NO rival con (neg-control) Named for the PROPERTY (row shape), not the organ; organ_gate.conf binds it to nx_swcompare_matrix. exit: 0 GREEN / 1 RED (gv_verdict law).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_swcompare_shape_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tool_run.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 ↻ sg_exists sys_openat_rd sys_close gv_puts ↻ gv_check gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_puts ↻ gv_num ↻ gv_journal

structs

none

consts

17const SG_OUT: i64 = 1048576
18const SG_PATH: i64 = 512
19const SG_MODE_755: i64 = 493
20const SG_MODE_644: i64 = 420
21const SG_DIR: *u8 = "/tmp/nx_swcompare_shape_gate" as *u8

functions

23func sg_find(q: *u8, n: i64, lit: *u8) -> i64
38func sg_pos(q: *u8, from: i64, n: i64, lit: *u8) -> i64
53func sg_exists(path: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
60func sg_write_text(path: *u8, s: *u8) -> i64
70func main(argc: i64, argv: *i64) -> i64