{"abstract":"Whitespace collapsing changes significant line boundaries.","category":"Text processing","checks":4,"contract":"Replace each run of ASCII spaces by one ASCII space; preserve tabs and newlines.","evaluation_group":"model-feb35ce8f2669fdd","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-collapse-ascii-spaces","id":"FA-3866","implementations":{"attempt":{"sha256":"f44e8b39ea934c841b55eb4326b194a328be591ff60af5ec48e728eb2083e1d7","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 re.sub(r'\\s+',' ',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('boundary 1', solve('a  b'), 'a b')\ncheck('boundary 2', solve(' a '), ' a ')\ncheck('boundary 3', solve('a\\nb'), 'a\\nb')\ncheck('boundary 4', solve('a\\tb'), 'a\\tb')\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":"796effd94758013883b40153564e4b6dde88c37ff84f6c9b670add4765b60b47","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 ' '.join(x.split())\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('boundary 1', solve('a  b'), 'a b')\ncheck('boundary 2', solve(' a '), ' a ')\ncheck('boundary 3', solve('a\\nb'), 'a\\nb')\ncheck('boundary 4', solve('a\\tb'), 'a\\tb')\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":"19336b3bb37dd09e132a329a10c894d847a827f6b52ab226a9b2c896ba285265","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 re.sub(' +',' ',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('boundary 1', solve('a  b'), 'a b')\ncheck('boundary 2', solve(' a '), ' a ')\ncheck('boundary 3', solve('a\\nb'), 'a\\nb')\ncheck('boundary 4', solve('a\\tb'), 'a\\tb')\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-collapse-ascii-spaces","generated_at":"2026-09-29T14:37:32.191934+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: Replace each run of ASCII spaces by one ASCII space; preserve tabs and newlines.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Replace each run of ASCII spaces by one ASCII space; preserve tabs and newlines.","sha256":"3d6b64a5807b9a70bacea95774a783e85353639451923588e7cda419cadcb818","title":"Whitespace collapsing changes significant line boundaries · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":60.45,"exit_code":1,"observations":[{"actual":"a b","check":"boundary 1","expected":"a b","passed":true},{"actual":" a ","check":"boundary 2","expected":" a ","passed":true},{"actual":"a b","check":"boundary 3","expected":"a\nb","passed":false},{"actual":"a b","check":"boundary 4","expected":"a\tb","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"a b\", \"expected\": \"a b\", \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": \" a \", \"expected\": \" a \", \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"a b\", \"expected\": \"a\\nb\", \"passed\": false}, {\"check\": \"boundary 4\", \"actual\": \"a b\", \"expected\": \"a\\tb\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":63.865,"exit_code":1,"observations":[{"actual":"a b","check":"boundary 1","expected":"a b","passed":true},{"actual":"a","check":"boundary 2","expected":" a ","passed":false},{"actual":"a b","check":"boundary 3","expected":"a\nb","passed":false},{"actual":"a b","check":"boundary 4","expected":"a\tb","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"a b\", \"expected\": \"a b\", \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": \"a\", \"expected\": \" a \", \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"a b\", \"expected\": \"a\\nb\", \"passed\": false}, {\"check\": \"boundary 4\", \"actual\": \"a b\", \"expected\": \"a\\tb\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":153.769,"exit_code":0,"observations":[{"actual":"a b","check":"boundary 1","expected":"a b","passed":true},{"actual":" a ","check":"boundary 2","expected":" a ","passed":true},{"actual":"a\nb","check":"boundary 3","expected":"a\nb","passed":true},{"actual":"a\tb","check":"boundary 4","expected":"a\tb","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": \"a b\", \"expected\": \"a b\", \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": \" a \", \"expected\": \" a \", \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"a\\nb\", \"expected\": \"a\\nb\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": \"a\\tb\", \"expected\": \"a\\tb\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}