{"abstract":"Targets exactly at full extension computed through hypot report \"unreachable\".","category":"Inverse kinematics solvers","checks":7,"contract":"Input [d1,a2,a3,px,py,pz,reach,elbow]: base yaw t1, shoulder t2, elbow t3 with shoulder height d1. reach \"front\" uses t1=atan2(py,px) and r=hypot(px,py); \"back\" turns t1 by 180 degrees and uses -r. With s=pz-d1, cos t3=(r^2+s^2-a2^2-a3^2)/(2 a2 a3); beyond +/-(1+1e-12) is \"unreachable\", else clamp. elbow \"up\" takes sin t3<=0. t2=atan2(s,r)-atan2(a3 sin t3, a2+a3 cos t3). Angles in degrees wrapped to [-180,180), rounded 4.","contract_signature":"x","evaluation_group":"w2-inverse_kinematics_solvers-anthropomorphic-rrr","failed_approach":"Joining the bounds with \"and\" disables the reach test entirely.","family":"w2-inverse_kinematics_solvers-anthropomorphic-rrr-reach-tolerance","id":"FA-88291","implementations":{"attempt":{"sha256":"a936437d9b56c8ea14ab65ea9d23c0ceaa4919720d2589f2d6ebb8da5971abb8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    d1,a2,a3,px,py,pz,reach,elbow=x\n    t1=math.atan2(py,px)\n    r=math.hypot(px,py)\n    if reach=='back':\n        t1=t1+math.pi\n        r=-r\n    s=pz-d1\n    c3=(r*r+s*s-a2*a2-a3*a3)/(2*a2*a3)\n    if c3>1.0+1e-12 and c3<-1.0-1e-12: return 'unreachable'\n    c3=max(-1.0,min(1.0,c3))\n    s3=math.sqrt(1.0-c3*c3)\n    if elbow=='up': s3=-s3\n    t3=math.atan2(s3,c3)\n    t2=math.atan2(s,r)-math.atan2(a3*s3,a2+a3*c3)\n    res=[]\n    for t in (t1,t2,t3):\n        d=math.degrees(t)\n        d=d-360.0*math.floor((d+180.0)/360.0)\n        res.append(round(d,4))\n    return res\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['front nominal', [[1, 2, 2, 2, 1, 2, 'front', 'up']], [26.5651, 76.3336, -104.4775]], ['back nominal', [[1, 2, 2, 2, 1, 2, 'back', 'up']], [-153.4349, -151.8561, -104.4775]], ['front elbow down', [[1, 2, 2, 1, 2, 3, 'front', 'down']], [63.4349, 0.4007, 82.8192]], ['back on x axis', [[1, 2, 2, 1, 0, 2, 'back', 'down']], [-180.0, 65.7048, 138.5904]], ['stretched diagonal', [[0, 1, 1, 1.4142135623730951, 1.4142135623730951, 0, 'front', 'up']], [45.0, 0.0, -0.0]], ['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]]], [['back on x axis', [[1, 2, 2, 1, 0, 2, 'back', 'down']], [-180.0, 65.7048, 138.5904]], ['stretched diagonal', [[0, 1, 1, 1.4142135623730951, 1.4142135623730951, 0, 'front', 'up']], [45.0, 0.0, -0.0]], ['stretched diagonal back', [[0, 1, 1, 1.4142135623730951, 1.4142135623730951, 0, 'back', 'down']], [-135.0, -180.0, 0.0]], ['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['below base', [[2, 2, 1.5, 1.5, -1, 0.5, 'front', 'up']], [-33.6901, -0.3729, -97.1808]], ['high tall base', [[3, 1.5, 1.5, 1, 1, 5, 'front', 'down']], [45.0, 19.4712, 70.5288]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]]], [['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['below base', [[2, 2, 1.5, 1.5, -1, 0.5, 'front', 'up']], [-33.6901, -0.3729, -97.1808]], ['high tall base', [[3, 1.5, 1.5, 1, 1, 5, 'front', 'down']], [45.0, 19.4712, 70.5288]], ['back third quadrant', [[1, 2, 2, -1, -2, 0, 'back', 'up']], [63.4349, -103.6664, -104.4775]], ['front negative y', [[0.5, 2, 1, 1, -1.5, 1, 'front', 'down']], [-56.3099, -14.2024, 112.0243]], ['base column below', [[4, 2, 2, 0.5, 0.5, 1, 'front', 'up']], [45.0, -37.1408, -79.1931]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]]], [['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['front negative y', [[0.5, 2, 1, 1, -1.5, 1, 'front', 'down']], [-56.3099, -14.2024, 112.0243]], ['base column below', [[4, 2, 2, 0.5, 0.5, 1, 'front', 'up']], [45.0, -37.1408, -79.1931]], ['back reach below shoulder', [[1.4, 2, 2, -0.7, -1.7, -0.1, 'back', 'down']], [67.6199, 165.5945, 107.2325]], ['back reach low front quadrant', [[1.4, 2, 2, 1.5, -0.6, 1.0, 'back', 'down']], [158.1986, 128.4939, 130.8249]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]], ['reach past base height only', [[3, 1, 1, 1, 0, 3.5, 'front', 'up']], [0.0, 82.5772, -112.0243]]], [['front nominal', [[1, 2, 2, 2, 1, 2, 'front', 'up']], [26.5651, 76.3336, -104.4775]], ['back nominal', [[1, 2, 2, 2, 1, 2, 'back', 'up']], [-153.4349, -151.8561, -104.4775]], ['front elbow down', [[1, 2, 2, 1, 2, 3, 'front', 'down']], [63.4349, 0.4007, 82.8192]], ['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['back reach low front quadrant', [[1.4, 2, 2, 1.5, -0.6, 1.0, 'back', 'down']], [158.1986, 128.4939, 130.8249]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]], ['reach past base height only', [[3, 1, 1, 1, 0, 3.5, 'front', 'up']], [0.0, 82.5772, -112.0243]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\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":"ccc4be5afe5799ba9fb91794dc0ffa6fb2d655892fd252af6ff1e5a0cde1c325","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    d1,a2,a3,px,py,pz,reach,elbow=x\n    t1=math.atan2(py,px)\n    r=math.hypot(px,py)\n    if reach=='back':\n        t1=t1+math.pi\n        r=-r\n    s=pz-d1\n    c3=(r*r+s*s-a2*a2-a3*a3)/(2*a2*a3)\n    if c3>1.0 or c3<-1.0: return 'unreachable'\n    c3=max(-1.0,min(1.0,c3))\n    s3=math.sqrt(1.0-c3*c3)\n    if elbow=='up': s3=-s3\n    t3=math.atan2(s3,c3)\n    t2=math.atan2(s,r)-math.atan2(a3*s3,a2+a3*c3)\n    res=[]\n    for t in (t1,t2,t3):\n        d=math.degrees(t)\n        d=d-360.0*math.floor((d+180.0)/360.0)\n        res.append(round(d,4))\n    return res\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['front nominal', [[1, 2, 2, 2, 1, 2, 'front', 'up']], [26.5651, 76.3336, -104.4775]], ['back nominal', [[1, 2, 2, 2, 1, 2, 'back', 'up']], [-153.4349, -151.8561, -104.4775]], ['front elbow down', [[1, 2, 2, 1, 2, 3, 'front', 'down']], [63.4349, 0.4007, 82.8192]], ['back on x axis', [[1, 2, 2, 1, 0, 2, 'back', 'down']], [-180.0, 65.7048, 138.5904]], ['stretched diagonal', [[0, 1, 1, 1.4142135623730951, 1.4142135623730951, 0, 'front', 'up']], [45.0, 0.0, -0.0]], ['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]]], [['back on x axis', [[1, 2, 2, 1, 0, 2, 'back', 'down']], [-180.0, 65.7048, 138.5904]], ['stretched diagonal', [[0, 1, 1, 1.4142135623730951, 1.4142135623730951, 0, 'front', 'up']], [45.0, 0.0, -0.0]], ['stretched diagonal back', [[0, 1, 1, 1.4142135623730951, 1.4142135623730951, 0, 'back', 'down']], [-135.0, -180.0, 0.0]], ['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['below base', [[2, 2, 1.5, 1.5, -1, 0.5, 'front', 'up']], [-33.6901, -0.3729, -97.1808]], ['high tall base', [[3, 1.5, 1.5, 1, 1, 5, 'front', 'down']], [45.0, 19.4712, 70.5288]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]]], [['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['below base', [[2, 2, 1.5, 1.5, -1, 0.5, 'front', 'up']], [-33.6901, -0.3729, -97.1808]], ['high tall base', [[3, 1.5, 1.5, 1, 1, 5, 'front', 'down']], [45.0, 19.4712, 70.5288]], ['back third quadrant', [[1, 2, 2, -1, -2, 0, 'back', 'up']], [63.4349, -103.6664, -104.4775]], ['front negative y', [[0.5, 2, 1, 1, -1.5, 1, 'front', 'down']], [-56.3099, -14.2024, 112.0243]], ['base column below', [[4, 2, 2, 0.5, 0.5, 1, 'front', 'up']], [45.0, -37.1408, -79.1931]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]]], [['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['front negative y', [[0.5, 2, 1, 1, -1.5, 1, 'front', 'down']], [-56.3099, -14.2024, 112.0243]], ['base column below', [[4, 2, 2, 0.5, 0.5, 1, 'front', 'up']], [45.0, -37.1408, -79.1931]], ['back reach below shoulder', [[1.4, 2, 2, -0.7, -1.7, -0.1, 'back', 'down']], [67.6199, 165.5945, 107.2325]], ['back reach low front quadrant', [[1.4, 2, 2, 1.5, -0.6, 1.0, 'back', 'down']], [158.1986, 128.4939, 130.8249]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]], ['reach past base height only', [[3, 1, 1, 1, 0, 3.5, 'front', 'up']], [0.0, 82.5772, -112.0243]]], [['front nominal', [[1, 2, 2, 2, 1, 2, 'front', 'up']], [26.5651, 76.3336, -104.4775]], ['back nominal', [[1, 2, 2, 2, 1, 2, 'back', 'up']], [-153.4349, -151.8561, -104.4775]], ['front elbow down', [[1, 2, 2, 1, 2, 3, 'front', 'down']], [63.4349, 0.4007, 82.8192]], ['out of reach', [[1, 1, 1, 2, 2, 1, 'front', 'up']], 'unreachable'], ['back reach low front quadrant', [[1.4, 2, 2, 1.5, -0.6, 1.0, 'back', 'down']], [158.1986, 128.4939, 130.8249]], ['stretched with rounding residue', [[0, 1, 1, 1.977371993328519, 0, 0.3, 'front', 'up']], [0.0, 8.6269, -0.0]], ['reach past base height only', [[3, 1, 1, 1, 0, 3.5, 'front', 'up']], [0.0, 82.5772, -112.0243]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\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":"Deterministic planar or low-dimensional teaching model with a stipulated convention; not a general robotics library. 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":"w2-inverse_kinematics_solvers-anthropomorphic-rrr-reach-tolerance","generated_at":"2026-09-29T14:51:06.835548+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Inverse kinematics code turns task-space goals into joint commands; a wrong branch, sign, limit or update order sends a real arm to the wrong pose.","root_cause":"The cosine bound is tested against 1.0 with no tolerance for floating residue.","sha256":"a1aa9024d936995601f6c781a6ed6675169f0922650a339111aac3119d45f0e4","title":"Articulated arm rejects fully stretched targets due to rounding · 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":42.209,"exit_code":1,"observations":[{"actual":[26.5651,76.3336,-104.4775],"check":"front nominal","expected":[26.5651,76.3336,-104.4775],"passed":true},{"actual":[-153.4349,-151.8561,-104.4775],"check":"back nominal","expected":[-153.4349,-151.8561,-104.4775],"passed":true},{"actual":[63.4349,0.4007,82.8192],"check":"front elbow down","expected":[63.4349,0.4007,82.8192],"passed":true},{"actual":[-180.0,65.7048,138.5904],"check":"back on x axis","expected":[-180.0,65.7048,138.5904],"passed":true},{"actual":[45.0,0.0,-0.0],"check":"stretched diagonal","expected":[45.0,0.0,-0.0],"passed":true},{"actual":[45.0,0.0,-0.0],"check":"out of reach","expected":"unreachable","passed":false},{"actual":[0.0,8.6269,-0.0],"check":"stretched with rounding residue","expected":[0.0,8.6269,-0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"front nominal\", \"actual\": [26.5651, 76.3336, -104.4775], \"expected\": [26.5651, 76.3336, -104.4775], \"passed\": true}, {\"check\": \"back nominal\", \"actual\": [-153.4349, -151.8561, -104.4775], \"expected\": [-153.4349, -151.8561, -104.4775], \"passed\": true}, {\"check\": \"front elbow down\", \"actual\": [63.4349, 0.4007, 82.8192], \"expected\": [63.4349, 0.4007, 82.8192], \"passed\": true}, {\"check\": \"back on x axis\", \"actual\": [-180.0, 65.7048, 138.5904], \"expected\": [-180.0, 65.7048, 138.5904], \"passed\": true}, {\"check\": \"stretched diagonal\", \"actual\": [45.0, 0.0, -0.0], \"expected\": [45.0, 0.0, -0.0], \"passed\": true}, {\"check\": \"out of reach\", \"actual\": [45.0, 0.0, -0.0], \"expected\": \"unreachable\", \"passed\": false}, {\"check\": \"stretched with rounding residue\", \"actual\": [0.0, 8.6269, -0.0], \"expected\": [0.0, 8.6269, -0.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.372,"exit_code":1,"observations":[{"actual":[26.5651,76.3336,-104.4775],"check":"front nominal","expected":[26.5651,76.3336,-104.4775],"passed":true},{"actual":[-153.4349,-151.8561,-104.4775],"check":"back nominal","expected":[-153.4349,-151.8561,-104.4775],"passed":true},{"actual":[63.4349,0.4007,82.8192],"check":"front elbow down","expected":[63.4349,0.4007,82.8192],"passed":true},{"actual":[-180.0,65.7048,138.5904],"check":"back on x axis","expected":[-180.0,65.7048,138.5904],"passed":true},{"actual":[45.0,0.0,-0.0],"check":"stretched diagonal","expected":[45.0,0.0,-0.0],"passed":true},{"actual":"unreachable","check":"out of reach","expected":"unreachable","passed":true},{"actual":"unreachable","check":"stretched with rounding residue","expected":[0.0,8.6269,-0.0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"front nominal\", \"actual\": [26.5651, 76.3336, -104.4775], \"expected\": [26.5651, 76.3336, -104.4775], \"passed\": true}, {\"check\": \"back nominal\", \"actual\": [-153.4349, -151.8561, -104.4775], \"expected\": [-153.4349, -151.8561, -104.4775], \"passed\": true}, {\"check\": \"front elbow down\", \"actual\": [63.4349, 0.4007, 82.8192], \"expected\": [63.4349, 0.4007, 82.8192], \"passed\": true}, {\"check\": \"back on x axis\", \"actual\": [-180.0, 65.7048, 138.5904], \"expected\": [-180.0, 65.7048, 138.5904], \"passed\": true}, {\"check\": \"stretched diagonal\", \"actual\": [45.0, 0.0, -0.0], \"expected\": [45.0, 0.0, -0.0], \"passed\": true}, {\"check\": \"out of reach\", \"actual\": \"unreachable\", \"expected\": \"unreachable\", \"passed\": true}, {\"check\": \"stretched with rounding residue\", \"actual\": \"unreachable\", \"expected\": [0.0, 8.6269, -0.0], \"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."}}