{"abstract":"The reduction disagrees with its explicit aggregation oracle.","category":"Numerical aggregation","checks":9,"contract":"For integer residuals and nonnegative integer threshold delta, sum the convex Huber loss: e**2/2 inside threshold and delta*(abs(e)-delta/2) outside. Return exact Fraction string; this is a bounded loss reduction, not an optimizer.","contract_signature":"errors, delta","evaluation_group":"s3-na-huber-residual-total","failed_approach":"Squaring the threshold instead moves the quadratic/linear transition.","family":"s3-numerical-aggregation-huber-residual-total-huber-threshold-square","id":"FA-13831","implementations":{"attempt":{"sha256":"389509241390e8441d1f26f85f9872febbcbb7cfc056c1f4a62c06a4eb96a2fa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nfrom collections import Counter, defaultdict\nimport math\nimport itertools\nN = 1\nobservations = []\ndef solve(errors, delta):\n    if not errors: return \"0\"\n    d=Fraction(delta)\n    total=Fraction(0)\n    for e in errors:\n        a=abs(e)\n        total+=Fraction(e*e,2) if a<=d*d else d*(a-d/2)\n    return str(total)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([2, 2, 4], 2)), '10')\ncheck('regression 2', solve(*([0, 1, -1, 4, -4], 2)), '13')\ncheck('regression 3', solve(*([], 2)), '0')\ncheck('regression 4', solve(*([2, -2], 2)), '4')\ncheck('regression 5', solve(*([1, -1, 3], 1)), '7/2')\ncheck('regression 6', solve(*([-5, 0, 2], 3)), '25/2')\ncheck('regression 7', solve(*([7, -2, 1], 0)), '0')\ncheck('regression 8', solve(*([1, 2, 3], 4)), '7')\ncheck(\"variable Huber tail\",solve([N+2,-N-2],2),str(4*N+4))\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":"6c35c9929e91a0e5a5475b522f7cce82102399d0cfef33b3f8dc747b924ff4f3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nfrom collections import Counter, defaultdict\nimport math\nimport itertools\nN = 1\nobservations = []\ndef solve(errors, delta):\n    if not errors: return \"0\"\n    d=Fraction(delta)\n    total=Fraction(0)\n    for e in errors:\n        a=abs(e)\n        total+=Fraction(e*e,2) if a*a<=d else d*(a-d/2)\n    return str(total)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([2, 2, 4], 2)), '10')\ncheck('regression 2', solve(*([0, 1, -1, 4, -4], 2)), '13')\ncheck('regression 3', solve(*([], 2)), '0')\ncheck('regression 4', solve(*([2, -2], 2)), '4')\ncheck('regression 5', solve(*([1, -1, 3], 1)), '7/2')\ncheck('regression 6', solve(*([-5, 0, 2], 3)), '25/2')\ncheck('regression 7', solve(*([7, -2, 1], 0)), '0')\ncheck('regression 8', solve(*([1, 2, 3], 4)), '7')\ncheck(\"variable Huber tail\",solve([N+2,-N-2],2),str(4*N+4))\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 offline integer/rational inputs only; no performance, statistical inference, or production-library conformance claim. 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":"s3-numerical-aggregation-huber-residual-total-huber-threshold-square","generated_at":"2026-09-29T14:39:11.110664+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact bounded examples isolate a reduction defect without floating-point or external-service effects.","root_cause":"The quadratic branch threshold is compared to squared residual magnitude.","sha256":"a5eba82c5595e366045dc8a0648b4a5520eb38c1c637ee07da63f5475245e5b0","title":"Huber residual total: The quadratic branch threshold is compared to squared residual magnitude. · 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":43.158,"exit_code":1,"observations":[{"actual":"12","check":"regression 1","expected":"10","passed":false},{"actual":"17","check":"regression 2","expected":"13","passed":false},{"actual":"0","check":"regression 3","expected":"0","passed":true},{"actual":"4","check":"regression 4","expected":"4","passed":true},{"actual":"7/2","check":"regression 5","expected":"7/2","passed":true},{"actual":"29/2","check":"regression 6","expected":"25/2","passed":false},{"actual":"0","check":"regression 7","expected":"0","passed":true},{"actual":"7","check":"regression 8","expected":"7","passed":true},{"actual":"9","check":"variable Huber tail","expected":"8","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": \"12\", \"expected\": \"10\", \"passed\": false}, {\"check\": \"regression 2\", \"actual\": \"17\", \"expected\": \"13\", \"passed\": false}, {\"check\": \"regression 3\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 4\", \"actual\": \"4\", \"expected\": \"4\", \"passed\": true}, {\"check\": \"regression 5\", \"actual\": \"7/2\", \"expected\": \"7/2\", \"passed\": true}, {\"check\": \"regression 6\", \"actual\": \"29/2\", \"expected\": \"25/2\", \"passed\": false}, {\"check\": \"regression 7\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 8\", \"actual\": \"7\", \"expected\": \"7\", \"passed\": true}, {\"check\": \"variable Huber tail\", \"actual\": \"9\", \"expected\": \"8\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.595,"exit_code":1,"observations":[{"actual":"10","check":"regression 1","expected":"10","passed":true},{"actual":"13","check":"regression 2","expected":"13","passed":true},{"actual":"0","check":"regression 3","expected":"0","passed":true},{"actual":"4","check":"regression 4","expected":"4","passed":true},{"actual":"7/2","check":"regression 5","expected":"7/2","passed":true},{"actual":"12","check":"regression 6","expected":"25/2","passed":false},{"actual":"0","check":"regression 7","expected":"0","passed":true},{"actual":"13/2","check":"regression 8","expected":"7","passed":false},{"actual":"8","check":"variable Huber tail","expected":"8","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": \"10\", \"expected\": \"10\", \"passed\": true}, {\"check\": \"regression 2\", \"actual\": \"13\", \"expected\": \"13\", \"passed\": true}, {\"check\": \"regression 3\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 4\", \"actual\": \"4\", \"expected\": \"4\", \"passed\": true}, {\"check\": \"regression 5\", \"actual\": \"7/2\", \"expected\": \"7/2\", \"passed\": true}, {\"check\": \"regression 6\", \"actual\": \"12\", \"expected\": \"25/2\", \"passed\": false}, {\"check\": \"regression 7\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 8\", \"actual\": \"13/2\", \"expected\": \"7\", \"passed\": false}, {\"check\": \"variable Huber tail\", \"actual\": \"8\", \"expected\": \"8\", \"passed\": true}], \"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."}}