{"abstract":"Old balances lose up to one new minor unit, and debts shrink toward zero.","category":"Currency rounding and FX conversion","checks":7,"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":"Rounding toward positive infinity over-credits positive balances and under-states debts.","family":"w2-currency_rounding_and_fx_conversion-currency-redenomination-redenomination-rounding","id":"FA-62246","implementations":{"attempt":{"sha256":"cc548e1e0cd3006df319f5507c3ad8f83ba82bcf545d621f01b0475be48f711d","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) ** (new_exp - old_exp)\n    return [int(v.quantize(Decimal(1), rounding=ROUND_CEILING)), 'converted']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression redenomination-rounding 1', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted']),\n  ('regression redenomination-rounding 2', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('partial repair guard 2', (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: 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  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native'])],\n [('regression redenomination-rounding 1', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted']),\n  ('regression redenomination-rounding 2', (8690380, '2026-05-13', '2026-07-01', 100, 2, 2), [86904, 'converted']),\n  ('partial repair guard 1', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('partial repair guard 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: 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: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted'])],\n [('regression redenomination-rounding 1', (15980147, '2026-05-22', '2026-07-15', 10000, 0, 3), [1598015, 'converted']),\n  ('regression redenomination-rounding 2', (13003559, '2026-07-14', '2026-07-20', 10000, 2, 3), [13004, 'converted']),\n  ('partial repair guard 1', (10748129, '2026-07-06', '2026-07-20', 10000, 0, 2), [107481, 'converted']),\n  ('partial repair guard 2', (8329740, '2026-05-01', '2026-07-20', 100, 2, 2), [83297, '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 redenomination-rounding 1', (8481473, '2026-05-16', '2026-07-15', 10000, 0, 2), [84815, 'converted']),\n  ('regression redenomination-rounding 2', (21804659, '2026-05-04', '2026-07-15', 100, 0, 0), [218047, 'converted']),\n  ('partial repair guard 1', (3215020, '2026-06-17', '2026-07-15', 1000, 0, 0), [3215, 'converted']),\n  ('partial repair guard 2', (21342190, '2026-05-23', '2026-07-15', 10000, 0, 0), [2134, '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 redenomination-rounding 1', (20559948, '2026-07-01', '2026-07-20', 10000, 0, 3), [2055995, 'converted']),\n  ('regression redenomination-rounding 2', (4665955, '2026-06-23', '2026-07-20', 10000, 0, 0), [467, 'converted']),\n  ('partial repair guard 1', (1650321, '2026-06-28', '2026-07-15', 10000, 0, 3), [165032, 'converted']),\n  ('partial repair guard 2', (-1534046, '2026-05-28', '2026-07-20', 10000, 0, 3), [-153405, '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":"9ab22fc24ffce2c800c154e0b8f9c64239d5536fc3653450fa0a1d9cc2d1bb6b","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) ** (new_exp - old_exp)\n    return [int(v), 'converted']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression redenomination-rounding 1', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted']),\n  ('regression redenomination-rounding 2', (1234567, '2025-12-31', '2026-01-01', 1000, 0, 2), [123457, 'converted']),\n  ('partial repair guard 2', (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: 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  ('control: after', (77, '2027-01-01', '2026-07-01', 10000, 2, 2), [77, 'native'])],\n [('regression redenomination-rounding 1', (99999, '2026-07-15', '2026-07-20', 100, 2, 2), [1000, 'converted']),\n  ('regression redenomination-rounding 2', (8690380, '2026-05-13', '2026-07-01', 100, 2, 2), [86904, 'converted']),\n  ('partial repair guard 1', (1234567, '2026-06-30', '2026-07-01', 10000, 2, 2), [123, 'converted']),\n  ('partial repair guard 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: 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: negative tie', (-15000, '2026-01-01', '2026-07-01', 10000, 2, 2), [-2, 'converted'])],\n [('regression redenomination-rounding 1', (15980147, '2026-05-22', '2026-07-15', 10000, 0, 3), [1598015, 'converted']),\n  ('regression redenomination-rounding 2', (13003559, '2026-07-14', '2026-07-20', 10000, 2, 3), [13004, 'converted']),\n  ('partial repair guard 1', (10748129, '2026-07-06', '2026-07-20', 10000, 0, 2), [107481, 'converted']),\n  ('partial repair guard 2', (8329740, '2026-05-01', '2026-07-20', 100, 2, 2), [83297, '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 redenomination-rounding 1', (8481473, '2026-05-16', '2026-07-15', 10000, 0, 2), [84815, 'converted']),\n  ('regression redenomination-rounding 2', (21804659, '2026-05-04', '2026-07-15', 100, 0, 0), [218047, 'converted']),\n  ('partial repair guard 1', (3215020, '2026-06-17', '2026-07-15', 1000, 0, 0), [3215, 'converted']),\n  ('partial repair guard 2', (21342190, '2026-05-23', '2026-07-15', 10000, 0, 0), [2134, '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 redenomination-rounding 1', (20559948, '2026-07-01', '2026-07-20', 10000, 0, 3), [2055995, 'converted']),\n  ('regression redenomination-rounding 2', (4665955, '2026-06-23', '2026-07-20', 10000, 0, 0), [467, 'converted']),\n  ('partial repair guard 1', (1650321, '2026-06-28', '2026-07-15', 10000, 0, 3), [165032, 'converted']),\n  ('partial repair guard 2', (-1534046, '2026-05-28', '2026-07-20', 10000, 0, 3), [-153405, '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-redenomination-rounding","generated_at":"2026-09-29T14:47:02.774382+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":"int(v) truncates instead of rounding half away from zero.","sha256":"9ae27472839bd7023924575ff3f9358147510edcdb989d17094f8dd3f644e683","title":"Redenominated amounts are truncated · 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.11,"exit_code":1,"observations":[{"actual":[-1,"converted"],"check":"regression redenomination-rounding 1","expected":[-2,"converted"],"passed":false},{"actual":[123457,"converted"],"check":"regression redenomination-rounding 2","expected":[123457,"converted"],"passed":true},{"actual":[1,"converted"],"check":"partial repair guard 2","expected":[0,"converted"],"passed":false},{"actual":[124,"converted"],"check":"control: before cutover","expected":[123,"converted"],"passed":false},{"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},{"actual":[77,"native"],"check":"control: after","expected":[77,"native"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression redenomination-rounding 1\", \"actual\": [-1, \"converted\"], \"expected\": [-2, \"converted\"], \"passed\": false}, {\"check\": \"regression redenomination-rounding 2\", \"actual\": [123457, \"converted\"], \"expected\": [123457, \"converted\"], \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": [1, \"converted\"], \"expected\": [0, \"converted\"], \"passed\": false}, {\"check\": \"control: before cutover\", \"actual\": [124, \"converted\"], \"expected\": [123, \"converted\"], \"passed\": false}, {\"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}, {\"check\": \"control: after\", \"actual\": [77, \"native\"], \"expected\": [77, \"native\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.976,"exit_code":1,"observations":[{"actual":[-1,"converted"],"check":"regression redenomination-rounding 1","expected":[-2,"converted"],"passed":false},{"actual":[123456,"converted"],"check":"regression redenomination-rounding 2","expected":[123457,"converted"],"passed":false},{"actual":[0,"converted"],"check":"partial repair guard 2","expected":[0,"converted"],"passed":true},{"actual":[123,"converted"],"check":"control: before cutover","expected":[123,"converted"],"passed":true},{"actual":[500,"native"],"check":"control: cutover day","expected":[500,"native"],"passed":true},{"actual":[999,"converted"],"check":"control: same month earlier","expected":[1000,"converted"],"passed":false},{"actual":[77,"native"],"check":"control: after","expected":[77,"native"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression redenomination-rounding 1\", \"actual\": [-1, \"converted\"], \"expected\": [-2, \"converted\"], \"passed\": false}, {\"check\": \"regression redenomination-rounding 2\", \"actual\": [123456, \"converted\"], \"expected\": [123457, \"converted\"], \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": [0, \"converted\"], \"expected\": [0, \"converted\"], \"passed\": true}, {\"check\": \"control: before cutover\", \"actual\": [123, \"converted\"], \"expected\": [123, \"converted\"], \"passed\": true}, {\"check\": \"control: cutover day\", \"actual\": [500, \"native\"], \"expected\": [500, \"native\"], \"passed\": true}, {\"check\": \"control: same month earlier\", \"actual\": [999, \"converted\"], \"expected\": [1000, \"converted\"], \"passed\": false}, {\"check\": \"control: after\", \"actual\": [77, \"native\"], \"expected\": [77, \"native\"], \"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."}}