{"abstract":"Tiered parking rate table returns a wrong result when tiers are matched at hour granularity.","category":"Toll and parking fee computation","checks":8,"contract":"Input {minutes, tiers: [[upto minutes, cumulative price]] in any order, extra_per: [block minutes, cents], max}. A stay of 0 minutes is free. Tiers are applied in ascending upto order and a stay of exactly upto minutes belongs to that tier (price capped at max). Beyond the last tier each started block after its upto adds the block price; the whole fee is capped at max.","contract_signature":"x","evaluation_group":"w2-toll_and_parking_fee_computation-tiered-rate","failed_approach":"Comparing whole hours puts a 61 minute stay into a 60 minute tier.","family":"w2-toll_and_parking_fee_computation-tiered-rate-tier-boundary","id":"FA-68371","implementations":{"attempt":{"sha256":"765e7b6d639902f52e3e8cdcf9abdfd83fcea899f78fe9b7c90f822e8085ac47","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    m = x['minutes']\n    tiers = sorted(x['tiers'])\n    if m <= 0:\n        return 0\n    for upto, price in tiers:\n        if m // 60 <= upto // 60:\n            return min(price, x['max'])\n    last_upto, last_price = tiers[-1]\n    blk, add = x['extra_per']\n    extra = -(-(m - last_upto) // blk)\n    return min(last_price + extra * add, x['max'])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'minutes': 90, 'tiers': [[90, 1200], [210, 2000]], 'extra_per': [30, 50], 'max': 4000}, 1200), ({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000), ({'minutes': 150, 'tiers': [[270, 1800], [240, 1050], [210, 450], [150, 200]], 'extra_per': [60, 100], 'max': 1500}, 200), ({'minutes': 30, 'tiers': [[30, 400], [270, 1550]], 'extra_per': [15, 150], 'max': 4000}, 400), ({'minutes': 1, 'tiers': [[30, 150], [60, 300]], 'extra_per': [30, 100], 'max': 1500}, 150), ({'minutes': 301, 'tiers': [[300, 100], [330, 1100]], 'extra_per': [30, 100], 'max': 4000}, 1100), ({'minutes': 267, 'tiers': [[180, 250]], 'extra_per': [30, 150], 'max': 1500}, 700)], [({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 240, 'tiers': [[150, 950], [270, 1850], [240, 1500], [210, 1050]], 'extra_per': [60, 100], 'max': 4000}, 1500), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000), ({'minutes': 361, 'tiers': [[360, 1850]], 'extra_per': [15, 50], 'max': 1500}, 1500), ({'minutes': 90, 'tiers': [[90, 400], [240, 500], [360, 1700]], 'extra_per': [60, 150], 'max': 2500}, 400), ({'minutes': 0, 'tiers': [[60, 300]], 'extra_per': [30, 100], 'max': 1500}, 0), ({'minutes': 91, 'tiers': [[60, 100], [90, 1000], [120, 1300], [300, 1500]], 'extra_per': [30, 50], 'max': 4000}, 1300), ({'minutes': 210, 'tiers': [[30, 500], [210, 800], [150, 750], [270, 1800]], 'extra_per': [15, 150], 'max': 1500}, 800)], [({'minutes': 741, 'tiers': [[60, 450], [150, 750], [270, 1450]], 'extra_per': [30, 100], 'max': 2500}, 2500), ({'minutes': 301, 'tiers': [[120, 300], [300, 850], [330, 950]], 'extra_per': [60, 150], 'max': 2500}, 950), ({'minutes': 16, 'tiers': [[90, 1900]], 'extra_per': [30, 150], 'max': 4000}, 1900), ({'minutes': 150, 'tiers': [[30, 200], [60, 650], [150, 1350], [270, 1500]], 'extra_per': [30, 50], 'max': 2500}, 1350), ({'minutes': 180, 'tiers': [[180, 600], [330, 1000]], 'extra_per': [20, 50], 'max': 1500}, 600), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000), ({'minutes': 0, 'tiers': [[60, 300]], 'extra_per': [30, 100], 'max': 1500}, 0), ({'minutes': 60, 'tiers': [[60, 300], [120, 500], [240, 800]], 'extra_per': [60, 200], 'max': 2000}, 300)], [({'minutes': 361, 'tiers': [[240, 600], [360, 1750]], 'extra_per': [20, 150], 'max': 1500}, 1500), ({'minutes': 150, 'tiers': [[150, 1650], [360, 1800]], 'extra_per': [15, 50], 'max': 4000}, 1650), ({'minutes': 61, 'tiers': [[30, 400], [60, 500], [300, 900]], 'extra_per': [15, 50], 'max': 2500}, 900), ({'minutes': 60, 'tiers': [[60, 300], [120, 500], [240, 800]], 'extra_per': [60, 200], 'max': 2000}, 300), ({'minutes': 180, 'tiers': [[30, 100], [330, 1850], [60, 700], [180, 1300]], 'extra_per': [60, 150], 'max': 2500}, 1300), ({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 74, 'tiers': [[330, 1100]], 'extra_per': [15, 100], 'max': 4000}, 1100), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000)], [({'minutes': 1, 'tiers': [[30, 150], [60, 300]], 'extra_per': [30, 100], 'max': 1500}, 150), ({'minutes': 300, 'tiers': [[300, 150], [330, 1500]], 'extra_per': [30, 150], 'max': 4000}, 150), ({'minutes': 120, 'tiers': [[120, 250], [180, 700], [300, 850], [360, 950]], 'extra_per': [60, 150], 'max': 4000}, 250), ({'minutes': 61, 'tiers': [[60, 1900]], 'extra_per': [60, 100], 'max': 2500}, 2000), ({'minutes': 0, 'tiers': [[60, 300]], 'extra_per': [30, 100], 'max': 1500}, 0), ({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 270, 'tiers': [[270, 250], [300, 400]], 'extra_per': [20, 50], 'max': 1500}, 250), ({'minutes': 271, 'tiers': [[60, 150], [270, 200]], 'extra_per': [30, 150], 'max': 1500}, 350)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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":"28889f1b6c41afeebee197f9fb30ef4c1c7012e5c84b502b1a59daf785d1d5ba","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    m = x['minutes']\n    tiers = sorted(x['tiers'])\n    if m <= 0:\n        return 0\n    for upto, price in tiers:\n        if m < upto:\n            return min(price, x['max'])\n    last_upto, last_price = tiers[-1]\n    blk, add = x['extra_per']\n    extra = -(-(m - last_upto) // blk)\n    return min(last_price + extra * add, x['max'])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'minutes': 90, 'tiers': [[90, 1200], [210, 2000]], 'extra_per': [30, 50], 'max': 4000}, 1200), ({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000), ({'minutes': 150, 'tiers': [[270, 1800], [240, 1050], [210, 450], [150, 200]], 'extra_per': [60, 100], 'max': 1500}, 200), ({'minutes': 30, 'tiers': [[30, 400], [270, 1550]], 'extra_per': [15, 150], 'max': 4000}, 400), ({'minutes': 1, 'tiers': [[30, 150], [60, 300]], 'extra_per': [30, 100], 'max': 1500}, 150), ({'minutes': 301, 'tiers': [[300, 100], [330, 1100]], 'extra_per': [30, 100], 'max': 4000}, 1100), ({'minutes': 267, 'tiers': [[180, 250]], 'extra_per': [30, 150], 'max': 1500}, 700)], [({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 240, 'tiers': [[150, 950], [270, 1850], [240, 1500], [210, 1050]], 'extra_per': [60, 100], 'max': 4000}, 1500), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000), ({'minutes': 361, 'tiers': [[360, 1850]], 'extra_per': [15, 50], 'max': 1500}, 1500), ({'minutes': 90, 'tiers': [[90, 400], [240, 500], [360, 1700]], 'extra_per': [60, 150], 'max': 2500}, 400), ({'minutes': 0, 'tiers': [[60, 300]], 'extra_per': [30, 100], 'max': 1500}, 0), ({'minutes': 91, 'tiers': [[60, 100], [90, 1000], [120, 1300], [300, 1500]], 'extra_per': [30, 50], 'max': 4000}, 1300), ({'minutes': 210, 'tiers': [[30, 500], [210, 800], [150, 750], [270, 1800]], 'extra_per': [15, 150], 'max': 1500}, 800)], [({'minutes': 741, 'tiers': [[60, 450], [150, 750], [270, 1450]], 'extra_per': [30, 100], 'max': 2500}, 2500), ({'minutes': 301, 'tiers': [[120, 300], [300, 850], [330, 950]], 'extra_per': [60, 150], 'max': 2500}, 950), ({'minutes': 16, 'tiers': [[90, 1900]], 'extra_per': [30, 150], 'max': 4000}, 1900), ({'minutes': 150, 'tiers': [[30, 200], [60, 650], [150, 1350], [270, 1500]], 'extra_per': [30, 50], 'max': 2500}, 1350), ({'minutes': 180, 'tiers': [[180, 600], [330, 1000]], 'extra_per': [20, 50], 'max': 1500}, 600), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000), ({'minutes': 0, 'tiers': [[60, 300]], 'extra_per': [30, 100], 'max': 1500}, 0), ({'minutes': 60, 'tiers': [[60, 300], [120, 500], [240, 800]], 'extra_per': [60, 200], 'max': 2000}, 300)], [({'minutes': 361, 'tiers': [[240, 600], [360, 1750]], 'extra_per': [20, 150], 'max': 1500}, 1500), ({'minutes': 150, 'tiers': [[150, 1650], [360, 1800]], 'extra_per': [15, 50], 'max': 4000}, 1650), ({'minutes': 61, 'tiers': [[30, 400], [60, 500], [300, 900]], 'extra_per': [15, 50], 'max': 2500}, 900), ({'minutes': 60, 'tiers': [[60, 300], [120, 500], [240, 800]], 'extra_per': [60, 200], 'max': 2000}, 300), ({'minutes': 180, 'tiers': [[30, 100], [330, 1850], [60, 700], [180, 1300]], 'extra_per': [60, 150], 'max': 2500}, 1300), ({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 74, 'tiers': [[330, 1100]], 'extra_per': [15, 100], 'max': 4000}, 1100), ({'minutes': 250, 'tiers': [[240, 800], [60, 300], [120, 500]], 'extra_per': [60, 200], 'max': 2000}, 1000)], [({'minutes': 1, 'tiers': [[30, 150], [60, 300]], 'extra_per': [30, 100], 'max': 1500}, 150), ({'minutes': 300, 'tiers': [[300, 150], [330, 1500]], 'extra_per': [30, 150], 'max': 4000}, 150), ({'minutes': 120, 'tiers': [[120, 250], [180, 700], [300, 850], [360, 950]], 'extra_per': [60, 150], 'max': 4000}, 250), ({'minutes': 61, 'tiers': [[60, 1900]], 'extra_per': [60, 100], 'max': 2500}, 2000), ({'minutes': 0, 'tiers': [[60, 300]], 'extra_per': [30, 100], 'max': 1500}, 0), ({'minutes': 1000, 'tiers': [[90, 400], [180, 700]], 'extra_per': [45, 150], 'max': 2500}, 2500), ({'minutes': 270, 'tiers': [[270, 250], [300, 400]], 'extra_per': [20, 50], 'max': 1500}, 250), ({'minutes': 271, 'tiers': [[60, 150], [270, 200]], 'extra_per': [30, 150], 'max': 1500}, 350)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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 toy model with a stipulated contract; it makes no claim of conformance to any agency manual or standard. 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-toll_and_parking_fee_computation-tiered-rate-tier-boundary","generated_at":"2026-09-29T14:48:01.568238+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.","root_cause":"A stay of exactly the tier limit is billed in the next tier.","sha256":"c6ba8120b81263a500f209ab00992a280782ee608ce0eb504bde1221b343ceaa","title":"Tiered parking rate table: tiers are matched at hour granularity · 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":39.964,"exit_code":1,"observations":[{"actual":1200,"check":"fee oracle 0","expected":1200,"passed":true},{"actual":2500,"check":"fee oracle 1","expected":2500,"passed":true},{"actual":800,"check":"fee oracle 2","expected":1000,"passed":false},{"actual":200,"check":"fee oracle 3","expected":200,"passed":true},{"actual":400,"check":"fee oracle 4","expected":400,"passed":true},{"actual":150,"check":"fee oracle 5","expected":150,"passed":true},{"actual":100,"check":"fee oracle 6","expected":1100,"passed":false},{"actual":700,"check":"fee oracle 7","expected":700,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 1200, \"expected\": 1200, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 800, \"expected\": 1000, \"passed\": false}, {\"check\": \"fee oracle 3\", \"actual\": 200, \"expected\": 200, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 400, \"expected\": 400, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 150, \"expected\": 150, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 100, \"expected\": 1100, \"passed\": false}, {\"check\": \"fee oracle 7\", \"actual\": 700, \"expected\": 700, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.664,"exit_code":1,"observations":[{"actual":2000,"check":"fee oracle 0","expected":1200,"passed":false},{"actual":2500,"check":"fee oracle 1","expected":2500,"passed":true},{"actual":1000,"check":"fee oracle 2","expected":1000,"passed":true},{"actual":450,"check":"fee oracle 3","expected":200,"passed":false},{"actual":1550,"check":"fee oracle 4","expected":400,"passed":false},{"actual":150,"check":"fee oracle 5","expected":150,"passed":true},{"actual":1100,"check":"fee oracle 6","expected":1100,"passed":true},{"actual":700,"check":"fee oracle 7","expected":700,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 2000, \"expected\": 1200, \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": 2500, \"expected\": 2500, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 1000, \"expected\": 1000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 450, \"expected\": 200, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": 1550, \"expected\": 400, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": 150, \"expected\": 150, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 1100, \"expected\": 1100, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 700, \"expected\": 700, \"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."}}