{"abstract":"A scalar-last quaternion is read by a scalar-first adapter.","category":"Robotics frame conventions","checks":6,"contract":"Convert a four-element xyzw quaternion representation to wxyz without changing signs, magnitude, or axis order. This adapter does not normalize or choose equivalent quaternion signs.","contract_signature":"q","evaluation_group":"model-aaab1fe416cd1e04","failed_approach":"Reversing all components also reverses the vector-axis order.","family":"z-robotics_frames-quaternion-wire-order","id":"FA-12126","implementations":{"attempt":{"sha256":"15b6a114b44d278f69a0e0dda7ff2d20288f936de92bd2efb57d97c6325e7be0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\ndef rot(v, q):\n    x,y = v\n    return [(x,y),(-y,x),(-x,-y),(y,-x)][q%4]\n\nN = 1\nobservations = []\ndef solve(q):\n    return list(reversed(q))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('identity', solve([0,0,0,1]), [1,0,0,0])\ncheck('x half turn', solve([1,0,0,0]), [0,1,0,0])\ncheck('y half turn', solve([0,1,0,0]), [0,0,1,0])\ncheck('z half turn', solve([0,0,1,0]), [0,0,0,1])\ncheck('scaled wire value', solve([N,2*N,3*N,4*N]), [4*N,N,2*N,3*N])\ncheck('negative representation', solve([-N,0,N,-N]), [-N,-N,0,N])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"69971773b267f01810a43da8ed98b885b8f00a0e7b9f58d42c97da0527b63150","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\ndef rot(v, q):\n    x,y = v\n    return [(x,y),(-y,x),(-x,-y),(y,-x)][q%4]\n\nN = 1\nobservations = []\ndef solve(q):\n    return q\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('identity', solve([0,0,0,1]), [1,0,0,0])\ncheck('x half turn', solve([1,0,0,0]), [0,1,0,0])\ncheck('y half turn', solve([0,1,0,0]), [0,0,1,0])\ncheck('z half turn', solve([0,0,1,0]), [0,0,0,1])\ncheck('scaled wire value', solve([N,2*N,3*N,4*N]), [4*N,N,2*N,3*N])\ncheck('negative representation', solve([-N,0,N,-N]), [-N,-N,0,N])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Small exact offline frame model; not a robot middleware implementation or continuous pose estimator. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"z-robotics_frames-quaternion-wire-order","generated_at":"2026-09-29T14:38:54.116464+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Robot adapters must preserve the declared frame, reference point, and representation conventions across interfaces.","root_cause":"A wire xyzw tuple is forwarded as if it were wxyz.","sha256":"d019dfeba06c61921f7d36057a15cbd907cc24f7107506c6b861c8de1bcae9b8","title":"A scalar-last quaternion is read by a scalar-first adapter · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.411,"exit_code":1,"observations":[{"actual":[1,0,0,0],"check":"identity","expected":[1,0,0,0],"passed":true},{"actual":[0,0,0,1],"check":"x half turn","expected":[0,1,0,0],"passed":false},{"actual":[0,0,1,0],"check":"y half turn","expected":[0,0,1,0],"passed":true},{"actual":[0,1,0,0],"check":"z half turn","expected":[0,0,0,1],"passed":false},{"actual":[4,3,2,1],"check":"scaled wire value","expected":[4,1,2,3],"passed":false},{"actual":[-1,1,0,-1],"check":"negative representation","expected":[-1,-1,0,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"identity\", \"actual\": [1, 0, 0, 0], \"expected\": [1, 0, 0, 0], \"passed\": true}, {\"check\": \"x half turn\", \"actual\": [0, 0, 0, 1], \"expected\": [0, 1, 0, 0], \"passed\": false}, {\"check\": \"y half turn\", \"actual\": [0, 0, 1, 0], \"expected\": [0, 0, 1, 0], \"passed\": true}, {\"check\": \"z half turn\", \"actual\": [0, 1, 0, 0], \"expected\": [0, 0, 0, 1], \"passed\": false}, {\"check\": \"scaled wire value\", \"actual\": [4, 3, 2, 1], \"expected\": [4, 1, 2, 3], \"passed\": false}, {\"check\": \"negative representation\", \"actual\": [-1, 1, 0, -1], \"expected\": [-1, -1, 0, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.769,"exit_code":1,"observations":[{"actual":[0,0,0,1],"check":"identity","expected":[1,0,0,0],"passed":false},{"actual":[1,0,0,0],"check":"x half turn","expected":[0,1,0,0],"passed":false},{"actual":[0,1,0,0],"check":"y half turn","expected":[0,0,1,0],"passed":false},{"actual":[0,0,1,0],"check":"z half turn","expected":[0,0,0,1],"passed":false},{"actual":[1,2,3,4],"check":"scaled wire value","expected":[4,1,2,3],"passed":false},{"actual":[-1,0,1,-1],"check":"negative representation","expected":[-1,-1,0,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"identity\", \"actual\": [0, 0, 0, 1], \"expected\": [1, 0, 0, 0], \"passed\": false}, {\"check\": \"x half turn\", \"actual\": [1, 0, 0, 0], \"expected\": [0, 1, 0, 0], \"passed\": false}, {\"check\": \"y half turn\", \"actual\": [0, 1, 0, 0], \"expected\": [0, 0, 1, 0], \"passed\": false}, {\"check\": \"z half turn\", \"actual\": [0, 0, 1, 0], \"expected\": [0, 0, 0, 1], \"passed\": false}, {\"check\": \"scaled wire value\", \"actual\": [1, 2, 3, 4], \"expected\": [4, 1, 2, 3], \"passed\": false}, {\"check\": \"negative representation\", \"actual\": [-1, 0, 1, -1], \"expected\": [-1, -1, 0, 1], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}