{"abstract":"Distance to an endpoint replaces perpendicular distance to the infinite line.","category":"Planar geometry","checks":4,"contract":"Integer coordinates and lengths, with exact arithmetic except for indicated division results. Lengths are nonnegative. Rectangles are (xmin,ymin,xmax,ymax) with ordered bounds; coordinate vectors have matching dimensions. p,a,b are integer planar points with a!=b; return reduced Fraction string for distance squared to the infinite line through a and b. Exact operational definition: str(Fraction(((b[0]-a[0])*(a[1]-p[1])-(a[0]-p[0])*(b[1]-a[1]))**2,(b[0]-a[0])**2+(b[1]-a[1])**2))","evaluation_group":"model-d921efb6b904c99f","failed_approach":"The cross product is not squared for squared distance.","family":"xn-point-line-squared-distance","id":"FA-5871","implementations":{"attempt":{"sha256":"8a92bfe63283368c1bfdacc8e01d55c328ebeb776b6e501deedd16c7f4c04e88","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(p, a, b):\n    return str(Fraction(abs((b[0]-a[0])*(a[1]-p[1])-(a[0]-p[0])*(b[1]-a[1])),(b[0]-a[0])**2+(b[1]-a[1])**2))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ((1, 2), (0, 0), (2, 0))', solve(*((1, 2), (0, 0), (2, 0))), '4')\ncheck('fixture 2: ((1, 1), (0, 0), (2, 2))', solve(*((1, 1), (0, 0), (2, 2))), '0')\ncheck('fixture 3: ((0, 2), (0, 0), (1, 1))', solve(*((0, 2), (0, 0), (1, 1))), '2')\ncheck('fixture 4: ((3, 0), (0, 0), (1, 0))', solve(*((3, 0), (0, 0), (1, 0))), '0')\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":"7d468b937273a1a7ec2d10f06cb144fe59c1365c7c4db4906af2cc0d6932e8d5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(p, a, b):\n    return str((p[0]-a[0])**2+(p[1]-a[1])**2)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ((1, 2), (0, 0), (2, 0))', solve(*((1, 2), (0, 0), (2, 0))), '4')\ncheck('fixture 2: ((1, 1), (0, 0), (2, 2))', solve(*((1, 1), (0, 0), (2, 2))), '0')\ncheck('fixture 3: ((0, 2), (0, 0), (1, 1))', solve(*((0, 2), (0, 0), (1, 1))), '2')\ncheck('fixture 4: ((3, 0), (0, 0), (1, 0))', solve(*((3, 0), (0, 0), (1, 0))), '0')\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"},"fixed":{"sha256":"a3850bd315781965ac49b5b9e2d59c70c9b22fe34a02ae3ec514d3b95a1264b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(p, a, b):\n    return str(Fraction(((b[0]-a[0])*(a[1]-p[1])-(a[0]-p[0])*(b[1]-a[1]))**2,(b[0]-a[0])**2+(b[1]-a[1])**2))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: ((1, 2), (0, 0), (2, 0))', solve(*((1, 2), (0, 0), (2, 0))), '4')\ncheck('fixture 2: ((1, 1), (0, 0), (2, 2))', solve(*((1, 1), (0, 0), (2, 2))), '0')\ncheck('fixture 3: ((0, 2), (0, 0), (1, 1))', solve(*((0, 2), (0, 0), (1, 1))), '2')\ncheck('fixture 4: ((3, 0), (0, 0), (1, 0))', solve(*((3, 0), (0, 0), (1, 0))), '0')\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":" 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":"xn-point-line-squared-distance","generated_at":"2026-09-29T14:37:54.537103+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Planar geometry results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return str(Fraction(((b[0]-a[0])*(a[1]-p[1])-(a[0]-p[0])*(b[1]-a[1]))**2,(b[0]-a[0])**2+(b[1]-a[1])**2))","root_cause":"Distance to an endpoint replaces perpendicular distance to the infinite line.","sha256":"c5e553d2f52addf4520bb5c0cdf9da891fc2683e5a26f772af5eb9d7f5c4e89f","title":"Point line squared distance · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":48.459,"exit_code":1,"observations":[{"actual":"1","check":"fixture 1: ((1, 2), (0, 0), (2, 0))","expected":"4","passed":false},{"actual":"0","check":"fixture 2: ((1, 1), (0, 0), (2, 2))","expected":"0","passed":true},{"actual":"1","check":"fixture 3: ((0, 2), (0, 0), (1, 1))","expected":"2","passed":false},{"actual":"0","check":"fixture 4: ((3, 0), (0, 0), (1, 0))","expected":"0","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ((1, 2), (0, 0), (2, 0))\", \"actual\": \"1\", \"expected\": \"4\", \"passed\": false}, {\"check\": \"fixture 2: ((1, 1), (0, 0), (2, 2))\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"fixture 3: ((0, 2), (0, 0), (1, 1))\", \"actual\": \"1\", \"expected\": \"2\", \"passed\": false}, {\"check\": \"fixture 4: ((3, 0), (0, 0), (1, 0))\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":51.002,"exit_code":1,"observations":[{"actual":"5","check":"fixture 1: ((1, 2), (0, 0), (2, 0))","expected":"4","passed":false},{"actual":"2","check":"fixture 2: ((1, 1), (0, 0), (2, 2))","expected":"0","passed":false},{"actual":"4","check":"fixture 3: ((0, 2), (0, 0), (1, 1))","expected":"2","passed":false},{"actual":"9","check":"fixture 4: ((3, 0), (0, 0), (1, 0))","expected":"0","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ((1, 2), (0, 0), (2, 0))\", \"actual\": \"5\", \"expected\": \"4\", \"passed\": false}, {\"check\": \"fixture 2: ((1, 1), (0, 0), (2, 2))\", \"actual\": \"2\", \"expected\": \"0\", \"passed\": false}, {\"check\": \"fixture 3: ((0, 2), (0, 0), (1, 1))\", \"actual\": \"4\", \"expected\": \"2\", \"passed\": false}, {\"check\": \"fixture 4: ((3, 0), (0, 0), (1, 0))\", \"actual\": \"9\", \"expected\": \"0\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":53.776,"exit_code":0,"observations":[{"actual":"4","check":"fixture 1: ((1, 2), (0, 0), (2, 0))","expected":"4","passed":true},{"actual":"0","check":"fixture 2: ((1, 1), (0, 0), (2, 2))","expected":"0","passed":true},{"actual":"2","check":"fixture 3: ((0, 2), (0, 0), (1, 1))","expected":"2","passed":true},{"actual":"0","check":"fixture 4: ((3, 0), (0, 0), (1, 0))","expected":"0","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: ((1, 2), (0, 0), (2, 0))\", \"actual\": \"4\", \"expected\": \"4\", \"passed\": true}, {\"check\": \"fixture 2: ((1, 1), (0, 0), (2, 2))\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"fixture 3: ((0, 2), (0, 0), (1, 1))\", \"actual\": \"2\", \"expected\": \"2\", \"passed\": true}, {\"check\": \"fixture 4: ((3, 0), (0, 0), (1, 0))\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}