FA-68826 / Toll and parking fee computation / Open access
Parking tax and fee composition: parking tax is truncated · case 01
Parking tax and fee composition returns a wrong result when parking tax is truncated.
ROOT CAUSE
Truncation under-collects up to one cent of tax.
VERIFIED REPAIR
Restore the tax rounding rule so that the step reads `(base * x['tax_bp'] + 5000) // 10000`.
Unsuccessful approach: Rounding up over-collects whenever the fraction is below one half.
Case contract
Input {base, resident, resident_pct, tax_bp (basis points), surcharge, app, app_fee}. Residents get resident_pct off (discount floored). Parking tax on the discounted base is rounded half up per transaction. The surcharge is untaxed. App payments add app_fee plus its own tax rounded half up. Return {base, tax, total}.
Why this case matters
Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
base = x['base']
if x['resident']:
base -= base * x['resident_pct'] // 100
tax = base * x['tax_bp'] // 10000
total = base + tax + x['surcharge']
if x['app']:
total += x['app_fee'] + (x['app_fee'] * x['tax_bp'] + 5000) // 10000
return {'base': base, 'tax': tax, 'total': total}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'base': 4607, 'resident': True, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 3456, 'tax': 216, 'total': 3749}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 340, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 0, 'app': False, 'app_fee': 25}, {'base': 340, 'tax': 34, 'total': 374}), ({'base': 775, 'resident': True, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 0, 'app': True, 'app_fee': 35}, {'base': 388, 'tax': 39, 'total': 466}), ({'base': 2257, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 45}, {'base': 1693, 'tax': 313, 'total': 2056}), ({'base': 1884, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 45}, {'base': 1413, 'tax': 261, 'total': 1724}), ({'base': 3965, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 3965, 'tax': 248, 'total': 4411}), ({'base': 3730, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 0, 'app': False, 'app_fee': 45}, {'base': 3730, 'tax': 373, 'total': 4103})], [({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 3820, 'resident': False, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 0, 'app': True, 'app_fee': 25}, {'base': 3820, 'tax': 382, 'total': 4230}), ({'base': 3488, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 0, 'app': False, 'app_fee': 35}, {'base': 3488, 'tax': 785, 'total': 4273}), ({'base': 1584, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 35}, {'base': 1584, 'tax': 99, 'total': 1733}), ({'base': 1360, 'resident': False, 'resident_pct': 25, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 1360, 'tax': 136, 'total': 1574}), ({'base': 3857, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 25}, {'base': 3857, 'tax': 241, 'total': 4148}), ({'base': 146, 'resident': False, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 0, 'app': True, 'app_fee': 25}, {'base': 146, 'tax': 27, 'total': 203}), ({'base': 4289, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 4289, 'tax': 429, 'total': 4896})], [({'base': 1490, 'resident': False, 'resident_pct': 25, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 1490, 'tax': 149, 'total': 1817}), ({'base': 4064, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 4064, 'tax': 254, 'total': 4495}), ({'base': 4016, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 4016, 'tax': 251, 'total': 4454}), ({'base': 1390, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 25}, {'base': 1390, 'tax': 87, 'total': 1527}), ({'base': 1783, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 1783, 'tax': 401, 'total': 2289}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 4398, 'resident': False, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 35}, {'base': 4398, 'tax': 814, 'total': 5262}), ({'base': 2093, 'resident': True, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': False, 'app_fee': 45}, {'base': 1570, 'tax': 98, 'total': 1818})], [({'base': 2840, 'resident': False, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 2840, 'tax': 284, 'total': 3224}), ({'base': 2280, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 2280, 'tax': 513, 'total': 2874}), ({'base': 689, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': False, 'app_fee': 35}, {'base': 689, 'tax': 43, 'total': 882}), ({'base': 900, 'resident': True, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 720, 'tax': 162, 'total': 987}), ({'base': 1018, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 0, 'app': True, 'app_fee': 35}, {'base': 1018, 'tax': 229, 'total': 1290}), ({'base': 3121, 'resident': True, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 150, 'app': False, 'app_fee': 25}, {'base': 1561, 'tax': 289, 'total': 2000}), ({'base': 923, 'resident': False, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 0, 'app': True, 'app_fee': 45}, {'base': 923, 'tax': 171, 'total': 1147}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080})], [({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 4242, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 4242, 'tax': 265, 'total': 4705}), ({'base': 2612, 'resident': False, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 0, 'app': False, 'app_fee': 45}, {'base': 2612, 'tax': 483, 'total': 3095}), ({'base': 4896, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 0, 'app': True, 'app_fee': 45}, {'base': 4896, 'tax': 306, 'total': 5250}), ({'base': 3293, 'resident': True, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 2635, 'tax': 264, 'total': 2977}), ({'base': 2690, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 2690, 'tax': 269, 'total': 3159}), ({'base': 4760, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 4760, 'tax': 1071, 'total': 6036}), ({'base': 115, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 150, 'app': False, 'app_fee': 45}, {'base': 115, 'tax': 26, 'total': 291})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check('fee oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 0 | {'base': 3456, 'tax': 216, 'total': 3749} | {'base': 3456, 'tax': 216, 'total': 3749} | Passed |
| fee oracle 1 | {'base': 750, 'tax': 138, 'total': 1079} | {'base': 750, 'tax': 139, 'total': 1080} | Failed |
| fee oracle 2 | {'base': 340, 'tax': 34, 'total': 374} | {'base': 340, 'tax': 34, 'total': 374} | Passed |
| fee oracle 3 | {'base': 388, 'tax': 38, 'total': 465} | {'base': 388, 'tax': 39, 'total': 466} | Failed |
| fee oracle 4 | {'base': 1693, 'tax': 313, 'total': 2056} | {'base': 1693, 'tax': 313, 'total': 2056} | Passed |
| fee oracle 5 | {'base': 1413, 'tax': 261, 'total': 1724} | {'base': 1413, 'tax': 261, 'total': 1724} | Passed |
| fee oracle 6 | {'base': 3965, 'tax': 247, 'total': 4410} | {'base': 3965, 'tax': 248, 'total': 4411} | Failed |
| fee oracle 7 | {'base': 3730, 'tax': 373, 'total': 4103} | {'base': 3730, 'tax': 373, 'total': 4103} | Passed |
SHA-256 / 20153ed30c351af6dbca64a3fcfcc50eccc3e1019edaf103b35450a5e488e81e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
base = x['base']
if x['resident']:
base -= base * x['resident_pct'] // 100
tax = -(-base * x['tax_bp'] // 10000)
total = base + tax + x['surcharge']
if x['app']:
total += x['app_fee'] + (x['app_fee'] * x['tax_bp'] + 5000) // 10000
return {'base': base, 'tax': tax, 'total': total}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'base': 4607, 'resident': True, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 3456, 'tax': 216, 'total': 3749}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 340, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 0, 'app': False, 'app_fee': 25}, {'base': 340, 'tax': 34, 'total': 374}), ({'base': 775, 'resident': True, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 0, 'app': True, 'app_fee': 35}, {'base': 388, 'tax': 39, 'total': 466}), ({'base': 2257, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 45}, {'base': 1693, 'tax': 313, 'total': 2056}), ({'base': 1884, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 45}, {'base': 1413, 'tax': 261, 'total': 1724}), ({'base': 3965, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 3965, 'tax': 248, 'total': 4411}), ({'base': 3730, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 0, 'app': False, 'app_fee': 45}, {'base': 3730, 'tax': 373, 'total': 4103})], [({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 3820, 'resident': False, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 0, 'app': True, 'app_fee': 25}, {'base': 3820, 'tax': 382, 'total': 4230}), ({'base': 3488, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 0, 'app': False, 'app_fee': 35}, {'base': 3488, 'tax': 785, 'total': 4273}), ({'base': 1584, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 35}, {'base': 1584, 'tax': 99, 'total': 1733}), ({'base': 1360, 'resident': False, 'resident_pct': 25, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 1360, 'tax': 136, 'total': 1574}), ({'base': 3857, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 25}, {'base': 3857, 'tax': 241, 'total': 4148}), ({'base': 146, 'resident': False, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 0, 'app': True, 'app_fee': 25}, {'base': 146, 'tax': 27, 'total': 203}), ({'base': 4289, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 4289, 'tax': 429, 'total': 4896})], [({'base': 1490, 'resident': False, 'resident_pct': 25, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 1490, 'tax': 149, 'total': 1817}), ({'base': 4064, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 4064, 'tax': 254, 'total': 4495}), ({'base': 4016, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 4016, 'tax': 251, 'total': 4454}), ({'base': 1390, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 25}, {'base': 1390, 'tax': 87, 'total': 1527}), ({'base': 1783, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 1783, 'tax': 401, 'total': 2289}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 4398, 'resident': False, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 35}, {'base': 4398, 'tax': 814, 'total': 5262}), ({'base': 2093, 'resident': True, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': False, 'app_fee': 45}, {'base': 1570, 'tax': 98, 'total': 1818})], [({'base': 2840, 'resident': False, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 2840, 'tax': 284, 'total': 3224}), ({'base': 2280, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 2280, 'tax': 513, 'total': 2874}), ({'base': 689, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': False, 'app_fee': 35}, {'base': 689, 'tax': 43, 'total': 882}), ({'base': 900, 'resident': True, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 720, 'tax': 162, 'total': 987}), ({'base': 1018, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 0, 'app': True, 'app_fee': 35}, {'base': 1018, 'tax': 229, 'total': 1290}), ({'base': 3121, 'resident': True, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 150, 'app': False, 'app_fee': 25}, {'base': 1561, 'tax': 289, 'total': 2000}), ({'base': 923, 'resident': False, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 0, 'app': True, 'app_fee': 45}, {'base': 923, 'tax': 171, 'total': 1147}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080})], [({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 4242, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 4242, 'tax': 265, 'total': 4705}), ({'base': 2612, 'resident': False, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 0, 'app': False, 'app_fee': 45}, {'base': 2612, 'tax': 483, 'total': 3095}), ({'base': 4896, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 0, 'app': True, 'app_fee': 45}, {'base': 4896, 'tax': 306, 'total': 5250}), ({'base': 3293, 'resident': True, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 2635, 'tax': 264, 'total': 2977}), ({'base': 2690, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 2690, 'tax': 269, 'total': 3159}), ({'base': 4760, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 4760, 'tax': 1071, 'total': 6036}), ({'base': 115, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 150, 'app': False, 'app_fee': 45}, {'base': 115, 'tax': 26, 'total': 291})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check('fee oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 0 | {'base': 3456, 'tax': 216, 'total': 3749} | {'base': 3456, 'tax': 216, 'total': 3749} | Passed |
| fee oracle 1 | {'base': 750, 'tax': 139, 'total': 1080} | {'base': 750, 'tax': 139, 'total': 1080} | Passed |
| fee oracle 2 | {'base': 340, 'tax': 34, 'total': 374} | {'base': 340, 'tax': 34, 'total': 374} | Passed |
| fee oracle 3 | {'base': 388, 'tax': 39, 'total': 466} | {'base': 388, 'tax': 39, 'total': 466} | Passed |
| fee oracle 4 | {'base': 1693, 'tax': 314, 'total': 2057} | {'base': 1693, 'tax': 313, 'total': 2056} | Failed |
| fee oracle 5 | {'base': 1413, 'tax': 262, 'total': 1725} | {'base': 1413, 'tax': 261, 'total': 1724} | Failed |
| fee oracle 6 | {'base': 3965, 'tax': 248, 'total': 4411} | {'base': 3965, 'tax': 248, 'total': 4411} | Passed |
| fee oracle 7 | {'base': 3730, 'tax': 373, 'total': 4103} | {'base': 3730, 'tax': 373, 'total': 4103} | Passed |
SHA-256 / 80a85b6ecb570a913fec2b9e9bed37a9fddf9be1f499267f204ca89ad1ede81d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
base = x['base']
if x['resident']:
base -= base * x['resident_pct'] // 100
tax = (base * x['tax_bp'] + 5000) // 10000
total = base + tax + x['surcharge']
if x['app']:
total += x['app_fee'] + (x['app_fee'] * x['tax_bp'] + 5000) // 10000
return {'base': base, 'tax': tax, 'total': total}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[({'base': 4607, 'resident': True, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 3456, 'tax': 216, 'total': 3749}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 340, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 0, 'app': False, 'app_fee': 25}, {'base': 340, 'tax': 34, 'total': 374}), ({'base': 775, 'resident': True, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 0, 'app': True, 'app_fee': 35}, {'base': 388, 'tax': 39, 'total': 466}), ({'base': 2257, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 45}, {'base': 1693, 'tax': 313, 'total': 2056}), ({'base': 1884, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 45}, {'base': 1413, 'tax': 261, 'total': 1724}), ({'base': 3965, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 3965, 'tax': 248, 'total': 4411}), ({'base': 3730, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 0, 'app': False, 'app_fee': 45}, {'base': 3730, 'tax': 373, 'total': 4103})], [({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 3820, 'resident': False, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 0, 'app': True, 'app_fee': 25}, {'base': 3820, 'tax': 382, 'total': 4230}), ({'base': 3488, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 0, 'app': False, 'app_fee': 35}, {'base': 3488, 'tax': 785, 'total': 4273}), ({'base': 1584, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 35}, {'base': 1584, 'tax': 99, 'total': 1733}), ({'base': 1360, 'resident': False, 'resident_pct': 25, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 1360, 'tax': 136, 'total': 1574}), ({'base': 3857, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 25}, {'base': 3857, 'tax': 241, 'total': 4148}), ({'base': 146, 'resident': False, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 0, 'app': True, 'app_fee': 25}, {'base': 146, 'tax': 27, 'total': 203}), ({'base': 4289, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 4289, 'tax': 429, 'total': 4896})], [({'base': 1490, 'resident': False, 'resident_pct': 25, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 1490, 'tax': 149, 'total': 1817}), ({'base': 4064, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 25}, {'base': 4064, 'tax': 254, 'total': 4495}), ({'base': 4016, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 4016, 'tax': 251, 'total': 4454}), ({'base': 1390, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 50, 'app': False, 'app_fee': 25}, {'base': 1390, 'tax': 87, 'total': 1527}), ({'base': 1783, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 1783, 'tax': 401, 'total': 2289}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 4398, 'resident': False, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 50, 'app': False, 'app_fee': 35}, {'base': 4398, 'tax': 814, 'total': 5262}), ({'base': 2093, 'resident': True, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': False, 'app_fee': 45}, {'base': 1570, 'tax': 98, 'total': 1818})], [({'base': 2840, 'resident': False, 'resident_pct': 50, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 2840, 'tax': 284, 'total': 3224}), ({'base': 2280, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 2280, 'tax': 513, 'total': 2874}), ({'base': 689, 'resident': False, 'resident_pct': 25, 'tax_bp': 625, 'surcharge': 150, 'app': False, 'app_fee': 35}, {'base': 689, 'tax': 43, 'total': 882}), ({'base': 900, 'resident': True, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 50, 'app': True, 'app_fee': 45}, {'base': 720, 'tax': 162, 'total': 987}), ({'base': 1018, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 0, 'app': True, 'app_fee': 35}, {'base': 1018, 'tax': 229, 'total': 1290}), ({'base': 3121, 'resident': True, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 150, 'app': False, 'app_fee': 25}, {'base': 1561, 'tax': 289, 'total': 2000}), ({'base': 923, 'resident': False, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 0, 'app': True, 'app_fee': 45}, {'base': 923, 'tax': 171, 'total': 1147}), ({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080})], [({'base': 1000, 'resident': True, 'resident_pct': 25, 'tax_bp': 1850, 'surcharge': 150, 'app': True, 'app_fee': 35}, {'base': 750, 'tax': 139, 'total': 1080}), ({'base': 4242, 'resident': False, 'resident_pct': 50, 'tax_bp': 625, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 4242, 'tax': 265, 'total': 4705}), ({'base': 2612, 'resident': False, 'resident_pct': 50, 'tax_bp': 1850, 'surcharge': 0, 'app': False, 'app_fee': 45}, {'base': 2612, 'tax': 483, 'total': 3095}), ({'base': 4896, 'resident': False, 'resident_pct': 20, 'tax_bp': 625, 'surcharge': 0, 'app': True, 'app_fee': 45}, {'base': 4896, 'tax': 306, 'total': 5250}), ({'base': 3293, 'resident': True, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 50, 'app': True, 'app_fee': 25}, {'base': 2635, 'tax': 264, 'total': 2977}), ({'base': 2690, 'resident': False, 'resident_pct': 20, 'tax_bp': 1000, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 2690, 'tax': 269, 'total': 3159}), ({'base': 4760, 'resident': False, 'resident_pct': 50, 'tax_bp': 2250, 'surcharge': 150, 'app': True, 'app_fee': 45}, {'base': 4760, 'tax': 1071, 'total': 6036}), ({'base': 115, 'resident': False, 'resident_pct': 20, 'tax_bp': 2250, 'surcharge': 150, 'app': False, 'app_fee': 45}, {'base': 115, 'tax': 26, 'total': 291})]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check('fee oracle' + ' %d' % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fee oracle 0 | {'base': 3456, 'tax': 216, 'total': 3749} | {'base': 3456, 'tax': 216, 'total': 3749} | Passed |
| fee oracle 1 | {'base': 750, 'tax': 139, 'total': 1080} | {'base': 750, 'tax': 139, 'total': 1080} | Passed |
| fee oracle 2 | {'base': 340, 'tax': 34, 'total': 374} | {'base': 340, 'tax': 34, 'total': 374} | Passed |
| fee oracle 3 | {'base': 388, 'tax': 39, 'total': 466} | {'base': 388, 'tax': 39, 'total': 466} | Passed |
| fee oracle 4 | {'base': 1693, 'tax': 313, 'total': 2056} | {'base': 1693, 'tax': 313, 'total': 2056} | Passed |
| fee oracle 5 | {'base': 1413, 'tax': 261, 'total': 1724} | {'base': 1413, 'tax': 261, 'total': 1724} | Passed |
| fee oracle 6 | {'base': 3965, 'tax': 248, 'total': 4411} | {'base': 3965, 'tax': 248, 'total': 4411} | Passed |
| fee oracle 7 | {'base': 3730, 'tax': 373, 'total': 4103} | {'base': 3730, 'tax': 373, 'total': 4103} | Passed |
SHA-256 / a48fe8a4d9dfc3548bb5d99d3e95cd7624a776f719d73dd5b1dc1675ee652b2b
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:05.850265+00:00.
Case digest / b8094c3596fcc4c4b0e471447689d57657d4d65d6004544d6bb3a32f43d02a78