nx_swcompare_shape_gate.nx
buildroot/runtime/nx_swcompare_shape_gate.nx
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
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
structs
| none |
consts
| 17 | const SG_OUT: i64 = 1048576 |
| 18 | const SG_PATH: i64 = 512 |
| 19 | const SG_MODE_755: i64 = 493 |
| 20 | const SG_MODE_644: i64 = 420 |
| 21 | const SG_DIR: *u8 = "/tmp/nx_swcompare_shape_gate" as *u8 |
functions
| 23 | func sg_find(q: *u8, n: i64, lit: *u8) -> i64 |
| 38 | func sg_pos(q: *u8, from: i64, n: i64, lit: *u8) -> i64 |
| 53 | func sg_exists(path: *u8) -> i64 |
| 60 | func sg_write_text(path: *u8, s: *u8) -> i64 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |