{"abstract":"A 700000 purchase by a first-time buyer is taxed only on the 425000-625000 slice.","category":"Tax bracket computation","checks":8,"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.","contract_signature":"price, ftb, additional, nonresident","evaluation_group":"w2-tax_bracket_computation-property-transfer-slices","failed_approach":"Testing price < 625000 denies relief at exactly the cap.","family":"w2-tax_bracket_computation-property-transfer-slices-first-time-buyer-cap","id":"FA-62596","implementations":{"attempt":{"sha256":"d2e0d06f8a0660479a1d479f9aa224c96f7a36bb048b8a9060cde61b8c530995","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 first-time-buyer-cap 1', (625001, True, False, False), 18750),\n  ('regression first-time-buyer-cap 2', (925000, True, False, False), 33750),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\n  ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500)],\n [('regression first-time-buyer-cap 1', (2087334, True, False, False), 161730),\n  ('regression first-time-buyer-cap 2', (1462530, True, False, False), 87503),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\n  ('control: ftb over cap', (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 [('regression first-time-buyer-cap 1', (1130152, True, False, False), 54265),\n  ('regression first-time-buyer-cap 2', (1943189, True, False, True), 183296),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\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 first-time-buyer-cap 1', (906584, True, False, False), 32829),\n  ('regression first-time-buyer-cap 2', (1946173, True, False, False), 144790),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\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 first-time-buyer-cap 1', (625001, True, False, True), 31250),\n  ('regression first-time-buyer-cap 2', (2255703, True, False, True), 227048),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb over cap', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500)]]\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":"d25f3aa2be275362e835e335a8ea9692929c2249b11180130f4328938b5ddbd0","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\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 first-time-buyer-cap 1', (625001, True, False, False), 18750),\n  ('regression first-time-buyer-cap 2', (925000, True, False, False), 33750),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\n  ('control: normal', (300000, False, False, False), 2500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500)],\n [('regression first-time-buyer-cap 1', (2087334, True, False, False), 161730),\n  ('regression first-time-buyer-cap 2', (1462530, True, False, False), 87503),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\n  ('control: ftb over cap', (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 [('regression first-time-buyer-cap 1', (1130152, True, False, False), 54265),\n  ('regression first-time-buyer-cap 2', (1943189, True, False, True), 183296),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\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 first-time-buyer-cap 1', (906584, True, False, False), 32829),\n  ('regression first-time-buyer-cap 2', (1946173, True, False, False), 144790),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\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 first-time-buyer-cap 1', (625001, True, False, True), 31250),\n  ('regression first-time-buyer-cap 2', (2255703, True, False, True), 227048),\n  ('partial repair guard 1', (625000, True, False, False), 10000),\n  ('partial repair guard 2', (625000, True, False, True), 22500),\n  ('control: first-time buyer', (500000, True, False, False), 3750),\n  ('control: ftb over cap', (625001, True, False, False), 18750),\n  ('control: additional dwelling', (300000, False, True, False), 11500),\n  ('control: additional nonresident', (300000, False, True, True), 17500)]]\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-first-time-buyer-cap","generated_at":"2026-09-29T14:47:06.029007+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.","root_cause":"Relief eligibility omits the price <= 625000 condition.","sha256":"9e7658171e4b9b16c1a8818183c10ca60c1901287667e7d6a518bbc432b9a36c","title":"First-time-buyer relief is applied above the price cap · 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":42.079,"exit_code":1,"observations":[{"actual":18750,"check":"regression first-time-buyer-cap 1","expected":18750,"passed":true},{"actual":33750,"check":"regression first-time-buyer-cap 2","expected":33750,"passed":true},{"actual":18750,"check":"partial repair guard 1","expected":10000,"passed":false},{"actual":31250,"check":"partial repair guard 2","expected":22500,"passed":false},{"actual":2500,"check":"control: normal","expected":2500,"passed":true},{"actual":3750,"check":"control: first-time buyer","expected":3750,"passed":true},{"actual":11500,"check":"control: additional dwelling","expected":11500,"passed":true},{"actual":17500,"check":"control: additional nonresident","expected":17500,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression first-time-buyer-cap 1\", \"actual\": 18750, \"expected\": 18750, \"passed\": true}, {\"check\": \"regression first-time-buyer-cap 2\", \"actual\": 33750, \"expected\": 33750, \"passed\": true}, {\"check\": \"partial repair guard 1\", \"actual\": 18750, \"expected\": 10000, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 31250, \"expected\": 22500, \"passed\": false}, {\"check\": \"control: normal\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"control: first-time buyer\", \"actual\": 3750, \"expected\": 3750, \"passed\": true}, {\"check\": \"control: additional dwelling\", \"actual\": 11500, \"expected\": 11500, \"passed\": true}, {\"check\": \"control: additional nonresident\", \"actual\": 17500, \"expected\": 17500, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.785,"exit_code":1,"observations":[{"actual":10000,"check":"regression first-time-buyer-cap 1","expected":18750,"passed":false},{"actual":10000,"check":"regression first-time-buyer-cap 2","expected":33750,"passed":false},{"actual":10000,"check":"partial repair guard 1","expected":10000,"passed":true},{"actual":22500,"check":"partial repair guard 2","expected":22500,"passed":true},{"actual":2500,"check":"control: normal","expected":2500,"passed":true},{"actual":3750,"check":"control: first-time buyer","expected":3750,"passed":true},{"actual":11500,"check":"control: additional dwelling","expected":11500,"passed":true},{"actual":17500,"check":"control: additional nonresident","expected":17500,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression first-time-buyer-cap 1\", \"actual\": 10000, \"expected\": 18750, \"passed\": false}, {\"check\": \"regression first-time-buyer-cap 2\", \"actual\": 10000, \"expected\": 33750, \"passed\": false}, {\"check\": \"partial repair guard 1\", \"actual\": 10000, \"expected\": 10000, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 22500, \"expected\": 22500, \"passed\": true}, {\"check\": \"control: normal\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"control: first-time buyer\", \"actual\": 3750, \"expected\": 3750, \"passed\": true}, {\"check\": \"control: additional dwelling\", \"actual\": 11500, \"expected\": 11500, \"passed\": true}, {\"check\": \"control: additional nonresident\", \"actual\": 17500, \"expected\": 17500, \"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."}}