FA-3566 / Lexical grammars / Open access
A priority marker rejects allowed internal whitespace · case 01
A priority marker rejects allowed internal whitespace.
ROOT CAUSE
The recognizer uses '!important', which admits or omits a token shape forbidden by the stated grammar.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Accept exclamation, optional ASCII whitespace, and lowercase important.
Unsuccessful approach: The candidate grammar '! *important' still disagrees with the explicit boundary fixtures.
Case contract
Accept exclamation, optional ASCII whitespace, and lowercase important.
Why this case matters
A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap
N = 1
observations = []
def solve(x):
try:
return bool(re.fullmatch('!important',x))
except Exception as exc:
return {"error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('!\timportant'), True)
check('boundary 2', solve('! important'), True)
check('boundary 3', solve('!important'), True)
check('boundary 4', solve('important'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary 1 | False | True | Failed |
| boundary 2 | False | True | Failed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / 378049a48807a8c1b6cfef5249abd6818e394ca5b4df69287fc1438396889d54
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap
N = 1
observations = []
def solve(x):
try:
return bool(re.fullmatch('! *important',x))
except Exception as exc:
return {"error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('!\timportant'), True)
check('boundary 2', solve('! important'), True)
check('boundary 3', solve('!important'), True)
check('boundary 4', solve('important'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary 1 | False | True | Failed |
| boundary 2 | True | True | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / 2537a3e86e34c3cf1896309fd286c37977be362513d78d9adf4e7645e1f97641
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap
N = 1
observations = []
def solve(x):
try:
return bool(re.fullmatch('![ \\t\\r\\n]*important',x))
except Exception as exc:
return {"error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('!\timportant'), True)
check('boundary 2', solve('! important'), True)
check('boundary 3', solve('!important'), True)
check('boundary 4', solve('important'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary 1 | True | True | Passed |
| boundary 2 | True | True | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / 1a7e6a1c3c1e10cf915f2db24685e513ab034d9366384dfe661c70e13aa44547
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:37:27.603289+00:00.
Case digest / 298de8b4c9382c688ab10b2917f1614ebfcff0c1a172ff38b63ce8ce1ddef2da