{"abstract":"Some liabilities are one pound higher than stipulated.","category":"Tax bracket computation","checks":6,"contract":"solve(price, ftb, additional, nonresident): stipulated property transfer tax in whole pounds. Normal slices: 0% to 250000, 5% to 925000, 10% to 1500000, 12% above. First-time-buyer slices (0% to 425000, 5% to 625000) apply only when ftb is true, the purchase is not an additional dwelling, and price <= 625000; otherwise normal slices. Surcharges add percentage points to every slice including 0% slices: +3 for an additional dwelling when price >= 40000, +2 for a non-resident buyer; they stack. Return the tax rounded down to whole pounds.","evaluation_group":"w2-tax_bracket_computation-property-transfer-slices","failed_approach":"Rounding up to whole pounds overcharges every liability with pence.","family":"w2-tax_bracket_computation-property-transfer-slices-round-down-pounds","id":"FA-62606","implementations":{"attempt":{"sha256":"809349deec6c4e8fff8c3cc3dc008f73ae7cdc685ba9c01d0d26d0b8e0979b12","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(price, ftb, additional, nonresident):\n    normal = [(250000, 0), (925000, 5), (1500000, 10), (None, 12)]\n    first = [(425000, 0), (625000, 5)]\n    use_ftb = ftb and not additional and price <= 625000\n    bands = first if use_ftb else normal\n    sur = (3 if additional and price >= 40000 else 0) + (2 if nonresident else 0)\n    tax, lower = 0, 0\n    for upper, rate in bands:\n        top = price if upper is None else min(price, upper)\n        if top > lower: tax += (top - lower) * (rate + sur)\n        if upper is None or price <= upper: break\n        lower = upper\n    return -(-tax // 100)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression round-down-pounds 1', (250013, False, False, False), 0),\n  ('regression round-down-pounds 2', (250019, False, False, False), 0),\n  ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb at cap', (625000, True, False, False), 10000),\n  ('control: ftb over cap', (625001, True, False, False), 18750)],\n [('regression round-down-pounds 1', (39999, False, False, True), 799),\n  ('regression round-down-pounds 2', (919321, True, True, False), 61045),\n  ('partial repair guard 1', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500),\n  ('control: below surcharge floor', (39999, False, True, False), 0),\n  ('control: ftb additional', (400000, True, True, False), 19500)],\n [('regression round-down-pounds 1', (575918, True, False, False), 7545),\n  ('regression round-down-pounds 2', (628677, True, True, True), 50367),\n  ('partial repair guard 1', (625001, True, True, False), 37500),\n  ('partial repair guard 2', (919321, True, True, False), 61045),\n  ('control: below surcharge floor', (39999, False, True, False), 0),\n  ('control: nonresident cheap', (39999, False, False, True), 799),\n  ('control: ftb additional', (400000, True, True, False), 19500),\n  ('control: expensive', (2000000, False, False, False), 151250)],\n [('regression round-down-pounds 1', (665697, False, False, False), 20784),\n  ('regression round-down-pounds 2', (330173, False, False, False), 4008),\n  ('partial repair guard 1', (250001, False, False, False), 0),\n  ('partial repair guard 2', (625001, False, False, False), 18750),\n  ('control: expensive', (2000000, False, False, False), 151250),\n  ('control: odd pounds', (250013, False, False, False), 0), ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750)],\n [('regression round-down-pounds 1', (1296206, False, True, False), 109756),\n  ('regression round-down-pounds 2', (558699, True, False, False), 6684),\n  ('partial repair guard 1', (250001, True, False, True), 5000),\n  ('partial repair guard 2', (2087334, True, False, False), 161730),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb at cap', (625000, True, False, False), 10000),\n  ('control: ftb over cap', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\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":"91b630b6bb01ace20231278d4c60b6a47a547a881091ce1cedc4dcc642a3b24a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(price, ftb, additional, nonresident):\n    normal = [(250000, 0), (925000, 5), (1500000, 10), (None, 12)]\n    first = [(425000, 0), (625000, 5)]\n    use_ftb = ftb and not additional and price <= 625000\n    bands = first if use_ftb else normal\n    sur = (3 if additional and price >= 40000 else 0) + (2 if nonresident else 0)\n    tax, lower = 0, 0\n    for upper, rate in bands:\n        top = price if upper is None else min(price, upper)\n        if top > lower: tax += (top - lower) * (rate + sur)\n        if upper is None or price <= upper: break\n        lower = upper\n    return (tax + 50) // 100\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression round-down-pounds 1', (250013, False, False, False), 0),\n  ('regression round-down-pounds 2', (250019, False, False, False), 0),\n  ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb at cap', (625000, True, False, False), 10000),\n  ('control: ftb over cap', (625001, True, False, False), 18750)],\n [('regression round-down-pounds 1', (39999, False, False, True), 799),\n  ('regression round-down-pounds 2', (919321, True, True, False), 61045),\n  ('partial repair guard 1', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500),\n  ('control: below surcharge floor', (39999, False, True, False), 0),\n  ('control: ftb additional', (400000, True, True, False), 19500)],\n [('regression round-down-pounds 1', (575918, True, False, False), 7545),\n  ('regression round-down-pounds 2', (628677, True, True, True), 50367),\n  ('partial repair guard 1', (625001, True, True, False), 37500),\n  ('partial repair guard 2', (919321, True, True, False), 61045),\n  ('control: below surcharge floor', (39999, False, True, False), 0),\n  ('control: nonresident cheap', (39999, False, False, True), 799),\n  ('control: ftb additional', (400000, True, True, False), 19500),\n  ('control: expensive', (2000000, False, False, False), 151250)],\n [('regression round-down-pounds 1', (665697, False, False, False), 20784),\n  ('regression round-down-pounds 2', (330173, False, False, False), 4008),\n  ('partial repair guard 1', (250001, False, False, False), 0),\n  ('partial repair guard 2', (625001, False, False, False), 18750),\n  ('control: expensive', (2000000, False, False, False), 151250),\n  ('control: odd pounds', (250013, False, False, False), 0), ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750)],\n [('regression round-down-pounds 1', (1296206, False, True, False), 109756),\n  ('regression round-down-pounds 2', (558699, True, False, False), 6684),\n  ('partial repair guard 1', (250001, True, False, True), 5000),\n  ('partial repair guard 2', (2087334, True, False, False), 161730),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb at cap', (625000, True, False, False), 10000),\n  ('control: ftb over cap', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\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":"0e15fef4e872ffdc4d422f13a3040cd37174c8ef6b1e9e1d162c1feeaa5942c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(price, ftb, additional, nonresident):\n    normal = [(250000, 0), (925000, 5), (1500000, 10), (None, 12)]\n    first = [(425000, 0), (625000, 5)]\n    use_ftb = ftb and not additional and price <= 625000\n    bands = first if use_ftb else normal\n    sur = (3 if additional and price >= 40000 else 0) + (2 if nonresident else 0)\n    tax, lower = 0, 0\n    for upper, rate in bands:\n        top = price if upper is None else min(price, upper)\n        if top > lower: tax += (top - lower) * (rate + sur)\n        if upper is None or price <= upper: break\n        lower = upper\n    return tax // 100\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression round-down-pounds 1', (250013, False, False, False), 0),\n  ('regression round-down-pounds 2', (250019, False, False, False), 0),\n  ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb at cap', (625000, True, False, False), 10000),\n  ('control: ftb over cap', (625001, True, False, False), 18750)],\n [('regression round-down-pounds 1', (39999, False, False, True), 799),\n  ('regression round-down-pounds 2', (919321, True, True, False), 61045),\n  ('partial repair guard 1', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500),\n  ('control: below surcharge floor', (39999, False, True, False), 0),\n  ('control: ftb additional', (400000, True, True, False), 19500)],\n [('regression round-down-pounds 1', (575918, True, False, False), 7545),\n  ('regression round-down-pounds 2', (628677, True, True, True), 50367),\n  ('partial repair guard 1', (625001, True, True, False), 37500),\n  ('partial repair guard 2', (919321, True, True, False), 61045),\n  ('control: below surcharge floor', (39999, False, True, False), 0),\n  ('control: nonresident cheap', (39999, False, False, True), 799),\n  ('control: ftb additional', (400000, True, True, False), 19500),\n  ('control: expensive', (2000000, False, False, False), 151250)],\n [('regression round-down-pounds 1', (665697, False, False, False), 20784),\n  ('regression round-down-pounds 2', (330173, False, False, False), 4008),\n  ('partial repair guard 1', (250001, False, False, False), 0),\n  ('partial repair guard 2', (625001, False, False, False), 18750),\n  ('control: expensive', (2000000, False, False, False), 151250),\n  ('control: odd pounds', (250013, False, False, False), 0), ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750)],\n [('regression round-down-pounds 1', (1296206, False, True, False), 109756),\n  ('regression round-down-pounds 2', (558699, True, False, False), 6684),\n  ('partial repair guard 1', (250001, True, False, True), 5000),\n  ('partial repair guard 2', (2087334, True, False, False), 161730),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb at cap', (625000, True, False, False), 10000),\n  ('control: ftb over cap', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\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":"A deterministic, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's rules. 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":"w2-tax_bracket_computation-property-transfer-slices-round-down-pounds","generated_at":"2026-09-29T14:47:06.201972+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.","repair":"Round down to whole pounds.","root_cause":"The pence total is rounded half-up to pounds.","sha256":"a21ff95142026c8fe09ec99755bf47184b1e7a5c3f82cb88cedc95932cde4a02","title":"The liability is rounded to the nearest pound instead of down · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.376,"exit_code":1,"observations":[{"actual":1,"check":"regression round-down-pounds 1","expected":0,"passed":false},{"actual":1,"check":"regression round-down-pounds 2","expected":0,"passed":false},{"actual":2500,"check":"control: normal","expected":2500,"passed":true},{"actual":3750,"check":"control: first-time buyer","expected":3750,"passed":true},{"actual":10000,"check":"control: ftb at cap","expected":10000,"passed":true},{"actual":18751,"check":"control: ftb over cap","expected":18750,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression round-down-pounds 1\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"regression round-down-pounds 2\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"control: normal\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"control: first-time buyer\", \"actual\": 3750, \"expected\": 3750, \"passed\": true}, {\"check\": \"control: ftb at cap\", \"actual\": 10000, \"expected\": 10000, \"passed\": true}, {\"check\": \"control: ftb over cap\", \"actual\": 18751, \"expected\": 18750, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.114,"exit_code":1,"observations":[{"actual":1,"check":"regression round-down-pounds 1","expected":0,"passed":false},{"actual":1,"check":"regression round-down-pounds 2","expected":0,"passed":false},{"actual":2500,"check":"control: normal","expected":2500,"passed":true},{"actual":3750,"check":"control: first-time buyer","expected":3750,"passed":true},{"actual":10000,"check":"control: ftb at cap","expected":10000,"passed":true},{"actual":18750,"check":"control: ftb over cap","expected":18750,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression round-down-pounds 1\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"regression round-down-pounds 2\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"control: normal\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"control: first-time buyer\", \"actual\": 3750, \"expected\": 3750, \"passed\": true}, {\"check\": \"control: ftb at cap\", \"actual\": 10000, \"expected\": 10000, \"passed\": true}, {\"check\": \"control: ftb over cap\", \"actual\": 18750, \"expected\": 18750, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.548,"exit_code":0,"observations":[{"actual":0,"check":"regression round-down-pounds 1","expected":0,"passed":true},{"actual":0,"check":"regression round-down-pounds 2","expected":0,"passed":true},{"actual":2500,"check":"control: normal","expected":2500,"passed":true},{"actual":3750,"check":"control: first-time buyer","expected":3750,"passed":true},{"actual":10000,"check":"control: ftb at cap","expected":10000,"passed":true},{"actual":18750,"check":"control: ftb over cap","expected":18750,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression round-down-pounds 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"regression round-down-pounds 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: normal\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"control: first-time buyer\", \"actual\": 3750, \"expected\": 3750, \"passed\": true}, {\"check\": \"control: ftb at cap\", \"actual\": 10000, \"expected\": 10000, \"passed\": true}, {\"check\": \"control: ftb over cap\", \"actual\": 18750, \"expected\": 18750, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}