FA-3236 / Markup / Open access
Namespace prefixes are treated as part of element identity · case 01
Namespace prefixes are treated as part of element identity.
ROOT CAUSE
The implementation applies an operation whose text or grammar semantics violate this contract: Return root element local name after expanded namespace resolution.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Return root element local name after expanded namespace resolution.
Unsuccessful approach: The attempted repair handles the primary example but still violates a separate boundary of the same contract.
Case contract
Return root element local name after expanded namespace resolution.
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 ET.fromstring(x).tag
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:x xmlns:a="urn:test"/>'), 'x')
check('boundary 2', solve('<x xmlns="urn:test"/>'), 'x')
check('boundary 3', solve('<plain/>'), 'plain')
check('boundary 4', solve('<a:b xmlns:a="urn:other"/>'), 'b')
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 | {urn:test}x | x | Failed |
| boundary 2 | {urn:test}x | x | Failed |
| boundary 3 | plain | plain | Passed |
| boundary 4 | {urn:other}b | b | Failed |
SHA-256 / e204fccd7ea160157c461b7e0d572c9da0f4e37141b4242417eba0c735a15310
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 ET.fromstring(x).tag.split(':')[-1]
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:x xmlns:a="urn:test"/>'), 'x')
check('boundary 2', solve('<x xmlns="urn:test"/>'), 'x')
check('boundary 3', solve('<plain/>'), 'plain')
check('boundary 4', solve('<a:b xmlns:a="urn:other"/>'), 'b')
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 | test}x | x | Failed |
| boundary 2 | test}x | x | Failed |
| boundary 3 | plain | plain | Passed |
| boundary 4 | other}b | b | Failed |
SHA-256 / 4bbbf4d77f4d3ec5cd0a576afb0f4d5612e35d3bd69109c6420d92a23317c522
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 ET.fromstring(x).tag.rsplit('}',1)[-1]
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:x xmlns:a="urn:test"/>'), 'x')
check('boundary 2', solve('<x xmlns="urn:test"/>'), 'x')
check('boundary 3', solve('<plain/>'), 'plain')
check('boundary 4', solve('<a:b xmlns:a="urn:other"/>'), 'b')
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 | x | x | Passed |
| boundary 2 | x | x | Passed |
| boundary 3 | plain | plain | Passed |
| boundary 4 | b | b | Passed |
SHA-256 / ce6198ba1ab4d2e567fe606bb7c4988525dfd4e007b8bf73ae8e8f9b615b0161
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:23.193249+00:00.
Case digest / 94032fd18cb14543a355222a32c104bcf91553b1371c5f04b8e48c5e0b956f4e