{"abstract":"A value specified as a decimal rounds below the required half-up result.","category":"Numerics","checks":3,"contract":"Parse the decimal string directly and apply the explicit half-up rule.","evaluation_group":"model-a70522958bb0dbed","failed_approach":"Converting a float to Decimal preserves the earlier representation error.","family":"decimal-rounding","id":"FA-021","implementations":{"attempt":{"sha256":"7c693e18c17c163694f95707994f280f5266a6a3c1bd1aa99f6fb62397ea0faf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_UP\nN = 1\nobservations = []\ndef solve(value):\n    return str(Decimal(float(value)).quantize(Decimal('0.01'), rounding=ROUND_HALF_UP))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('decimal midpoint', solve('1.005'), '1.01')\ncheck('another midpoint', solve('2.675'), '2.68')\ncheck('whole value', solve(str(N)), f'{N}.00')\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":"5633b9f12e2a24bf8ec5fb4190f2634e040ca3a94ed3bb4391b14cf7736a8feb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_UP\nN = 1\nobservations = []\ndef solve(value):\n    return format(round(float(value), 2), '.2f')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('decimal midpoint', solve('1.005'), '1.01')\ncheck('another midpoint', solve('2.675'), '2.68')\ncheck('whole value', solve(str(N)), f'{N}.00')\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":"29a9d25ae0a9505cdd0d574153dbe0a0c2e0d7e940cd070be0b6504b2a6301c6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom decimal import Decimal, ROUND_HALF_UP\nN = 1\nobservations = []\ndef solve(value):\n    return str(Decimal(value).quantize(Decimal('0.01'), rounding=ROUND_HALF_UP))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('decimal midpoint', solve('1.005'), '1.01')\ncheck('another midpoint', solve('2.675'), '2.68')\ncheck('whole value', solve(str(N)), f'{N}.00')\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":" 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":"decimal-rounding","generated_at":"2026-09-29T14:36:49.868832+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A compact reasoning and repair task with executable evidence.","repair":"Parse the decimal string directly and apply the explicit half-up rule.","root_cause":"Converting through binary floating point changes the value before rounding.","sha256":"4841f5465756b6c2031f4d88cd0db40c73962807ec2e1f25caff6c106bdc4a7a","title":"A decimal halfway value rounds downward · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":36.329,"exit_code":1,"observations":[{"actual":"1.00","check":"decimal midpoint","expected":"1.01","passed":false},{"actual":"2.67","check":"another midpoint","expected":"2.68","passed":false},{"actual":"1.00","check":"whole value","expected":"1.00","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal midpoint\", \"actual\": \"1.00\", \"expected\": \"1.01\", \"passed\": false}, {\"check\": \"another midpoint\", \"actual\": \"2.67\", \"expected\": \"2.68\", \"passed\": false}, {\"check\": \"whole value\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.289,"exit_code":1,"observations":[{"actual":"1.00","check":"decimal midpoint","expected":"1.01","passed":false},{"actual":"2.67","check":"another midpoint","expected":"2.68","passed":false},{"actual":"1.00","check":"whole value","expected":"1.00","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal midpoint\", \"actual\": \"1.00\", \"expected\": \"1.01\", \"passed\": false}, {\"check\": \"another midpoint\", \"actual\": \"2.67\", \"expected\": \"2.68\", \"passed\": false}, {\"check\": \"whole value\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":33.922,"exit_code":0,"observations":[{"actual":"1.01","check":"decimal midpoint","expected":"1.01","passed":true},{"actual":"2.68","check":"another midpoint","expected":"2.68","passed":true},{"actual":"1.00","check":"whole value","expected":"1.00","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal midpoint\", \"actual\": \"1.01\", \"expected\": \"1.01\", \"passed\": true}, {\"check\": \"another midpoint\", \"actual\": \"2.68\", \"expected\": \"2.68\", \"passed\": true}, {\"check\": \"whole value\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}