{"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.","evaluation_group":"s3-na-capped-prefix-balance","failed_approach":"Capping only the final balance lets later debits consume previously rejected credit.","family":"s3-numerical-aggregation-capped-prefix-balance-overflow-credit","id":"FA-12926","implementations":{"attempt":{"sha256":"73ae1c17f1c6ff5143b63e8680bf8204ccf95551bf69560fe4f9ccb4e6abfb1f","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=max(0,b+x)\n    return min(cap,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":"f34883703f25531b512b3a86e84643f2f114ba00901771e256c0d598339e2c9b","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=max(0,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"},"fixed":{"sha256":"67d2a02cda1a3ed2cde9738695bf60f9bb77734d47397183af3752d8ab110627","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    balance=0\n    for x in xs:\n        balance=max(0,min(cap,balance+x))\n    return balance\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-overflow-credit","generated_at":"2026-09-29T14:39:01.609880+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.","repair":"Preserve the capped prefix balance contract at the identified reduction decision.","root_cause":"Excess intermediate credit survives the upper saturation bound.","sha256":"29202e9ffe3a9d5729229c6e95787f8a817ec6b23b5e4a78202c3e4a012117a3","title":"Capped prefix balance: Excess intermediate credit survives the upper saturation bound. · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.855,"exit_code":1,"observations":[{"actual":5,"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":2,"check":"variable path","expected":0,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": 5, \"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\": 2, \"expected\": 0, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.289,"exit_code":1,"observations":[{"actual":5,"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":3,"check":"variable path","expected":0,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": 5, \"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\": 3, \"expected\": 0, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.613,"exit_code":0,"observations":[{"actual":2,"check":"regression 1","expected":2,"passed":true},{"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":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"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\": true}\n"}},"verified":true,"visibility":"public"}