{"abstract":"Unpaid toll violation escalation returns a wrong result when the cap includes the toll itself.","category":"Toll and parking fee computation","checks":8,"contract":"Input {toll, issued_day, paid_day (or null), today, first_fee, second_fee, stage1_days, stage2_days, cap, waiver_first}. Age is measured to the payment day if paid, else today. Age above stage1 adds first_fee; first-time offenders (waiver_first) who actually paid within stage2 have it waived. Age above stage2 adds second_fee. Penalties (not the toll) are capped at cap. Return amount due.","evaluation_group":"w2-toll_and_parking_fee_computation-violation-escalation","failed_approach":"Reducing the penalty cap by the toll has the same effect.","family":"w2-toll_and_parking_fee_computation-violation-escalation-cap-scope","id":"FA-68816","implementations":{"attempt":{"sha256":"be87229ade7b00ef5682f15f259b2d36c97e3079c350b0467daa74df48292714","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ev = x['paid_day'] if x['paid_day'] is not None else x['today']\n    age = ev - x['issued_day']\n    pen = 0\n    if age > x['stage1_days']:\n        pen += x['first_fee']\n        if x['waiver_first'] and x['paid_day'] is not None and age <= x['stage2_days']:\n            pen -= x['first_fee']\n    if age > x['stage2_days']:\n        pen += x['second_fee']\n    return x['toll'] + min(pen, x['cap'] - x['toll'])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'toll': 400, 'issued_day': 66, 'paid_day': 126, 'today': 155, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1400), ({'toll': 400, 'issued_day': 55, 'paid_day': None, 'today': 116, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5400), ({'toll': 875, 'issued_day': 43, 'paid_day': None, 'today': 148, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 5875), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 52, 'paid_day': 82, 'today': 82, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 250), ({'toll': 875, 'issued_day': 35, 'paid_day': 66, 'today': 66, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1375), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400)], [({'toll': 400, 'issued_day': 38, 'paid_day': None, 'today': 69, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': True}, 900), ({'toll': 250, 'issued_day': 42, 'paid_day': 103, 'today': 103, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3250), ({'toll': 400, 'issued_day': 91, 'paid_day': 152, 'today': 152, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875), ({'toll': 400, 'issued_day': 93, 'paid_day': 124, 'today': 124, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': True}, 400), ({'toll': 875, 'issued_day': 29, 'paid_day': None, 'today': 47, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 875)], [({'toll': 250, 'issued_day': 72, 'paid_day': 143, 'today': 186, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3250), ({'toll': 400, 'issued_day': 0, 'paid_day': 0, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 53, 'paid_day': 93, 'today': 93, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 250), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 250, 'issued_day': 16, 'paid_day': None, 'today': 81, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5250), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 91, 'paid_day': 152, 'today': 152, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5400), ({'toll': 875, 'issued_day': 31, 'paid_day': None, 'today': 61, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 875)], [({'toll': 875, 'issued_day': 28, 'paid_day': 59, 'today': 59, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 1375), ({'toll': 875, 'issued_day': 61, 'paid_day': 92, 'today': 121, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1375), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 400, 'issued_day': 65, 'paid_day': None, 'today': 179, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 30, 'paid_day': 77, 'today': 90, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 1400), ({'toll': 875, 'issued_day': 14, 'paid_day': None, 'today': 75, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 5875), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875)], [({'toll': 250, 'issued_day': 45, 'paid_day': 75, 'today': 76, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 250), ({'toll': 400, 'issued_day': 0, 'paid_day': 0, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 33, 'paid_day': None, 'today': 94, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3400), ({'toll': 875, 'issued_day': 96, 'paid_day': None, 'today': 165, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3875), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 10, 'paid_day': 40, 'today': 125, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 250), ({'toll': 400, 'issued_day': 82, 'paid_day': None, 'today': 143, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400)]]\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":"23bbb99bba3237a9fa06bb8e6c3e102e8b2ae67819cad60651a3a3cc7b38cdd7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ev = x['paid_day'] if x['paid_day'] is not None else x['today']\n    age = ev - x['issued_day']\n    pen = 0\n    if age > x['stage1_days']:\n        pen += x['first_fee']\n        if x['waiver_first'] and x['paid_day'] is not None and age <= x['stage2_days']:\n            pen -= x['first_fee']\n    if age > x['stage2_days']:\n        pen += x['second_fee']\n    return min(x['toll'] + pen, x['cap'])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'toll': 400, 'issued_day': 66, 'paid_day': 126, 'today': 155, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1400), ({'toll': 400, 'issued_day': 55, 'paid_day': None, 'today': 116, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5400), ({'toll': 875, 'issued_day': 43, 'paid_day': None, 'today': 148, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 5875), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 52, 'paid_day': 82, 'today': 82, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 250), ({'toll': 875, 'issued_day': 35, 'paid_day': 66, 'today': 66, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1375), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400)], [({'toll': 400, 'issued_day': 38, 'paid_day': None, 'today': 69, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': True}, 900), ({'toll': 250, 'issued_day': 42, 'paid_day': 103, 'today': 103, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3250), ({'toll': 400, 'issued_day': 91, 'paid_day': 152, 'today': 152, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875), ({'toll': 400, 'issued_day': 93, 'paid_day': 124, 'today': 124, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': True}, 400), ({'toll': 875, 'issued_day': 29, 'paid_day': None, 'today': 47, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 875)], [({'toll': 250, 'issued_day': 72, 'paid_day': 143, 'today': 186, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3250), ({'toll': 400, 'issued_day': 0, 'paid_day': 0, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 53, 'paid_day': 93, 'today': 93, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 250), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 250, 'issued_day': 16, 'paid_day': None, 'today': 81, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5250), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 91, 'paid_day': 152, 'today': 152, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5400), ({'toll': 875, 'issued_day': 31, 'paid_day': None, 'today': 61, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 875)], [({'toll': 875, 'issued_day': 28, 'paid_day': 59, 'today': 59, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 1375), ({'toll': 875, 'issued_day': 61, 'paid_day': 92, 'today': 121, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1375), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 400, 'issued_day': 65, 'paid_day': None, 'today': 179, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 30, 'paid_day': 77, 'today': 90, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 1400), ({'toll': 875, 'issued_day': 14, 'paid_day': None, 'today': 75, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 5875), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875)], [({'toll': 250, 'issued_day': 45, 'paid_day': 75, 'today': 76, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 250), ({'toll': 400, 'issued_day': 0, 'paid_day': 0, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 33, 'paid_day': None, 'today': 94, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3400), ({'toll': 875, 'issued_day': 96, 'paid_day': None, 'today': 165, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3875), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 10, 'paid_day': 40, 'today': 125, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 250), ({'toll': 400, 'issued_day': 82, 'paid_day': None, 'today': 143, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400)]]\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"},"fixed":{"sha256":"061cdc4081414717d11eed91518121703a416992e5625672988f49c83bf8fc85","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    ev = x['paid_day'] if x['paid_day'] is not None else x['today']\n    age = ev - x['issued_day']\n    pen = 0\n    if age > x['stage1_days']:\n        pen += x['first_fee']\n        if x['waiver_first'] and x['paid_day'] is not None and age <= x['stage2_days']:\n            pen -= x['first_fee']\n    if age > x['stage2_days']:\n        pen += x['second_fee']\n    return x['toll'] + min(pen, x['cap'])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'toll': 400, 'issued_day': 66, 'paid_day': 126, 'today': 155, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1400), ({'toll': 400, 'issued_day': 55, 'paid_day': None, 'today': 116, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5400), ({'toll': 875, 'issued_day': 43, 'paid_day': None, 'today': 148, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 5875), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 52, 'paid_day': 82, 'today': 82, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 250), ({'toll': 875, 'issued_day': 35, 'paid_day': 66, 'today': 66, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1375), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400)], [({'toll': 400, 'issued_day': 38, 'paid_day': None, 'today': 69, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': True}, 900), ({'toll': 250, 'issued_day': 42, 'paid_day': 103, 'today': 103, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3250), ({'toll': 400, 'issued_day': 91, 'paid_day': 152, 'today': 152, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875), ({'toll': 400, 'issued_day': 93, 'paid_day': 124, 'today': 124, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': True}, 400), ({'toll': 875, 'issued_day': 29, 'paid_day': None, 'today': 47, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 875)], [({'toll': 250, 'issued_day': 72, 'paid_day': 143, 'today': 186, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3250), ({'toll': 400, 'issued_day': 0, 'paid_day': 0, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 53, 'paid_day': 93, 'today': 93, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 250), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 250, 'issued_day': 16, 'paid_day': None, 'today': 81, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5250), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 91, 'paid_day': 152, 'today': 152, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 5400), ({'toll': 875, 'issued_day': 31, 'paid_day': None, 'today': 61, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 875)], [({'toll': 875, 'issued_day': 28, 'paid_day': 59, 'today': 59, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 1375), ({'toll': 875, 'issued_day': 61, 'paid_day': 92, 'today': 121, 'first_fee': 500, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 1375), ({'toll': 400, 'issued_day': 10, 'paid_day': 70, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 400), ({'toll': 400, 'issued_day': 65, 'paid_day': None, 'today': 179, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 30, 'paid_day': 77, 'today': 90, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 7500, 'waiver_first': False}, 1400), ({'toll': 875, 'issued_day': 14, 'paid_day': None, 'today': 75, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 5875), ({'toll': 875, 'issued_day': 0, 'paid_day': None, 'today': 100, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3875)], [({'toll': 250, 'issued_day': 45, 'paid_day': 75, 'today': 76, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 250), ({'toll': 400, 'issued_day': 0, 'paid_day': 0, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 400, 'issued_day': 33, 'paid_day': None, 'today': 94, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3400), ({'toll': 875, 'issued_day': 96, 'paid_day': None, 'today': 165, 'first_fee': 1000, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': True}, 3875), ({'toll': 400, 'issued_day': 10, 'paid_day': 40, 'today': 90, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': False}, 400), ({'toll': 250, 'issued_day': 10, 'paid_day': 40, 'today': 125, 'first_fee': 500, 'second_fee': 5000, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 250), ({'toll': 400, 'issued_day': 82, 'paid_day': None, 'today': 143, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 3000, 'waiver_first': False}, 3400), ({'toll': 400, 'issued_day': 0, 'paid_day': None, 'today': 45, 'first_fee': 1000, 'second_fee': 2500, 'stage1_days': 30, 'stage2_days': 60, 'cap': 5000, 'waiver_first': True}, 1400)]]\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-violation-escalation-cap-scope","generated_at":"2026-09-29T14:48:05.756290+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.","repair":"Restore the penalty cap scope rule so that the step reads `x['toll'] + min(pen, x['cap'])`.","root_cause":"Capping toll plus penalties forgives part of the toll.","sha256":"2d03d7f1e89cdf6a2c7e3c14afb4b5c0221c9d043c70322d8dfb94bb53e38814","title":"Unpaid toll violation escalation: the cap includes the toll itself · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.163,"exit_code":1,"observations":[{"actual":1400,"check":"fee oracle 0","expected":1400,"passed":true},{"actual":5000,"check":"fee oracle 1","expected":5400,"passed":false},{"actual":5000,"check":"fee oracle 2","expected":5875,"passed":false},{"actual":3000,"check":"fee oracle 3","expected":3875,"passed":false},{"actual":400,"check":"fee oracle 4","expected":400,"passed":true},{"actual":250,"check":"fee oracle 5","expected":250,"passed":true},{"actual":1375,"check":"fee oracle 6","expected":1375,"passed":true},{"actual":1400,"check":"fee oracle 7","expected":1400,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 5000, \"expected\": 5400, \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": 5000, \"expected\": 5875, \"passed\": false}, {\"check\": \"fee oracle 3\", \"actual\": 3000, \"expected\": 3875, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": 400, \"expected\": 400, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 250, \"expected\": 250, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 1375, \"expected\": 1375, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.219,"exit_code":1,"observations":[{"actual":1400,"check":"fee oracle 0","expected":1400,"passed":true},{"actual":5000,"check":"fee oracle 1","expected":5400,"passed":false},{"actual":5000,"check":"fee oracle 2","expected":5875,"passed":false},{"actual":3000,"check":"fee oracle 3","expected":3875,"passed":false},{"actual":400,"check":"fee oracle 4","expected":400,"passed":true},{"actual":250,"check":"fee oracle 5","expected":250,"passed":true},{"actual":1375,"check":"fee oracle 6","expected":1375,"passed":true},{"actual":1400,"check":"fee oracle 7","expected":1400,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 5000, \"expected\": 5400, \"passed\": false}, {\"check\": \"fee oracle 2\", \"actual\": 5000, \"expected\": 5875, \"passed\": false}, {\"check\": \"fee oracle 3\", \"actual\": 3000, \"expected\": 3875, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": 400, \"expected\": 400, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 250, \"expected\": 250, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 1375, \"expected\": 1375, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.707,"exit_code":0,"observations":[{"actual":1400,"check":"fee oracle 0","expected":1400,"passed":true},{"actual":5400,"check":"fee oracle 1","expected":5400,"passed":true},{"actual":5875,"check":"fee oracle 2","expected":5875,"passed":true},{"actual":3875,"check":"fee oracle 3","expected":3875,"passed":true},{"actual":400,"check":"fee oracle 4","expected":400,"passed":true},{"actual":250,"check":"fee oracle 5","expected":250,"passed":true},{"actual":1375,"check":"fee oracle 6","expected":1375,"passed":true},{"actual":1400,"check":"fee oracle 7","expected":1400,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 5400, \"expected\": 5400, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 5875, \"expected\": 5875, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 3875, \"expected\": 3875, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 400, \"expected\": 400, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 250, \"expected\": 250, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 1375, \"expected\": 1375, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 1400, \"expected\": 1400, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}