{"abstract":"The reduction disagrees with its explicit aggregation oracle.","category":"Numerical aggregation","checks":6,"contract":"Starting at zero, apply each signed delta and clamp the running balance into [0,cap] after every event. cap is positive.","contract_signature":"xs, cap","evaluation_group":"s3-na-capped-prefix-balance","failed_approach":"Reflecting an overflow back into range models a different boundary.","family":"s3-numerical-aggregation-capped-prefix-balance-reset-on-limit","id":"FA-12936","implementations":{"attempt":{"sha256":"e99cf7161d7c6d4b25cac10daf21e2376ffe3255b1105d099a680e2e0979911d","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(xs, cap):\n    b=0\n    for x in xs: b=abs(b+x) if b+x<0 else (2*cap-b-x if b+x>cap else b+x)\n    return b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([8, -3], 5)), 2)\ncheck('regression 2', solve(*([-4, 3], 5)), 3)\ncheck('regression 3', solve(*([], 5)), 0)\ncheck('regression 4', solve(*([2, 2], 5)), 4)\ncheck('regression 5', solve(*([8, -9, 2], 5)), 2)\ncheck(\"variable path\",solve([N+4,-2],N+1),N-1)\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":"f22f072c6396599afedd9156d424237af6fbeae0896443b933dc435521c7dfde","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(xs, cap):\n    b=0\n    for x in xs:\n        b=b+x\n        b=0 if b<0 or b>cap else b\n    return b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([8, -3], 5)), 2)\ncheck('regression 2', solve(*([-4, 3], 5)), 3)\ncheck('regression 3', solve(*([], 5)), 0)\ncheck('regression 4', solve(*([2, 2], 5)), 4)\ncheck('regression 5', solve(*([8, -9, 2], 5)), 2)\ncheck(\"variable path\",solve([N+4,-2],N+1),N-1)\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-capped-prefix-balance-reset-on-limit","generated_at":"2026-09-29T14:39:01.647309+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":"An overflowing balance resets instead of saturating.","sha256":"cd72d6b03a7edfa830c1645b52a6948d531a272bfa877e813d46951b0b2fed35","title":"Capped prefix balance: An overflowing balance resets instead of saturating. · 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":45.243,"exit_code":1,"observations":[{"actual":1,"check":"regression 1","expected":2,"passed":false},{"actual":3,"check":"regression 2","expected":3,"passed":true},{"actual":0,"check":"regression 3","expected":0,"passed":true},{"actual":4,"check":"regression 4","expected":4,"passed":true},{"actual":1,"check":"regression 5","expected":2,"passed":false},{"actual":3,"check":"variable path","expected":0,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"regression 2\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"regression 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"regression 4\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"regression 5\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"variable path\", \"actual\": 3, \"expected\": 0, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.707,"exit_code":1,"observations":[{"actual":0,"check":"regression 1","expected":2,"passed":false},{"actual":3,"check":"regression 2","expected":3,"passed":true},{"actual":0,"check":"regression 3","expected":0,"passed":true},{"actual":4,"check":"regression 4","expected":4,"passed":true},{"actual":2,"check":"regression 5","expected":2,"passed":true},{"actual":0,"check":"variable path","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": 0, \"expected\": 2, \"passed\": false}, {\"check\": \"regression 2\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"regression 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"regression 4\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"regression 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"variable path\", \"actual\": 0, \"expected\": 0, \"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."}}