{"abstract":"A zero-decimal legacy currency converted into a two-decimal currency is a hundred times too small.","category":"Currency rounding and FX conversion","checks":6,"contract":"solve(amount_minor, date, cutover, factor, old_exp, new_exp): amounts dated on or after the cutover (ISO date strings) are already in the new currency and returned unchanged as [amount_minor, 'native']. Earlier amounts are old-currency minor units: new = amount_minor / factor * 10**(new_exp - old_exp), rounded half away from zero, returned as [new, 'converted']. factor is old units per new unit.","contract_signature":"amount_minor, date, cutover, factor, old_exp, new_exp","evaluation_group":"w2-currency_rounding_and_fx_conversion-currency-redenomination","failed_approach":"Rescaling by 10**(old_exp - new_exp) inverts the adjustment.","family":"w2-currency_rounding_and_fx_conversion-currency-redenomination-exponent-change","id":"FA-62241","implementations":{"attempt":{"sha256":"bdb5ce3ea346b96ca805d70f3c0c1575f7a41519e9ed2bf40337c0f9741f48c8","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(amount_minor, date, cutover, factor, old_exp, new_exp):\n    if date >= cutover: return [amount_minor, 'native']\n    v = Decimal(amount_minor) / factor * Decimal(10) ** (old_exp - new_exp)\n    return [int(v.quantize(Decimal(1), rounding=ROUND_HALF_UP)), 'converted']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression exponent-change 1', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('regression exponent-change 2', (-2744763, '2026-06-01', '2026-07-01', 100, 2, 3), [-274476, 'converted']),\n  ('control: before cutover', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('control: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted']),\n  ('control: cutover day', (500, '2026-07-01', '2026-07-01', 10000, 2, 2), [500, 'native']),\n  ('control: same month earlier', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted'])],\n [('regression exponent-change 1', (15980147, '2026-05-22', '2026-07-15', 10000, 0, 3), [1598015, 'converted']),\n  ('regression exponent-change 2', (13591002, '2026-07-05', '2026-07-15', 1000, 2, 3), [135910, 'converted']),\n  ('control: exponent gain', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('control: same month earlier', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted']),\n  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native']),\n  ('control: small old amount', (4999, '2026-06-01', '2026-07-01', 10000, 2, 2), [0, 'converted'])],\n [('regression exponent-change 1', (10748129, '2026-07-06', '2026-07-20', 10000, 0, 2), [107481, 'converted']),\n  ('regression exponent-change 2', (13003559, '2026-07-14', '2026-07-20', 10000, 2, 3), [13004, 'converted']),\n  ('control: small old amount', (4999, '2026-06-01', '2026-07-01', 10000, 2, 2), [0, 'converted']),\n  ('control: before cutover', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('control: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted']),\n  ('control: cutover day', (500, '2026-07-01', '2026-07-01', 10000, 2, 2), [500, 'native'])],\n [('regression exponent-change 1', (1650321, '2026-06-28', '2026-07-15', 10000, 0, 3), [165032, 'converted']),\n  ('regression exponent-change 2', (8481473, '2026-05-16', '2026-07-15', 10000, 0, 2), [84815, 'converted']),\n  ('control: cutover day', (500, '2026-07-01', '2026-07-01', 10000, 2, 2), [500, 'native']),\n  ('control: exponent gain', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('control: same month earlier', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted']),\n  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native'])],\n [('regression exponent-change 1', (20559948, '2026-07-01', '2026-07-20', 10000, 0, 3), [2055995, 'converted']),\n  ('regression exponent-change 2', (9508148, '2026-07-07', '2026-07-20', 1000, 0, 3), [9508148, 'converted']),\n  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native']),\n  ('control: small old amount', (4999, '2026-06-01', '2026-07-01', 10000, 2, 2), [0, 'converted']),\n  ('control: before cutover', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('control: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted'])]]\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":"ad36bab2479de417964ae006878bf7a992450b6cb51c8faa308b82cd3798b341","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(amount_minor, date, cutover, factor, old_exp, new_exp):\n    if date >= cutover: return [amount_minor, 'native']\n    v = Decimal(amount_minor) / factor * 1\n    return [int(v.quantize(Decimal(1), rounding=ROUND_HALF_UP)), 'converted']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression exponent-change 1', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('regression exponent-change 2', (-2744763, '2026-06-01', '2026-07-01', 100, 2, 3), [-274476, 'converted']),\n  ('control: before cutover', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('control: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted']),\n  ('control: cutover day', (500, '2026-07-01', '2026-07-01', 10000, 2, 2), [500, 'native']),\n  ('control: same month earlier', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted'])],\n [('regression exponent-change 1', (15980147, '2026-05-22', '2026-07-15', 10000, 0, 3), [1598015, 'converted']),\n  ('regression exponent-change 2', (13591002, '2026-07-05', '2026-07-15', 1000, 2, 3), [135910, 'converted']),\n  ('control: exponent gain', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('control: same month earlier', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted']),\n  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native']),\n  ('control: small old amount', (4999, '2026-06-01', '2026-07-01', 10000, 2, 2), [0, 'converted'])],\n [('regression exponent-change 1', (10748129, '2026-07-06', '2026-07-20', 10000, 0, 2), [107481, 'converted']),\n  ('regression exponent-change 2', (13003559, '2026-07-14', '2026-07-20', 10000, 2, 3), [13004, 'converted']),\n  ('control: small old amount', (4999, '2026-06-01', '2026-07-01', 10000, 2, 2), [0, 'converted']),\n  ('control: before cutover', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('control: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted']),\n  ('control: cutover day', (500, '2026-07-01', '2026-07-01', 10000, 2, 2), [500, 'native'])],\n [('regression exponent-change 1', (1650321, '2026-06-28', '2026-07-15', 10000, 0, 3), [165032, 'converted']),\n  ('regression exponent-change 2', (8481473, '2026-05-16', '2026-07-15', 10000, 0, 2), [84815, 'converted']),\n  ('control: cutover day', (500, '2026-07-01', '2026-07-01', 10000, 2, 2), [500, 'native']),\n  ('control: exponent gain', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('control: same month earlier', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted']),\n  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native'])],\n [('regression exponent-change 1', (20559948, '2026-07-01', '2026-07-20', 10000, 0, 3), [2055995, 'converted']),\n  ('regression exponent-change 2', (9508148, '2026-07-07', '2026-07-20', 1000, 0, 3), [9508148, 'converted']),\n  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native']),\n  ('control: small old amount', (4999, '2026-06-01', '2026-07-01', 10000, 2, 2), [0, 'converted']),\n  ('control: before cutover', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('control: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted'])]]\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-currency-redenomination-exponent-change","generated_at":"2026-09-29T14:47:02.743781+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.","root_cause":"The factor 10**(new_exp - old_exp) is omitted.","sha256":"88cb4f41b73a4254f858753d227d4f4af66284d168c906974bd79f9690a894fa","title":"Redenomination ignores a change in minor-unit exponent · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.349,"exit_code":1,"observations":[{"actual":[12,"converted"],"check":"regression exponent-change 1","expected":[123457,"converted"],"passed":false},{"actual":[-2745,"converted"],"check":"regression exponent-change 2","expected":[-274476,"converted"],"passed":false},{"actual":[123,"converted"],"check":"control: before cutover","expected":[123,"converted"],"passed":true},{"actual":[-2,"converted"],"check":"control: negative tie","expected":[-2,"converted"],"passed":true},{"actual":[500,"native"],"check":"control: cutover day","expected":[500,"native"],"passed":true},{"actual":[1000,"converted"],"check":"control: same month earlier","expected":[1000,"converted"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression exponent-change 1\", \"actual\": [12, \"converted\"], \"expected\": [123457, \"converted\"], \"passed\": false}, {\"check\": \"regression exponent-change 2\", \"actual\": [-2745, \"converted\"], \"expected\": [-274476, \"converted\"], \"passed\": false}, {\"check\": \"control: before cutover\", \"actual\": [123, \"converted\"], \"expected\": [123, \"converted\"], \"passed\": true}, {\"check\": \"control: negative tie\", \"actual\": [-2, \"converted\"], \"expected\": [-2, \"converted\"], \"passed\": true}, {\"check\": \"control: cutover day\", \"actual\": [500, \"native\"], \"expected\": [500, \"native\"], \"passed\": true}, {\"check\": \"control: same month earlier\", \"actual\": [1000, \"converted\"], \"expected\": [1000, \"converted\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.131,"exit_code":1,"observations":[{"actual":[1235,"converted"],"check":"regression exponent-change 1","expected":[123457,"converted"],"passed":false},{"actual":[-27448,"converted"],"check":"regression exponent-change 2","expected":[-274476,"converted"],"passed":false},{"actual":[123,"converted"],"check":"control: before cutover","expected":[123,"converted"],"passed":true},{"actual":[-2,"converted"],"check":"control: negative tie","expected":[-2,"converted"],"passed":true},{"actual":[500,"native"],"check":"control: cutover day","expected":[500,"native"],"passed":true},{"actual":[1000,"converted"],"check":"control: same month earlier","expected":[1000,"converted"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression exponent-change 1\", \"actual\": [1235, \"converted\"], \"expected\": [123457, \"converted\"], \"passed\": false}, {\"check\": \"regression exponent-change 2\", \"actual\": [-27448, \"converted\"], \"expected\": [-274476, \"converted\"], \"passed\": false}, {\"check\": \"control: before cutover\", \"actual\": [123, \"converted\"], \"expected\": [123, \"converted\"], \"passed\": true}, {\"check\": \"control: negative tie\", \"actual\": [-2, \"converted\"], \"expected\": [-2, \"converted\"], \"passed\": true}, {\"check\": \"control: cutover day\", \"actual\": [500, \"native\"], \"expected\": [500, \"native\"], \"passed\": true}, {\"check\": \"control: same month earlier\", \"actual\": [1000, \"converted\"], \"expected\": [1000, \"converted\"], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}