FA-3386 / Lexical grammars / Open access
An explicit octal literal uses legacy leading-zero syntax · case 01
An explicit octal literal uses legacy leading-zero syntax.
ROOT CAUSE
The recognizer uses '0[0-7]+', which admits or omits a token shape forbidden by the stated grammar.
THE FAILURE
The recognizer uses '0[0-7]+', which admits or omits a token shape forbidden by the stated grammar.
Unsuccessful approach: The candidate grammar '0o[0-9]+' still disagrees with the explicit boundary fixtures.
Case contract
Accept 0o followed by one or more digits 0 through 7.
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[0-7]+',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('075'), False)
check('boundary 2', solve('0o8'), False)
check('boundary 3', solve('0o755'), True)
check('boundary 4', solve('0o0'), 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 | False | True | Failed |
| boundary 4 | False | True | Failed |
SHA-256 / a216448f063e8711ad6dd5c80d2963c0664400b75b217d50bdc81403ca984c0a
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('0o[0-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('075'), False)
check('boundary 2', solve('0o8'), False)
check('boundary 3', solve('0o755'), True)
check('boundary 4', solve('0o0'), 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 / 2856e03275bfd81e19ab00fd9da5a734c0016b4b48b86d7ded9734274684503b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.196674+00:00.
Case digest / 95c25af655edb1cb50cc26518158f2643b8fd08130e6ac94fa5ceb5186b31d3b