{"abstract":"The invoice total does not equal the sum of its itemised lines.","category":"Insurance premium rating","checks":8,"contract":"Input premium (may be negative for return premium), policy_fee, inspection_fee, tax, surcharge, stamping (per mille). Tax applies to premium+policy fee; surcharge to premium only; stamping to premium+both fees. Each item is rounded half away from zero separately; return [tax, surcharge, stamping, total billed].","evaluation_group":"w2-insurance_premium_rating-taxes-fees","failed_approach":"Applying all rates to one base misstates both lines and total.","family":"w2-insurance_premium_rating-taxes-fees-total-composition","id":"FA-63206","implementations":{"attempt":{"sha256":"128ec48ca31b76947ddfbf439c72809e505421c11f8d7eb804cf3a19559acf6a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    p=x['premium']; pf=x['policy_fee']; inf=x['inspection_fee']\n    def r(v): return math.floor(v+Fraction(1,2)) if v>=0 else -math.floor(-v+Fraction(1,2))\n    tax=r(Fraction((p+pf)*x['tax'],1000))\n    sur=r(Fraction(p*x['surcharge'],1000))\n    stamp=r(Fraction((p+pf+inf)*x['stamping'],1000))\n    return [tax,sur,stamp,r((p+pf+inf)*(1+Fraction(x['tax']+x['surcharge']+x['stamping'],1000)))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['new business 0', {'premium': 412845, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [20767, 1239, 846, 445697]], ['new business 1', {'premium': 206492, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [7524, 1445, 448, 233409]], ['new business 2', {'premium': 248678, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 3, 'stamping': 1}, [12684, 746, 269, 282377]], ['new business 3', {'premium': 180805, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [9165, 542, 382, 200894]], ['new business 4', {'premium': 81321, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [3018, 569, 198, 102606]], ['return premium tie', {'premium': -12500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-63, -38, -13, -12614]], ['return premium odd tie', {'premium': -112500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-113, -113, -113, -112839]], ['no fees', {'premium': 296266, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [10666, 889, 296, 308117]]], [['new business 0', {'premium': 63014, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [2449, 441, 151, 78555]], ['new business 1', {'premium': 135696, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [6910, 950, 153, 161209]], ['new business 2', {'premium': 152271, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 1}, [7584, 1066, 162, 171083]], ['new business 3', {'premium': 393593, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [19531, 2755, 812, 429191]], ['new business 4', {'premium': 347134, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [12677, 1041, 367, 381219]], ['return premium tie', {'premium': -37500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-188, -113, -38, -37839]], ['return premium odd tie', {'premium': -137500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-138, -138, -138, -137914]], ['no fees', {'premium': 313133, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [15657, 939, 626, 330355]]], [['new business 0', {'premium': 464734, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [16910, 1394, 485, 503523]], ['new business 1', {'premium': 379927, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [18739, 2659, 780, 412105]], ['new business 2', {'premium': 142805, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [5231, 1000, 153, 159189]], ['new business 3', {'premium': 172357, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [6295, 1206, 365, 190223]], ['new business 4', {'premium': 145157, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [7235, 1016, 325, 171233]], ['return premium tie', {'premium': -62500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-313, -188, -63, -63064]], ['return premium odd tie', {'premium': -162500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-163, -163, -163, -162989]], ['no fees', {'premium': 383065, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [13790, 2681, 383, 399919]]], [['new business 0', {'premium': 410101, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [20755, 2871, 430, 454157]], ['new business 1', {'premium': 268176, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [13534, 1877, 286, 301373]], ['new business 2', {'premium': 321115, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [16181, 2248, 339, 357383]], ['new business 3', {'premium': 50665, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [1914, 355, 61, 62995]], ['new business 4', {'premium': 490929, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 3, 'stamping': 1}, [24301, 1473, 503, 529706]], ['return premium tie', {'premium': -87500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-438, -263, -88, -88289]], ['return premium odd tie', {'premium': -187500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-188, -188, -188, -188064]], ['no fees', {'premium': 176432, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [8822, 1235, 176, 186665]]], [['new business 0', {'premium': 318606, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [15734, 2230, 672, 354742]], ['new business 1', {'premium': 169116, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 3, 'stamping': 1}, [8581, 507, 187, 195891]], ['new business 2', {'premium': 235982, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 7, 'stamping': 2}, [11924, 1652, 492, 260050]], ['new business 3', {'premium': 143193, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 3, 'stamping': 2}, [7139, 430, 306, 161068]], ['new business 4', {'premium': 241775, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [12214, 1692, 259, 273440]], ['return premium tie', {'premium': -112500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-563, -338, -113, -113514]], ['return premium odd tie', {'premium': -212500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-213, -213, -213, -213139]], ['no fees', {'premium': 300225, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 49, 'surcharge': 7, 'stamping': 1}, [14711, 2102, 300, 317338]]]]\nfor label, args, expected in fixtures[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":"58531e4505260831a7ff5dc6419717d409c94c9ca00a4245618656144b4d1675","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    p=x['premium']; pf=x['policy_fee']; inf=x['inspection_fee']\n    def r(v): return math.floor(v+Fraction(1,2)) if v>=0 else -math.floor(-v+Fraction(1,2))\n    tax=r(Fraction((p+pf)*x['tax'],1000))\n    sur=r(Fraction(p*x['surcharge'],1000))\n    stamp=r(Fraction((p+pf+inf)*x['stamping'],1000))\n    return [tax,sur,stamp,r(p+pf+inf+Fraction((p+pf)*x['tax'],1000)+Fraction(p*x['surcharge'],1000)+Fraction((p+pf+inf)*x['stamping'],1000))]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['new business 0', {'premium': 412845, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [20767, 1239, 846, 445697]], ['new business 1', {'premium': 206492, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [7524, 1445, 448, 233409]], ['new business 2', {'premium': 248678, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 3, 'stamping': 1}, [12684, 746, 269, 282377]], ['new business 3', {'premium': 180805, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [9165, 542, 382, 200894]], ['new business 4', {'premium': 81321, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [3018, 569, 198, 102606]], ['return premium tie', {'premium': -12500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-63, -38, -13, -12614]], ['return premium odd tie', {'premium': -112500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-113, -113, -113, -112839]], ['no fees', {'premium': 296266, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [10666, 889, 296, 308117]]], [['new business 0', {'premium': 63014, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [2449, 441, 151, 78555]], ['new business 1', {'premium': 135696, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [6910, 950, 153, 161209]], ['new business 2', {'premium': 152271, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 1}, [7584, 1066, 162, 171083]], ['new business 3', {'premium': 393593, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [19531, 2755, 812, 429191]], ['new business 4', {'premium': 347134, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [12677, 1041, 367, 381219]], ['return premium tie', {'premium': -37500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-188, -113, -38, -37839]], ['return premium odd tie', {'premium': -137500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-138, -138, -138, -137914]], ['no fees', {'premium': 313133, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [15657, 939, 626, 330355]]], [['new business 0', {'premium': 464734, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [16910, 1394, 485, 503523]], ['new business 1', {'premium': 379927, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [18739, 2659, 780, 412105]], ['new business 2', {'premium': 142805, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [5231, 1000, 153, 159189]], ['new business 3', {'premium': 172357, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [6295, 1206, 365, 190223]], ['new business 4', {'premium': 145157, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [7235, 1016, 325, 171233]], ['return premium tie', {'premium': -62500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-313, -188, -63, -63064]], ['return premium odd tie', {'premium': -162500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-163, -163, -163, -162989]], ['no fees', {'premium': 383065, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [13790, 2681, 383, 399919]]], [['new business 0', {'premium': 410101, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [20755, 2871, 430, 454157]], ['new business 1', {'premium': 268176, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [13534, 1877, 286, 301373]], ['new business 2', {'premium': 321115, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [16181, 2248, 339, 357383]], ['new business 3', {'premium': 50665, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [1914, 355, 61, 62995]], ['new business 4', {'premium': 490929, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 3, 'stamping': 1}, [24301, 1473, 503, 529706]], ['return premium tie', {'premium': -87500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-438, -263, -88, -88289]], ['return premium odd tie', {'premium': -187500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-188, -188, -188, -188064]], ['no fees', {'premium': 176432, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [8822, 1235, 176, 186665]]], [['new business 0', {'premium': 318606, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [15734, 2230, 672, 354742]], ['new business 1', {'premium': 169116, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 3, 'stamping': 1}, [8581, 507, 187, 195891]], ['new business 2', {'premium': 235982, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 7, 'stamping': 2}, [11924, 1652, 492, 260050]], ['new business 3', {'premium': 143193, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 3, 'stamping': 2}, [7139, 430, 306, 161068]], ['new business 4', {'premium': 241775, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [12214, 1692, 259, 273440]], ['return premium tie', {'premium': -112500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-563, -338, -113, -113514]], ['return premium odd tie', {'premium': -212500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-213, -213, -213, -213139]], ['no fees', {'premium': 300225, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 49, 'surcharge': 7, 'stamping': 1}, [14711, 2102, 300, 317338]]]]\nfor label, args, expected in fixtures[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":"2fbef268ab74eb453b992a17803c4fc668579d35685548c5be9f8862958205ad","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    p=x['premium']; pf=x['policy_fee']; inf=x['inspection_fee']\n    def r(v): return math.floor(v+Fraction(1,2)) if v>=0 else -math.floor(-v+Fraction(1,2))\n    tax=r(Fraction((p+pf)*x['tax'],1000))\n    sur=r(Fraction(p*x['surcharge'],1000))\n    stamp=r(Fraction((p+pf+inf)*x['stamping'],1000))\n    return [tax,sur,stamp,p+pf+inf+tax+sur+stamp]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['new business 0', {'premium': 412845, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [20767, 1239, 846, 445697]], ['new business 1', {'premium': 206492, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [7524, 1445, 448, 233409]], ['new business 2', {'premium': 248678, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 3, 'stamping': 1}, [12684, 746, 269, 282377]], ['new business 3', {'premium': 180805, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [9165, 542, 382, 200894]], ['new business 4', {'premium': 81321, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [3018, 569, 198, 102606]], ['return premium tie', {'premium': -12500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-63, -38, -13, -12614]], ['return premium odd tie', {'premium': -112500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-113, -113, -113, -112839]], ['no fees', {'premium': 296266, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [10666, 889, 296, 308117]]], [['new business 0', {'premium': 63014, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [2449, 441, 151, 78555]], ['new business 1', {'premium': 135696, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [6910, 950, 153, 161209]], ['new business 2', {'premium': 152271, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 1}, [7584, 1066, 162, 171083]], ['new business 3', {'premium': 393593, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [19531, 2755, 812, 429191]], ['new business 4', {'premium': 347134, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [12677, 1041, 367, 381219]], ['return premium tie', {'premium': -37500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-188, -113, -38, -37839]], ['return premium odd tie', {'premium': -137500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-138, -138, -138, -137914]], ['no fees', {'premium': 313133, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 50, 'surcharge': 3, 'stamping': 2}, [15657, 939, 626, 330355]]], [['new business 0', {'premium': 464734, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 36, 'surcharge': 3, 'stamping': 1}, [16910, 1394, 485, 503523]], ['new business 1', {'premium': 379927, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [18739, 2659, 780, 412105]], ['new business 2', {'premium': 142805, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [5231, 1000, 153, 159189]], ['new business 3', {'premium': 172357, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 2}, [6295, 1206, 365, 190223]], ['new business 4', {'premium': 145157, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [7235, 1016, 325, 171233]], ['return premium tie', {'premium': -62500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-313, -188, -63, -63064]], ['return premium odd tie', {'premium': -162500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-163, -163, -163, -162989]], ['no fees', {'premium': 383065, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [13790, 2681, 383, 399919]]], [['new business 0', {'premium': 410101, 'policy_fee': 5000, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [20755, 2871, 430, 454157]], ['new business 1', {'premium': 268176, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [13534, 1877, 286, 301373]], ['new business 2', {'premium': 321115, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [16181, 2248, 339, 357383]], ['new business 3', {'premium': 50665, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 36, 'surcharge': 7, 'stamping': 1}, [1914, 355, 61, 62995]], ['new business 4', {'premium': 490929, 'policy_fee': 5000, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 3, 'stamping': 1}, [24301, 1473, 503, 529706]], ['return premium tie', {'premium': -87500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-438, -263, -88, -88289]], ['return premium odd tie', {'premium': -187500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-188, -188, -188, -188064]], ['no fees', {'premium': 176432, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [8822, 1235, 176, 186665]]], [['new business 0', {'premium': 318606, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 49, 'surcharge': 7, 'stamping': 2}, [15734, 2230, 672, 354742]], ['new business 1', {'premium': 169116, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 3, 'stamping': 1}, [8581, 507, 187, 195891]], ['new business 2', {'premium': 235982, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 50, 'surcharge': 7, 'stamping': 2}, [11924, 1652, 492, 260050]], ['new business 3', {'premium': 143193, 'policy_fee': 2500, 'inspection_fee': 7500, 'tax': 49, 'surcharge': 3, 'stamping': 2}, [7139, 430, 306, 161068]], ['new business 4', {'premium': 241775, 'policy_fee': 2500, 'inspection_fee': 15000, 'tax': 50, 'surcharge': 7, 'stamping': 1}, [12214, 1692, 259, 273440]], ['return premium tie', {'premium': -112500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 5, 'surcharge': 3, 'stamping': 1}, [-563, -338, -113, -113514]], ['return premium odd tie', {'premium': -212500, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 1, 'surcharge': 1, 'stamping': 1}, [-213, -213, -213, -213139]], ['no fees', {'premium': 300225, 'policy_fee': 0, 'inspection_fee': 0, 'tax': 49, 'surcharge': 7, 'stamping': 1}, [14711, 2102, 300, 317338]]]]\nfor label, args, expected in fixtures[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 of a stipulated toy rating contract. Amounts are integer cents and factors exact rationals; it makes no claim of conformance with any filed rating plan, bureau manual or jurisdiction. 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-insurance_premium_rating-taxes-fees-total-composition","generated_at":"2026-09-29T14:47:12.188812+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tax and fee bases differ item by item, and each item is filed and remitted separately.","repair":"Total the rounded line items.","root_cause":"The total rounds the exact sum rather than adding the rounded items.","sha256":"91363f6eca6faee4d965299466df62a02c1f4785ba035c8c37de9eee1e5dc63d","title":"Premium tax, surcharge and stamping fee allocation: Billed total is recomputed from unrounded items · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.144,"exit_code":1,"observations":[{"actual":[20767,1239,846,446101],"check":"new business 0","expected":[20767,1239,846,445697],"passed":false},{"actual":[7524,1445,448,234072],"check":"new business 1","expected":[7524,1445,448,233409],"passed":false},{"actual":[12684,746,269,283187],"check":"new business 2","expected":[12684,746,269,282377],"passed":false},{"actual":[9165,542,382,201299],"check":"new business 3","expected":[9165,542,382,200894],"passed":false},{"actual":[3018,569,198,103268],"check":"new business 4","expected":[3018,569,198,102606],"passed":false},{"actual":[-63,-38,-13,-12613],"check":"return premium tie","expected":[-63,-38,-13,-12614],"passed":false},{"actual":[-113,-113,-113,-112838],"check":"return premium odd tie","expected":[-113,-113,-113,-112839],"passed":false},{"actual":[10666,889,296,308117],"check":"no fees","expected":[10666,889,296,308117],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new business 0\", \"actual\": [20767, 1239, 846, 446101], \"expected\": [20767, 1239, 846, 445697], \"passed\": false}, {\"check\": \"new business 1\", \"actual\": [7524, 1445, 448, 234072], \"expected\": [7524, 1445, 448, 233409], \"passed\": false}, {\"check\": \"new business 2\", \"actual\": [12684, 746, 269, 283187], \"expected\": [12684, 746, 269, 282377], \"passed\": false}, {\"check\": \"new business 3\", \"actual\": [9165, 542, 382, 201299], \"expected\": [9165, 542, 382, 200894], \"passed\": false}, {\"check\": \"new business 4\", \"actual\": [3018, 569, 198, 103268], \"expected\": [3018, 569, 198, 102606], \"passed\": false}, {\"check\": \"return premium tie\", \"actual\": [-63, -38, -13, -12613], \"expected\": [-63, -38, -13, -12614], \"passed\": false}, {\"check\": \"return premium odd tie\", \"actual\": [-113, -113, -113, -112838], \"expected\": [-113, -113, -113, -112839], \"passed\": false}, {\"check\": \"no fees\", \"actual\": [10666, 889, 296, 308117], \"expected\": [10666, 889, 296, 308117], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.963,"exit_code":1,"observations":[{"actual":[20767,1239,846,445696],"check":"new business 0","expected":[20767,1239,846,445697],"passed":false},{"actual":[7524,1445,448,233409],"check":"new business 1","expected":[7524,1445,448,233409],"passed":true},{"actual":[12684,746,269,282377],"check":"new business 2","expected":[12684,746,269,282377],"passed":true},{"actual":[9165,542,382,200894],"check":"new business 3","expected":[9165,542,382,200894],"passed":true},{"actual":[3018,569,198,102605],"check":"new business 4","expected":[3018,569,198,102606],"passed":false},{"actual":[-63,-38,-13,-12613],"check":"return premium tie","expected":[-63,-38,-13,-12614],"passed":false},{"actual":[-113,-113,-113,-112838],"check":"return premium odd tie","expected":[-113,-113,-113,-112839],"passed":false},{"actual":[10666,889,296,308117],"check":"no fees","expected":[10666,889,296,308117],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new business 0\", \"actual\": [20767, 1239, 846, 445696], \"expected\": [20767, 1239, 846, 445697], \"passed\": false}, {\"check\": \"new business 1\", \"actual\": [7524, 1445, 448, 233409], \"expected\": [7524, 1445, 448, 233409], \"passed\": true}, {\"check\": \"new business 2\", \"actual\": [12684, 746, 269, 282377], \"expected\": [12684, 746, 269, 282377], \"passed\": true}, {\"check\": \"new business 3\", \"actual\": [9165, 542, 382, 200894], \"expected\": [9165, 542, 382, 200894], \"passed\": true}, {\"check\": \"new business 4\", \"actual\": [3018, 569, 198, 102605], \"expected\": [3018, 569, 198, 102606], \"passed\": false}, {\"check\": \"return premium tie\", \"actual\": [-63, -38, -13, -12613], \"expected\": [-63, -38, -13, -12614], \"passed\": false}, {\"check\": \"return premium odd tie\", \"actual\": [-113, -113, -113, -112838], \"expected\": [-113, -113, -113, -112839], \"passed\": false}, {\"check\": \"no fees\", \"actual\": [10666, 889, 296, 308117], \"expected\": [10666, 889, 296, 308117], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.214,"exit_code":0,"observations":[{"actual":[20767,1239,846,445697],"check":"new business 0","expected":[20767,1239,846,445697],"passed":true},{"actual":[7524,1445,448,233409],"check":"new business 1","expected":[7524,1445,448,233409],"passed":true},{"actual":[12684,746,269,282377],"check":"new business 2","expected":[12684,746,269,282377],"passed":true},{"actual":[9165,542,382,200894],"check":"new business 3","expected":[9165,542,382,200894],"passed":true},{"actual":[3018,569,198,102606],"check":"new business 4","expected":[3018,569,198,102606],"passed":true},{"actual":[-63,-38,-13,-12614],"check":"return premium tie","expected":[-63,-38,-13,-12614],"passed":true},{"actual":[-113,-113,-113,-112839],"check":"return premium odd tie","expected":[-113,-113,-113,-112839],"passed":true},{"actual":[10666,889,296,308117],"check":"no fees","expected":[10666,889,296,308117],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new business 0\", \"actual\": [20767, 1239, 846, 445697], \"expected\": [20767, 1239, 846, 445697], \"passed\": true}, {\"check\": \"new business 1\", \"actual\": [7524, 1445, 448, 233409], \"expected\": [7524, 1445, 448, 233409], \"passed\": true}, {\"check\": \"new business 2\", \"actual\": [12684, 746, 269, 282377], \"expected\": [12684, 746, 269, 282377], \"passed\": true}, {\"check\": \"new business 3\", \"actual\": [9165, 542, 382, 200894], \"expected\": [9165, 542, 382, 200894], \"passed\": true}, {\"check\": \"new business 4\", \"actual\": [3018, 569, 198, 102606], \"expected\": [3018, 569, 198, 102606], \"passed\": true}, {\"check\": \"return premium tie\", \"actual\": [-63, -38, -13, -12614], \"expected\": [-63, -38, -13, -12614], \"passed\": true}, {\"check\": \"return premium odd tie\", \"actual\": [-113, -113, -113, -112839], \"expected\": [-113, -113, -113, -112839], \"passed\": true}, {\"check\": \"no fees\", \"actual\": [10666, 889, 296, 308117], \"expected\": [10666, 889, 296, 308117], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}