code wiki / _hdl_build / nx_softtissue_mr_gate.nx

nx_softtissue_mr_gate.nx

buildroot/runtime/_hdl_build/nx_softtissue_mr_gate.nx

28169 B524 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic softtissue
docsdependenciesstructsconstsfunctions

about

nx_softtissue_mr_gate.nx -- METAMORPHIC-RELATIONS SEAT for the soft-tissue solver (metrology council seat 2, 2026-08-03). ORACLE-FREE BY CONSTRUCTION: every tooth below compares the solver AGAINST ITSELF under a transformation whose effect on the output is known a priori. No reference data, no capture session, no foreign engine, no third-party library -- the entire seat is sovereign nishilang over nx_softbind/nx_softdyn. That is the whole point of this seat: it is the only council member that can grade contact and soft tissue with nothing to compare to. WHY THIS SEAT EXISTS (corpus recon 2026-08-03): `metamorphic` appears in 21,459 estate files ONLY as a CAPABILITY-ATTENUATION relation (nx_property_test.nx M1). `galilean` = 0 matches, `time_reversal` = 0 matches. There was no physics metamorphic testing anywhere in the estate. ⚠A CORRECTION I OWE MY OWN EARLIER CLAIM: I told the operator this seat would use TIME-REVERSAL. It must not. sd_step is semi-implicit (symplectic) Euler, whose exact inverse is the ADJOINT method (position-then-velocity), not itself; with integer truncation on top, a reversal tooth would fail on a CORRECT solver = a false RED. The invariant that actually catches the reported foot-vs-bounce defect class is TIME-TRANSLATION invariance (T4), not time reversal. ⇒ A PROPOSED TOOTH IS A HYPOTHESIS AND MUST SURVIVE THE SAME EXAMINATION IT IMPOSES. T0 FIDELITY the in-gate reference transcription is bit-identical to the SHIPPING solver (without this, every mutant result below is unattributable) T1 TRANSLATION Galilean/static: shift the whole frame by delta -> relative motion IDENTICAL T2 AXIS-PERM x/y/z are the same physics -> same drive on any axis gives the SAME response (sd_step's acc lines are triple-copied and index-shifted: the copy-paste site) T3 REFLECTION negate the drive -> response negates EXACTLY (documents the CURRENT symmetry; adopting Cai-2018 piecewise-asymmetric k_up/k_down MUST turn this tooth RED) T4 TIME-TRANS same input history at a different absolute tick -> same response (the free-running-clock defect class: nx_wasm_craft ph = MC_PH + 5 per tick) T5 QUIESCENCE zero input -> exactly zero response, forever (the "she bounces at rest" class) T6 FRAME-DEP CHARACTERISATION, not an invariance: damping is against the WORLD frame, so uniform motion IS observable. Measures the lag and pins its magnitude. T7 MONOTONIC a larger drive can never produce a smaller peak T8 IMPULSE-REFL reflection through the impulse path (a different code path than T3's anchor) T9/T10/T11 BITE each detector fires on its targeted crafted-bad engine, silent on the real one license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_softbind.nx nx_gate_verdict.nx nx_softtissue_mr_gate.nx

imports: nx_syscalls.nxnx_softbind.nxnx_gate_verdict.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 gv_head gv_puts sys_write gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap sb_alloc sd_alloc sys_mmap ↻ sb_seat_mob sd_seat sb_offy mr_drive mr_step sb_tick_pt sd_step sd_isqrt sd_deadsnap sd_abs sb_offy ↻ sb_offy ↻ mr_ref_core mr_isqrt mr_mut_axis_core mr_isqrt ↻ mr_mut_abs_core mr_ref_core ↻ mr_mut_clock_core mr_ref_core ↻ mr_off sb_offy ↻ gv_check gv_puts ↻ mr_det_trans sb_alloc ↻

structs

none

consts

41const MR_STRIDE: i64 = 6
42const MR_Q8: i64 = 256
43const MR_G: i64 = 1024
44const MR_CAPC: i64 = 1000
45const MR_CAPK: i64 = 3600
48const MR_ENG_REAL: i64 = 0 // the SHIPPING solver (sb_tick_pt -> sd_step)
49const MR_ENG_REF: i64 = 1 // faithful in-gate transcription (mutant base)
50const MR_ENG_AXIS: i64 = 2 // crafted-bad: y damping reads the X velocity
51const MR_ENG_ABS: i64 = 3 // crafted-bad: acceleration gains an absolute-position term
52const MR_ENG_CLOCK: i64 = 4 // crafted-bad: a free-running drive keyed to the ABSOLUTE tick
55const MR_K: i64 = 60
56const MR_C: i64 = 100
57const MR_MAXD: i64 = 2
58const MR_MAXD_FREE: i64 = 64 // clamp effectively disabled, for the frame-dependence measurement
60const MR_TICKS: i64 = 200
61const MR_IDLE: i64 = 137 // deliberately not a multiple of anything in the drive
62const MR_DELTA: i64 = 1000000 // frame shift for T1: ~15.6 km in model units
63const MR_DRIVE_A: i64 = 13
64const MR_DRIVE_M: i64 = 29
65const MR_DRIVE_H: i64 = 14
66const MR_CLK_A: i64 = 214 // mirrors nx_wasm_craft's ph*214 free-running cadence
67const MR_CLK_M: i64 = 64
68const MR_CLK_H: i64 = 32
69const MR_ABS_SHIFT: i64 = 8192 // absolute-position leak divisor for the ABS mutant
70const MR_SETTLE: i64 = 600 // ticks to reach steady state under constant-velocity drive
71const MR_WIN: i64 = 96 // measurement window for the steady-state lag
72const MR_V1Q8: i64 = 256 // anchor speed 1 model unit/tick, expressed in Q8

functions

75func mr_drive(t: i64) -> i64 { return ((t*MR_DRIVE_A) % MR_DRIVE_M) - MR_DRIVE_H }
77func mr_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
78func mr_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x+1)/2; while y < x { x = y; y = (x + v/x)/2 } return x }
81func mr_ref_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64) -> i64
106func mr_mut_axis_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64) -> i64
called by 1: mr_step calls 1: mr_isqrt
132func mr_mut_abs_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64) -> i64
called by 1: mr_step calls 1: mr_ref_core
145func mr_mut_clock_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64, tk: i64) -> i64
called by 1: mr_step calls 1: mr_ref_core
153func mr_step(eng: i64, st: *i64, kind: i64, rx: i64, ry: i64, rz: i64, K: i64, C: i64, maxd: i64, tk: i64) -> i64
163func mr_off(st: *i64, kind: i64, axis: i64, anchor: i64) -> i64
170func mr_det_trans(eng: i64, maxd: i64) -> i64
192func mr_det_axis(eng: i64, maxd: i64) -> i64
220func mr_det_time(eng: i64, maxd: i64) -> i64
244func main() -> i64