FA-3556 / Lexical grammars / Open access
A custom property omits its required double hyphen · case 01
A custom property omits its required double hyphen.
ROOT CAUSE
The recognizer uses '-?[A-Za-z_][A-Za-z0-9_-]*', which admits or omits a token shape forbidden by the stated grammar.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Accept -- followed by an ASCII letter or underscore and then letters/digits/underscore/hyphen.
Unsuccessful approach: The candidate grammar '--[A-Za-z0-9_-]+' still disagrees with the explicit boundary fixtures.
Case contract
Accept -- followed by an ASCII letter or underscore and then letters/digits/underscore/hyphen.
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-z_][A-Za-z0-9_-]*',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('--1'), False)
check('boundary 2', solve('-x'), False)
check('boundary 3', solve('--color'), True)
check('boundary 4', solve('--a-b2'), 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 | False | True | Failed |
| boundary 4 | False | True | Failed |
SHA-256 / 62b5d75b550626968838ce67aaea55b548a37780d182c5f5885d814f1e2da79b
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_-]+',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('--1'), False)
check('boundary 2', solve('-x'), False)
check('boundary 3', solve('--color'), True)
check('boundary 4', solve('--a-b2'), 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 | False | False | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | True | True | Passed |
SHA-256 / 560e579edf539d70e1d54a79ce23194f342d07fa50e9dc56b8306fff24510c88
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-z_][A-Za-z0-9_-]*',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('--1'), False)
check('boundary 2', solve('-x'), False)
check('boundary 3', solve('--color'), True)
check('boundary 4', solve('--a-b2'), 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 / 1761c379faa9080afd7f8d6dd918f8818d25ad3417f4ee7f674efc2dffc68f98
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.443417+00:00.
Case digest / 70d4ac63e9b443f0d8692b6852b0eed1cef1622b887c98e42b4a8ce6b8164ba3