code wiki / _hdl_build / nx_softtissue_mr_gate.nx
nx_softtissue_mr_gate.nx
buildroot/runtime/_hdl_build/nx_softtissue_mr_gate.nx
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
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
structs
| none |
consts
| 41 | const MR_STRIDE: i64 = 6 |
| 42 | const MR_Q8: i64 = 256 |
| 43 | const MR_G: i64 = 1024 |
| 44 | const MR_CAPC: i64 = 1000 |
| 45 | const MR_CAPK: i64 = 3600 |
| 48 | const MR_ENG_REAL: i64 = 0 // the SHIPPING solver (sb_tick_pt -> sd_step) |
| 49 | const MR_ENG_REF: i64 = 1 // faithful in-gate transcription (mutant base) |
| 50 | const MR_ENG_AXIS: i64 = 2 // crafted-bad: y damping reads the X velocity |
| 51 | const MR_ENG_ABS: i64 = 3 // crafted-bad: acceleration gains an absolute-position term |
| 52 | const MR_ENG_CLOCK: i64 = 4 // crafted-bad: a free-running drive keyed to the ABSOLUTE tick |
| 55 | const MR_K: i64 = 60 |
| 56 | const MR_C: i64 = 100 |
| 57 | const MR_MAXD: i64 = 2 |
| 58 | const MR_MAXD_FREE: i64 = 64 // clamp effectively disabled, for the frame-dependence measurement |
| 60 | const MR_TICKS: i64 = 200 |
| 61 | const MR_IDLE: i64 = 137 // deliberately not a multiple of anything in the drive |
| 62 | const MR_DELTA: i64 = 1000000 // frame shift for T1: ~15.6 km in model units |
| 63 | const MR_DRIVE_A: i64 = 13 |
| 64 | const MR_DRIVE_M: i64 = 29 |
| 65 | const MR_DRIVE_H: i64 = 14 |
| 66 | const MR_CLK_A: i64 = 214 // mirrors nx_wasm_craft's ph*214 free-running cadence |
| 67 | const MR_CLK_M: i64 = 64 |
| 68 | const MR_CLK_H: i64 = 32 |
| 69 | const MR_ABS_SHIFT: i64 = 8192 // absolute-position leak divisor for the ABS mutant |
| 70 | const MR_SETTLE: i64 = 600 // ticks to reach steady state under constant-velocity drive |
| 71 | const MR_WIN: i64 = 96 // measurement window for the steady-state lag |
| 72 | const MR_V1Q8: i64 = 256 // anchor speed 1 model unit/tick, expressed in Q8 |
functions
| 75 | func mr_drive(t: i64) -> i64 { return ((t*MR_DRIVE_A) % MR_DRIVE_M) - MR_DRIVE_H } |
| 77 | func mr_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: main |
| 78 | func 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 } |
| 81 | func mr_ref_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64) -> i64 |
| 106 | func mr_mut_axis_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64) -> i64 |
| 132 | func mr_mut_abs_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64) -> i64 |
| 145 | func mr_mut_clock_core(st: *i64, idx: i64, ax: i64, ay: i64, az: i64, K: i64, C: i64, maxd: i64, tk: i64) -> i64 |
| 153 | func mr_step(eng: i64, st: *i64, kind: i64, rx: i64, ry: i64, rz: i64, K: i64, C: i64, maxd: i64, tk: i64) -> i64 |
| 163 | func mr_off(st: *i64, kind: i64, axis: i64, anchor: i64) -> i64 |
| 170 | func mr_det_trans(eng: i64, maxd: i64) -> i64 |
| 192 | func mr_det_axis(eng: i64, maxd: i64) -> i64 |
| 220 | func mr_det_time(eng: i64, maxd: i64) -> i64 |
| 244 | func main() -> i64 |