{"abstract":"The customer pays the ATM fee for a withdrawal that dispensed nothing.","category":"Currency rounding and FX conversion","checks":6,"contract":"solve(home_minor, rate, note, fee_minor): a request of home_minor home cents at rate foreign major units per home major unit is dispensed as the largest multiple of the smallest note not exceeding the converted amount (floor). If nothing can be dispensed return 'ERR:below-min-note'. The customer is charged the dispensed foreign amount converted back at the same rate, rounded UP to a home cent, plus fee_minor. Return [foreign_dispensed, charged_minor].","evaluation_group":"w2-currency_rounding_and_fx_conversion-atm-foreign-note-dispense","failed_approach":"Returning a zero charge still reports a completed zero withdrawal instead of an error.","family":"w2-currency_rounding_and_fx_conversion-atm-foreign-note-dispense-zero-dispense","id":"FA-62296","implementations":{"attempt":{"sha256":"ee5bcb82f95a54f677f9d4f666b1370c1baabbc3b1bd9159991cd30e181411e1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN\nN = 1\nobservations = []\ndef solve(home_minor, rate, note, fee_minor):\n    r = Decimal(rate)\n    home = Decimal(home_minor) / 100\n    units = (home * r / note).to_integral_value(rounding=ROUND_FLOOR)\n    foreign = int(units) * note\n    if foreign == 0: return [0, 0]\n    charged = int((Decimal(foreign) / r * 100).to_integral_value(rounding=ROUND_CEILING)) + fee_minor\n    return [foreign, charged]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816]),\n  ('control: sterling tens', (7777, '0.7893', 10, 199), [60, 7801]),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816]),\n  ('control: sterling tens', (7777, '0.7893', 10, 199), [60, 7801]),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"50b18bb9aee4ffdc3d1c8cc82dbc46367a868c05aec304d049acc95a070b2204","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN\nN = 1\nobservations = []\ndef solve(home_minor, rate, note, fee_minor):\n    r = Decimal(rate)\n    home = Decimal(home_minor) / 100\n    units = (home * r / note).to_integral_value(rounding=ROUND_FLOOR)\n    foreign = int(units) * note\n    pass\n    charged = int((Decimal(foreign) / r * 100).to_integral_value(rounding=ROUND_CEILING)) + fee_minor\n    return [foreign, charged]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816]),\n  ('control: sterling tens', (7777, '0.7893', 10, 199), [60, 7801]),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816]),\n  ('control: sterling tens', (7777, '0.7893', 10, 199), [60, 7801]),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"fdcef0c505d46870faccbd92f06c2a7519845feeb8fc2f5cab977984664cbd2e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN, ROUND_UP, ROUND_HALF_DOWN\nN = 1\nobservations = []\ndef solve(home_minor, rate, note, fee_minor):\n    r = Decimal(rate)\n    home = Decimal(home_minor) / 100\n    units = (home * r / note).to_integral_value(rounding=ROUND_FLOOR)\n    foreign = int(units) * note\n    if foreign == 0: return 'ERR:below-min-note'\n    charged = int((Decimal(foreign) / r * 100).to_integral_value(rounding=ROUND_CEILING)) + fee_minor\n    return [foreign, charged]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816]),\n  ('control: sterling tens', (7777, '0.7893', 10, 199), [60, 7801]),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816]),\n  ('control: sterling tens', (7777, '0.7893', 10, 199), [60, 7801]),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319])],\n [('regression zero-dispense 1', (500, '0.92', 5, 250), 'ERR:below-min-note'),\n  ('regression zero-dispense 2', (100, '0.7893', 10, 199), 'ERR:below-min-note'),\n  ('control: yen notes', (20000, '151.37', 1000, 500), [30000, 20319]),\n  ('control: euro fives', (1000, '0.92', 5, 0), [5, 544]),\n  ('control: exact multiple', (10870, '0.92', 10, 300), [100, 11170]),\n  ('control: big notes', (100000, '1352.5', 10000, 0), [1350000, 99816])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's rules. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-currency_rounding_and_fx_conversion-atm-foreign-note-dispense-zero-dispense","generated_at":"2026-09-29T14:47:03.322514+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Currency amounts must be rounded at the right stage and in the right unit, or ledgers, quotes and settlements drift by minor units.","repair":"Return ERR:below-min-note when no note can be dispensed.","root_cause":"The empty-dispense guard is missing, so the fee is still added.","sha256":"7aa99a85efdbafec2f181929154ba43edfadbfc1c5d760c2db09fb22eb360075","title":"A request below the smallest note is charged the fee · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.32,"exit_code":1,"observations":[{"actual":[0,0],"check":"regression zero-dispense 1","expected":"ERR:below-min-note","passed":false},{"actual":[0,0],"check":"regression zero-dispense 2","expected":"ERR:below-min-note","passed":false},{"actual":[30000,20319],"check":"control: yen notes","expected":[30000,20319],"passed":true},{"actual":[5,544],"check":"control: euro fives","expected":[5,544],"passed":true},{"actual":[100,11170],"check":"control: exact multiple","expected":[100,11170],"passed":true},{"actual":[1350000,99816],"check":"control: big notes","expected":[1350000,99816],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression zero-dispense 1\", \"actual\": [0, 0], \"expected\": \"ERR:below-min-note\", \"passed\": false}, {\"check\": \"regression zero-dispense 2\", \"actual\": [0, 0], \"expected\": \"ERR:below-min-note\", \"passed\": false}, {\"check\": \"control: yen notes\", \"actual\": [30000, 20319], \"expected\": [30000, 20319], \"passed\": true}, {\"check\": \"control: euro fives\", \"actual\": [5, 544], \"expected\": [5, 544], \"passed\": true}, {\"check\": \"control: exact multiple\", \"actual\": [100, 11170], \"expected\": [100, 11170], \"passed\": true}, {\"check\": \"control: big notes\", \"actual\": [1350000, 99816], \"expected\": [1350000, 99816], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.669,"exit_code":1,"observations":[{"actual":[0,250],"check":"regression zero-dispense 1","expected":"ERR:below-min-note","passed":false},{"actual":[0,199],"check":"regression zero-dispense 2","expected":"ERR:below-min-note","passed":false},{"actual":[30000,20319],"check":"control: yen notes","expected":[30000,20319],"passed":true},{"actual":[5,544],"check":"control: euro fives","expected":[5,544],"passed":true},{"actual":[100,11170],"check":"control: exact multiple","expected":[100,11170],"passed":true},{"actual":[1350000,99816],"check":"control: big notes","expected":[1350000,99816],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression zero-dispense 1\", \"actual\": [0, 250], \"expected\": \"ERR:below-min-note\", \"passed\": false}, {\"check\": \"regression zero-dispense 2\", \"actual\": [0, 199], \"expected\": \"ERR:below-min-note\", \"passed\": false}, {\"check\": \"control: yen notes\", \"actual\": [30000, 20319], \"expected\": [30000, 20319], \"passed\": true}, {\"check\": \"control: euro fives\", \"actual\": [5, 544], \"expected\": [5, 544], \"passed\": true}, {\"check\": \"control: exact multiple\", \"actual\": [100, 11170], \"expected\": [100, 11170], \"passed\": true}, {\"check\": \"control: big notes\", \"actual\": [1350000, 99816], \"expected\": [1350000, 99816], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.804,"exit_code":0,"observations":[{"actual":"ERR:below-min-note","check":"regression zero-dispense 1","expected":"ERR:below-min-note","passed":true},{"actual":"ERR:below-min-note","check":"regression zero-dispense 2","expected":"ERR:below-min-note","passed":true},{"actual":[30000,20319],"check":"control: yen notes","expected":[30000,20319],"passed":true},{"actual":[5,544],"check":"control: euro fives","expected":[5,544],"passed":true},{"actual":[100,11170],"check":"control: exact multiple","expected":[100,11170],"passed":true},{"actual":[1350000,99816],"check":"control: big notes","expected":[1350000,99816],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression zero-dispense 1\", \"actual\": \"ERR:below-min-note\", \"expected\": \"ERR:below-min-note\", \"passed\": true}, {\"check\": \"regression zero-dispense 2\", \"actual\": \"ERR:below-min-note\", \"expected\": \"ERR:below-min-note\", \"passed\": true}, {\"check\": \"control: yen notes\", \"actual\": [30000, 20319], \"expected\": [30000, 20319], \"passed\": true}, {\"check\": \"control: euro fives\", \"actual\": [5, 544], \"expected\": [5, 544], \"passed\": true}, {\"check\": \"control: exact multiple\", \"actual\": [100, 11170], \"expected\": [100, 11170], \"passed\": true}, {\"check\": \"control: big notes\", \"actual\": [1350000, 99816], \"expected\": [1350000, 99816], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}