FA-47571 / Delimited text / Open access
A blank leaf is converted into a group-only column · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
A missing leaf is synthesized instead of reported as an invalid header.
VERIFIED REPAIR
Preserve the named invariant at the faulty decision: if not leaf: return None
Unsuccessful approach: A placeholder still invents schema absent from the input.
Case contract
Combine two tab-delimited header rows. Blank upper cells inherit the nearest upper label to their left; an initial blank upper label rejects. Lower labels never inherit and must be nonempty. Return unique dotted paths, preserving order. Widths must match.
Why this case matters
Delimited interchange needs explicit framing, schema and field semantics at ingestion and emission boundaries.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
def _vary(value):
if value == '@END': return 3 + 4*N
if isinstance(value, str): return value.replace('@', 'cell' * N)
if isinstance(value, list): return [_vary(x) for x in value]
if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}
return value
N = 1
observations = []
def solve(data):
upper, lower = [x.split('\t') for x in data]
if len(upper) != len(lower): return None
paths, parent = [], None
for top, leaf in zip(upper, lower):
if top: parent = top
if parent is None: return None
if not leaf: leaf = parent
path = parent + '.' + leaf
if path in paths: return None
paths.append(path)
return paths
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('inherit', solve(_vary(['group\t\tother', '@\tb\tc'])), _vary(['group.@', 'group.b', 'other.c']))
check('initial blank', solve(_vary(['\tgroup', 'a\tb'])), _vary(None))
check('empty leaf', solve(_vary(['group\t', 'a\t'])), _vary(None))
check('duplicate path', solve(_vary(['group\t', 'a\ta'])), _vary(None))
check('unequal', solve(_vary(['group', 'a\tb'])), _vary(None))
check('same leaf new parent', solve(_vary(['x\ty', 'a\ta'])), _vary(['x.a', 'y.a']))
check('normal', solve(_vary(['@', 'a'])), _vary(['@.a']))
check('replace parent', solve(_vary(['x\ty\t', 'a\tb\tc'])), _vary(['x.a', 'y.b', 'y.c']))
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 |
|---|---|---|---|
| inherit | ['group.cell', 'group.b', 'other.c'] | ['group.cell', 'group.b', 'other.c'] | Passed |
| initial blank | None | None | Passed |
| empty leaf | ['group.a', 'group.group'] | None | Failed |
| duplicate path | None | None | Passed |
| unequal | None | None | Passed |
| same leaf new parent | ['x.a', 'y.a'] | ['x.a', 'y.a'] | Passed |
| normal | ['cell.a'] | ['cell.a'] | Passed |
| replace parent | ['x.a', 'y.b', 'y.c'] | ['x.a', 'y.b', 'y.c'] | Passed |
SHA-256 / 528c992050542575886bb9c4b9210118a93dab3f46226bf2ac57a5ee67f980b4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
def _vary(value):
if value == '@END': return 3 + 4*N
if isinstance(value, str): return value.replace('@', 'cell' * N)
if isinstance(value, list): return [_vary(x) for x in value]
if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}
return value
N = 1
observations = []
def solve(data):
upper, lower = [x.split('\t') for x in data]
if len(upper) != len(lower): return None
paths, parent = [], None
for top, leaf in zip(upper, lower):
if top: parent = top
if parent is None: return None
if not leaf: leaf = '_'
path = parent + '.' + leaf
if path in paths: return None
paths.append(path)
return paths
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('inherit', solve(_vary(['group\t\tother', '@\tb\tc'])), _vary(['group.@', 'group.b', 'other.c']))
check('initial blank', solve(_vary(['\tgroup', 'a\tb'])), _vary(None))
check('empty leaf', solve(_vary(['group\t', 'a\t'])), _vary(None))
check('duplicate path', solve(_vary(['group\t', 'a\ta'])), _vary(None))
check('unequal', solve(_vary(['group', 'a\tb'])), _vary(None))
check('same leaf new parent', solve(_vary(['x\ty', 'a\ta'])), _vary(['x.a', 'y.a']))
check('normal', solve(_vary(['@', 'a'])), _vary(['@.a']))
check('replace parent', solve(_vary(['x\ty\t', 'a\tb\tc'])), _vary(['x.a', 'y.b', 'y.c']))
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 |
|---|---|---|---|
| inherit | ['group.cell', 'group.b', 'other.c'] | ['group.cell', 'group.b', 'other.c'] | Passed |
| initial blank | None | None | Passed |
| empty leaf | ['group.a', 'group._'] | None | Failed |
| duplicate path | None | None | Passed |
| unequal | None | None | Passed |
| same leaf new parent | ['x.a', 'y.a'] | ['x.a', 'y.a'] | Passed |
| normal | ['cell.a'] | ['cell.a'] | Passed |
| replace parent | ['x.a', 'y.b', 'y.c'] | ['x.a', 'y.b', 'y.c'] | Passed |
SHA-256 / 2a615a342d805fedeec3f1a819ec5afac7d1a7fad82ad000d53f675ea34de87c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
def _vary(value):
if value == '@END': return 3 + 4*N
if isinstance(value, str): return value.replace('@', 'cell' * N)
if isinstance(value, list): return [_vary(x) for x in value]
if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}
return value
N = 1
observations = []
def solve(data):
upper, lower = [x.split('\t') for x in data]
if len(upper) != len(lower): return None
paths, parent = [], None
for top, leaf in zip(upper, lower):
if top: parent = top
if parent is None: return None
if not leaf: return None
path = parent + '.' + leaf
if path in paths: return None
paths.append(path)
return paths
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('inherit', solve(_vary(['group\t\tother', '@\tb\tc'])), _vary(['group.@', 'group.b', 'other.c']))
check('initial blank', solve(_vary(['\tgroup', 'a\tb'])), _vary(None))
check('empty leaf', solve(_vary(['group\t', 'a\t'])), _vary(None))
check('duplicate path', solve(_vary(['group\t', 'a\ta'])), _vary(None))
check('unequal', solve(_vary(['group', 'a\tb'])), _vary(None))
check('same leaf new parent', solve(_vary(['x\ty', 'a\ta'])), _vary(['x.a', 'y.a']))
check('normal', solve(_vary(['@', 'a'])), _vary(['@.a']))
check('replace parent', solve(_vary(['x\ty\t', 'a\tb\tc'])), _vary(['x.a', 'y.b', 'y.c']))
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 |
|---|---|---|---|
| inherit | ['group.cell', 'group.b', 'other.c'] | ['group.cell', 'group.b', 'other.c'] | Passed |
| initial blank | None | None | Passed |
| empty leaf | None | None | Passed |
| duplicate path | None | None | Passed |
| unequal | None | None | Passed |
| same leaf new parent | ['x.a', 'y.a'] | ['x.a', 'y.a'] | Passed |
| normal | ['cell.a'] | ['cell.a'] | Passed |
| replace parent | ['x.a', 'y.b', 'y.c'] | ['x.a', 'y.b', 'y.c'] | Passed |
SHA-256 / 3e33918230925a1fdfa5cc3dfd690dac6b73bbe187db4611c042ce5ac892956c
Verification & scope
Deterministic bounded in-memory model. No claim of complete CSV or external format conformance. 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:44:42.815705+00:00.
Case digest / 0aaa661e1ffda180c9836b418b5740cdafbdb062826926cbe83d1b9477ae1bd9