FA-3581 / Lexical grammars / Open access
A simplified mailbox has empty dot-separated local segments · case 01
A simplified mailbox has empty dot-separated local segments.
ROOT CAUSE
The recognizer uses '[A-Za-z0-9.]+@[A-Za-z.]+', which admits or omits a token shape forbidden by the stated grammar.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Accept ASCII alphanumeric local segments separated by dots, @, then letter-only dot-separated domain labels.
Unsuccessful approach: The candidate grammar '[A-Za-z0-9]+(?:\\.[A-Za-z0-9]+)*@[A-Za-z.]+' still disagrees with the explicit boundary fixtures.
Case contract
Accept ASCII alphanumeric local segments separated by dots, @, then letter-only dot-separated domain labels.
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('[A-Za-z0-9.]+@[A-Za-z.]+',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('a..b@example.com'), False)
check('boundary 2', solve('a@example..com'), False)
check('boundary 3', solve('a.b@example.com'), True)
check('boundary 4', solve('a@x.y'), True)
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 | False | Failed |
| boundary 2 | True | False | Failed |
| boundary 3 | True | True | Passed |
| boundary 4 | True | True | Passed |
SHA-256 / eedfc01d3810bae286521148dc4c51825e3bac213ec3bada7679bff793407b6d
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('[A-Za-z0-9]+(?:\\.[A-Za-z0-9]+)*@[A-Za-z.]+',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('a..b@example.com'), False)
check('boundary 2', solve('a@example..com'), False)
check('boundary 3', solve('a.b@example.com'), True)
check('boundary 4', solve('a@x.y'), True)
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 | False | Passed |
| boundary 2 | True | False | Failed |
| boundary 3 | True | True | Passed |
| boundary 4 | True | True | Passed |
SHA-256 / 82c508a7f697fa55995765e0f2db6832684f6d172ae9d1683e00d510035163c1
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('[A-Za-z0-9]+(?:\\.[A-Za-z0-9]+)*@[A-Za-z]+(?:\\.[A-Za-z]+)+',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('a..b@example.com'), False)
check('boundary 2', solve('a@example..com'), False)
check('boundary 3', solve('a.b@example.com'), True)
check('boundary 4', solve('a@x.y'), True)
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 | False | Passed |
| boundary 2 | False | False | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | True | True | Passed |
SHA-256 / 5f11bef7e98d2434ab3cd3f8b1c85d69f800e9f42701f53b048d6934af61e0e8
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:28.020172+00:00.
Case digest / 095f776964e0ef729687601fc0b44679e23d5ee05dffa751950aeeb4aa1cfcde