FA-48361 / Delimited text / Open access
An empty dictionary-coded row becomes a missing row · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
An empty dictionary-coded row becomes a missing row.
THE FAILURE
An empty dictionary-coded row becomes a missing row.
Unsuccessful approach: The alternate implementation still violates the same declared invariant: an empty dictionary-coded row becomes a missing row.
Case contract
Read pipe records DEF|id|literal and ROW|comma-separated IDs. Definitions are immutable; rows may reference only preceding IDs, and preserve repeated references. Literal definition payloads may contain pipes. Return expanded text rows. An empty ROW payload is a zero-cell row.
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):
dictionary,rows={},[]
for line in data:
parts=line.split('|',2)
if parts[0]=='DEF' and len(parts)==3:
if parts[1] in dictionary: return None
dictionary[parts[1]]=parts[2]
elif parts[0]=='ROW' and len(parts)==2:
ids=parts[1].split(',') if parts[1] else []
if any(key not in dictionary for key in ids): return None
if ids: rows.append([dictionary[key] for key in ids])
else: return None
return rows
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b,a'])), _vary([['@', 'z', '@']]))
check('ordered refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b'])), _vary([['@', 'z']]))
check('literal pipes', solve(_vary(['DEF|a|x|y', 'ROW|a'])), _vary([['x|y']]))
check('unknown', solve(_vary(['ROW|a', 'DEF|a|x'])), _vary(None))
check('redefine', solve(_vary(['DEF|a|x', 'DEF|a|y'])), _vary(None))
check('empty row', solve(_vary(['ROW|'])), _vary([[]]))
check('empty literal', solve(_vary(['DEF|a|', 'ROW|a'])), _vary([['']]))
check('zero', solve(_vary([])), _vary([]))
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 |
|---|---|---|---|
| repeat refs | [['cell', 'z', 'cell']] | [['cell', 'z', 'cell']] | Passed |
| ordered refs | [['cell', 'z']] | [['cell', 'z']] | Passed |
| literal pipes | [['x|y']] | [['x|y']] | Passed |
| unknown | None | None | Passed |
| redefine | None | None | Passed |
| empty row | [] | [[]] | Failed |
| empty literal | [['']] | [['']] | Passed |
| zero | [] | [] | Passed |
SHA-256 / 4e13e660cc3dccaa5821376f24671a684eaaf7682bc31cd78081c684074c3d77
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):
dictionary,rows={},[]
for line in data:
parts=line.split('|',2)
if parts[0]=='DEF' and len(parts)==3:
if parts[1] in dictionary: return None
dictionary[parts[1]]=parts[2]
elif parts[0]=='ROW' and len(parts)==2:
ids=parts[1].split(',') if parts[1] else []
if any(key not in dictionary for key in ids): return None
rows.append([dictionary[key] for key in ids] if ids else None)
else: return None
return rows
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b,a'])), _vary([['@', 'z', '@']]))
check('ordered refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b'])), _vary([['@', 'z']]))
check('literal pipes', solve(_vary(['DEF|a|x|y', 'ROW|a'])), _vary([['x|y']]))
check('unknown', solve(_vary(['ROW|a', 'DEF|a|x'])), _vary(None))
check('redefine', solve(_vary(['DEF|a|x', 'DEF|a|y'])), _vary(None))
check('empty row', solve(_vary(['ROW|'])), _vary([[]]))
check('empty literal', solve(_vary(['DEF|a|', 'ROW|a'])), _vary([['']]))
check('zero', solve(_vary([])), _vary([]))
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 |
|---|---|---|---|
| repeat refs | [['cell', 'z', 'cell']] | [['cell', 'z', 'cell']] | Passed |
| ordered refs | [['cell', 'z']] | [['cell', 'z']] | Passed |
| literal pipes | [['x|y']] | [['x|y']] | Passed |
| unknown | None | None | Passed |
| redefine | None | None | Passed |
| empty row | [None] | [[]] | Failed |
| empty literal | [['']] | [['']] | Passed |
| zero | [] | [] | Passed |
SHA-256 / f9ba836023f74dafcf316ff4889ca9e01ada18d99f0994c82ec6f0dca3bb5b18
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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
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:50.065186+00:00.
Case digest / d1209a3be3628793c3d18168d05d9831f9c33ddd0fcdf54917012e11ee3df0b4