nx_mfrow.nx
buildroot/runtime/nx_mfrow.nx
about
nx_mfrow.nx -- UPDATE ONE ROW OF A TREECANON MANIFEST, AND NOTHING ELSE.
WHY THIS EXISTS, measured 2026-08-16. The treecanon family has a generator (nx_treediff, nx_treehash),
two comparers (nx_treediverge, nx_hashdiverge) and a gate that refuses (nx_treecanon_gate). It has NO
surgical write. So when ONE file is converged across trees, the only sanctioned way to record it is to
REGENERATE THE WHOLE MANIFEST -- and the record is explicit that a whole-tree regeneration while a
sibling is mid-edit is the one action that blesses unreviewed bytes at scale. Measured the same day:
nx_treediverge reports 2,154 divergent paths, so that precondition is not merely risky, it is UNMET.
The result was a converged file that could not be recorded, and therefore an organ that could not be
rebuilt: nx_sov_build_run, laptop and NAS byte-identical, still refused by the canon gate.
★A FAMILY WITH NO SURGICAL WRITE TURNS EVERY CORRECTION INTO A WHOLE-TREE REGENERATION, SO THE ONLY
SAFE-SIZED FIX IS THE ONE NOBODY CAN MAKE.
SCOPE, deliberately narrow: one row, named by its relpath, in a manifest whose other bytes are
untouched. It does not scan a tree, does not compute a hash, and cannot invent a row. Recording a
convergence someone else proved is a DIFFERENT act from deciding one, and only the first belongs here.
license_tier: ORIGINAL Writes ONE named file, atomically. No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_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
| 22 | const MFR_SP: i64 = 32 |
| 23 | const MFR_NL: i64 = 10 |
| 24 | const MFR_HEADROOM: i64 = 256 // output = input + this; a rewritten row can only grow by its own field widths |
functions
| 26 | func mfr_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 27 | func mfr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 28 | func mfr_n(v: i64) -> i64 called by 1: mfr_apply |
| 41 | func mfr_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: mfr_selftest |
| 46 | func mfr_row_is(buf: *u8, s: i64, e: i64, rel: *u8) -> i64 |
| 57 | func mfr_spaces(buf: *u8, s: i64, e: i64) -> i64 called by 1: mfr_apply |
| 64 | func mfr_put(dst: *u8, o: i64, s: *u8) -> i64 called by 1: mfr_apply |
| 73 | func mfr_apply(path: *u8, rel: *u8, newsize: *u8, newhash: *u8) -> i64 |
| 161 | func mfr_selftest() -> i64 |
| 219 | func main(argc: i64, argv: *i64) -> i64 |