{"abstract":"The reduction disagrees with its explicit aggregation oracle.","category":"Numerical aggregation","checks":9,"contract":"Bins [left,right,mass] have positive widths and nonnegative integer masses. Treat each bin as uniform density. Return exact mass in query [a,b] as a Fraction string; reversed/empty queries have zero mass.","contract_signature":"bins, a, b","evaluation_group":"s3-na-histogram-interval-mass","failed_approach":"Expanding the right edge confuses interval length with integer point counting.","family":"s3-numerical-aggregation-histogram-interval-mass-reverse-query","id":"FA-13051","implementations":{"attempt":{"sha256":"d3cf1e3d5d126dfac8a1d3a4544e28352ed7183502a65e7b427bbe187251e3e1","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(bins, a, b):\n    return str(sum((Fraction(m*max(0,min(r,b+1)-max(l,a)),r-l) for l,r,m in bins),Fraction(0))) if a<=b else \"0\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[0, 4, 8], [4, 10, 3]], 2, 7)), '11/2')\ncheck('regression 2', solve(*([[0, 4, 8]], 1, 2)), '2')\ncheck('regression 3', solve(*([[0, 4, 8]], -3, 8)), '8')\ncheck('regression 4', solve(*([[0, 4, 8]], 4, 9)), '0')\ncheck('regression 5', solve(*([[0, 4, 8]], 7, 9)), '0')\ncheck('regression 6', solve(*([], 0, 1)), '0')\ncheck('regression 7', solve(*([[0, 4, 8]], 3, 1)), '0')\ncheck('regression 8', solve(*([[2, 7, 10], [10, 12, 8]], 0, 11)), '14')\ncheck(\"variable density mass\",solve([[0,N+2,2*(N+2)]],1,N+1),str(2*N))\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":"770846cc79107a80622a37fe431847994439f401c61da88762253b236153a2bd","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(bins, a, b):\n    return str(sum((Fraction(m*max(0,min(r,max(a,b))-max(l,min(a,b))),r-l) for l,r,m in bins),Fraction(0)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[0, 4, 8], [4, 10, 3]], 2, 7)), '11/2')\ncheck('regression 2', solve(*([[0, 4, 8]], 1, 2)), '2')\ncheck('regression 3', solve(*([[0, 4, 8]], -3, 8)), '8')\ncheck('regression 4', solve(*([[0, 4, 8]], 4, 9)), '0')\ncheck('regression 5', solve(*([[0, 4, 8]], 7, 9)), '0')\ncheck('regression 6', solve(*([], 0, 1)), '0')\ncheck('regression 7', solve(*([[0, 4, 8]], 3, 1)), '0')\ncheck('regression 8', solve(*([[2, 7, 10], [10, 12, 8]], 0, 11)), '14')\ncheck(\"variable density mass\",solve([[0,N+2,2*(N+2)]],1,N+1),str(2*N))\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-histogram-interval-mass-reverse-query","generated_at":"2026-09-29T14:39:03.075051+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":"Reversed query bounds are silently sorted into a nonempty query.","sha256":"f593816cfc627eb34cf78908984c407b31663ff9b0a8c993f62b7f8ed542ccda","title":"Histogram interval mass: Reversed query bounds are silently sorted into a nonempty query. · 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":51.073,"exit_code":1,"observations":[{"actual":"6","check":"regression 1","expected":"11/2","passed":false},{"actual":"4","check":"regression 2","expected":"2","passed":false},{"actual":"8","check":"regression 3","expected":"8","passed":true},{"actual":"0","check":"regression 4","expected":"0","passed":true},{"actual":"0","check":"regression 5","expected":"0","passed":true},{"actual":"0","check":"regression 6","expected":"0","passed":true},{"actual":"0","check":"regression 7","expected":"0","passed":true},{"actual":"18","check":"regression 8","expected":"14","passed":false},{"actual":"4","check":"variable density mass","expected":"2","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": \"6\", \"expected\": \"11/2\", \"passed\": false}, {\"check\": \"regression 2\", \"actual\": \"4\", \"expected\": \"2\", \"passed\": false}, {\"check\": \"regression 3\", \"actual\": \"8\", \"expected\": \"8\", \"passed\": true}, {\"check\": \"regression 4\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 5\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 6\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 7\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 8\", \"actual\": \"18\", \"expected\": \"14\", \"passed\": false}, {\"check\": \"variable density mass\", \"actual\": \"4\", \"expected\": \"2\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":48.265,"exit_code":1,"observations":[{"actual":"11/2","check":"regression 1","expected":"11/2","passed":true},{"actual":"2","check":"regression 2","expected":"2","passed":true},{"actual":"8","check":"regression 3","expected":"8","passed":true},{"actual":"0","check":"regression 4","expected":"0","passed":true},{"actual":"0","check":"regression 5","expected":"0","passed":true},{"actual":"0","check":"regression 6","expected":"0","passed":true},{"actual":"4","check":"regression 7","expected":"0","passed":false},{"actual":"14","check":"regression 8","expected":"14","passed":true},{"actual":"2","check":"variable density mass","expected":"2","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": \"11/2\", \"expected\": \"11/2\", \"passed\": true}, {\"check\": \"regression 2\", \"actual\": \"2\", \"expected\": \"2\", \"passed\": true}, {\"check\": \"regression 3\", \"actual\": \"8\", \"expected\": \"8\", \"passed\": true}, {\"check\": \"regression 4\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 5\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 6\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"regression 7\", \"actual\": \"4\", \"expected\": \"0\", \"passed\": false}, {\"check\": \"regression 8\", \"actual\": \"14\", \"expected\": \"14\", \"passed\": true}, {\"check\": \"variable density mass\", \"actual\": \"2\", \"expected\": \"2\", \"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."}}