{"abstract":"Nonstandard numeric constants enter a JSON document.","category":"Serialization","checks":4,"contract":"Decode JSON and reject NaN or Infinity anywhere by returning None.","evaluation_group":"model-8635fa01919520cf","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-json-finite-number","id":"FA-3156","implementations":{"attempt":{"sha256":"301f46bd811a632e534c9817d3f63aa5f1aa30a5edff2e5094649bb91e8d69b7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        return None if 'NaN' in x else json.loads(x)\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('NaN rejected', solve('NaN') is None, True)\ncheck('nested Infinity rejected', solve('[Infinity]') is None, True)\ncheck('boundary 3', solve('\"NaN\"'), 'NaN')\ncheck('boundary 4', solve('[1]'), [1])\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":"079310894f3ac2682f7a513516d8282773c6368621a47a66a3bbf3c3d297e9ee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        return json.loads(x)\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('NaN rejected', solve('NaN') is None, True)\ncheck('nested Infinity rejected', solve('[Infinity]') is None, True)\ncheck('boundary 3', solve('\"NaN\"'), 'NaN')\ncheck('boundary 4', solve('[1]'), [1])\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":"c728a9e5df80c9e6acdf618278d9fa1b6f6ca542f9d73269f406869d918371b7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        try:\n            return json.loads(x,parse_constant=lambda v: (_ for _ in ()).throw(ValueError(v)))\n        except ValueError:\n            return None\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('NaN rejected', solve('NaN') is None, True)\ncheck('nested Infinity rejected', solve('[Infinity]') is None, True)\ncheck('boundary 3', solve('\"NaN\"'), 'NaN')\ncheck('boundary 4', solve('[1]'), [1])\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":"xp-json-finite-number","generated_at":"2026-09-29T14:37:22.196879+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.","repair":"Implement the complete stated contract, including the boundary fixtures: Decode JSON and reject NaN or Infinity anywhere by returning None.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Decode JSON and reject NaN or Infinity anywhere by returning None.","sha256":"2c98be75937c306799a7c7bf3d8970adb9a9763fb4d0dab67e293a4730547edf","title":"Nonstandard numeric constants enter a JSON document · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":54.259,"exit_code":1,"observations":[{"actual":true,"check":"NaN rejected","expected":true,"passed":true},{"actual":false,"check":"nested Infinity rejected","expected":true,"passed":false},{"actual":null,"check":"boundary 3","expected":"NaN","passed":false},{"actual":[1],"check":"boundary 4","expected":[1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"NaN rejected\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"nested Infinity rejected\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": null, \"expected\": \"NaN\", \"passed\": false}, {\"check\": \"boundary 4\", \"actual\": [1], \"expected\": [1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":55.158,"exit_code":1,"observations":[{"actual":false,"check":"NaN rejected","expected":true,"passed":false},{"actual":false,"check":"nested Infinity rejected","expected":true,"passed":false},{"actual":"NaN","check":"boundary 3","expected":"NaN","passed":true},{"actual":[1],"check":"boundary 4","expected":[1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"NaN rejected\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"nested Infinity rejected\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"NaN\", \"expected\": \"NaN\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [1], \"expected\": [1], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":55.85,"exit_code":0,"observations":[{"actual":true,"check":"NaN rejected","expected":true,"passed":true},{"actual":true,"check":"nested Infinity rejected","expected":true,"passed":true},{"actual":"NaN","check":"boundary 3","expected":"NaN","passed":true},{"actual":[1],"check":"boundary 4","expected":[1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"NaN rejected\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"nested Infinity rejected\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"NaN\", \"expected\": \"NaN\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [1], \"expected\": [1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}