FAILURE MAP
← Case archive

FA-3526 / Lexical grammars / Open access

An INI assignment incorrectly requires equals instead of colon · case 01

An INI assignment incorrectly requires equals instead of colon.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The recognizer uses '[A-Za-z_][A-Za-z0-9_]*=[^\\r\\n]*', 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 key followed by colon or equals and a single-line value, possibly empty.

Unsuccessful approach: The candidate grammar '[A-Za-z_][A-Za-z0-9_]*[:=][^\\r\\n]+' still disagrees with the explicit boundary fixtures.

Case contract

Accept ASCII key followed by colon or equals and a single-line value, possibly empty.

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_]*=[^\\r\\n]*',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:1'), True)
check('boundary 2', solve('a='), True)
check('boundary 3', solve('a=1'), True)
check('boundary 4', solve('a=1\n2'), 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 fixtureActualExpectedOutcome
boundary 1FalseTrueFailed
boundary 2TrueTruePassed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / 55aef464be5618485d6c77832aafb0369983b3975e16c6747ae03611041028ff

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-z_][A-Za-z0-9_]*[:=][^\\r\\n]+',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:1'), True)
check('boundary 2', solve('a='), True)
check('boundary 3', solve('a=1'), True)
check('boundary 4', solve('a=1\n2'), 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 fixtureActualExpectedOutcome
boundary 1TrueTruePassed
boundary 2FalseTrueFailed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / d599aede82c5424274c88eb15e2c6bc9df8f66c8faeaba90d207a19262cbff99

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_]*[:=][^\\r\\n]*',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:1'), True)
check('boundary 2', solve('a='), True)
check('boundary 3', solve('a=1'), True)
check('boundary 4', solve('a=1\n2'), 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 fixtureActualExpectedOutcome
boundary 1TrueTruePassed
boundary 2TrueTruePassed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / 1e51ee0cb9832d7671ee27307ad1a9593f28a05dad521380bb5381cce3955c18

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.134527+00:00.

Case digest / a86fab9d0dd02ad9fa1844ec171e68a58c86ac0aaeb100e0e9e61b6337fb4430