FA-3411 / Lexical grammars / Open access
A byte address mixes colon and hyphen separators · case 01
A byte address mixes colon and hyphen separators.
ROOT CAUSE
The recognizer uses '(?:[0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}', which admits or omits a token shape forbidden by the stated grammar.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Accept six hex octets separated consistently by colons or consistently by hyphens.
Unsuccessful approach: The candidate grammar '(?:[0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}' still disagrees with the explicit boundary fixtures.
Case contract
Accept six hex octets separated consistently by colons or consistently by hyphens.
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('(?:[0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}',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('aa:bb-cc:dd:ee:ff'), False)
check('boundary 2', solve('aa-bb-cc-dd-ee-ff'), True)
check('boundary 3', solve('00:11:22:33:44:55'), True)
check('boundary 4', solve('a:b:c:d:e:f'), 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 | False | Failed |
| boundary 2 | True | True | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / 0adf492d5345ffafe995529d0477757899c2d57674b55ddff45d7f1d6bc95fed
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('(?:[0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}',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('aa:bb-cc:dd:ee:ff'), False)
check('boundary 2', solve('aa-bb-cc-dd-ee-ff'), True)
check('boundary 3', solve('00:11:22:33:44:55'), True)
check('boundary 4', solve('a:b:c:d:e:f'), 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 | False | Passed |
| boundary 2 | False | True | Failed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / 485fc321717c282400b05f8153cae19be4245dc4fc045f65bb051d1ff412a52d
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('[0-9A-Fa-f]{2}([:-])(?:[0-9A-Fa-f]{2}\\1){4}[0-9A-Fa-f]{2}',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('aa:bb-cc:dd:ee:ff'), False)
check('boundary 2', solve('aa-bb-cc-dd-ee-ff'), True)
check('boundary 3', solve('00:11:22:33:44:55'), True)
check('boundary 4', solve('a:b:c:d:e:f'), 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 | False | Passed |
| boundary 2 | True | True | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / 9838c5a2c961c7f3478067c7946b4dee0fe25f4ec539c3bdce76b87f880378dc
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:25.437595+00:00.
Case digest / dac3b88e621f21d91a82295f49f577f7440d8a591a1dc21bb7bddac357c83e50