FA-47736 / Delimited text / Open access
A delimiter absent from some records remains eligible · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
Delimiter evidence is checked only on the widest record.
THE FAILURE
Delimiter evidence is checked only on the widest record.
Unsuccessful approach: Checking only the first record misses later delimiter-free rows.
Case contract
Choose comma, tab, or semicolon from precomputed per-record field counts. Ignore blank physical records marked null. A candidate must have >=2 fields on every sampled record and constant width. Score is record count times width; greatest score wins, ties use candidate order. No valid candidate returns null.
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):
best, score = None, -1
for name, counts in data:
counts = [c for c in counts if c is not None]
if not counts: continue
if min(counts) < 1: continue
if len(set(counts)) != 1: continue
candidate_score = len(counts) * counts[0]
if candidate_score > score:
best, score = name, candidate_score
return best
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stable', solve(_vary([['comma', [2, 2]], ['tab', [1, 1]]])), _vary('comma'))
check('ragged distractor', solve(_vary([['comma', [2, 3]], ['tab', [2, 2]]])), _vary('tab'))
check('blank ignored', solve(_vary([['comma', [None, 2, 2]], ['tab', [1, 1]]])), _vary('comma'))
check('ties', solve(_vary([['comma', [2, 2]], ['tab', [2, 2]]])), _vary('comma'))
check('score', solve(_vary([['comma', [3]], ['tab', [2, 2]]])), _vary('tab'))
check('none', solve(_vary([['comma', [1, 1]], ['tab', []]])), _vary(None))
check('large width', solve(_vary([['@', [4, 4]], ['tab', [2, 2]]])), _vary('@'))
check('singleton row distractor', solve(_vary([['comma', [2, 1]], ['tab', [2, 2]]])), _vary('tab'))
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 |
|---|---|---|---|
| stable | comma | comma | Passed |
| ragged distractor | tab | tab | Passed |
| blank ignored | comma | comma | Passed |
| ties | comma | comma | Passed |
| score | tab | tab | Passed |
| none | comma | None | Failed |
| large width | cell | cell | Passed |
| singleton row distractor | tab | tab | Passed |
SHA-256 / c36706bff3cbbd5bfe11e8272b5f88587cedac30b55889d6f8e11fda830d7c7d
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):
best, score = None, -1
for name, counts in data:
counts = [c for c in counts if c is not None]
if not counts: continue
if min(counts) < 0: continue
if len(set(counts)) != 1: continue
candidate_score = len(counts) * counts[0]
if candidate_score > score:
best, score = name, candidate_score
return best
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stable', solve(_vary([['comma', [2, 2]], ['tab', [1, 1]]])), _vary('comma'))
check('ragged distractor', solve(_vary([['comma', [2, 3]], ['tab', [2, 2]]])), _vary('tab'))
check('blank ignored', solve(_vary([['comma', [None, 2, 2]], ['tab', [1, 1]]])), _vary('comma'))
check('ties', solve(_vary([['comma', [2, 2]], ['tab', [2, 2]]])), _vary('comma'))
check('score', solve(_vary([['comma', [3]], ['tab', [2, 2]]])), _vary('tab'))
check('none', solve(_vary([['comma', [1, 1]], ['tab', []]])), _vary(None))
check('large width', solve(_vary([['@', [4, 4]], ['tab', [2, 2]]])), _vary('@'))
check('singleton row distractor', solve(_vary([['comma', [2, 1]], ['tab', [2, 2]]])), _vary('tab'))
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 |
|---|---|---|---|
| stable | comma | comma | Passed |
| ragged distractor | tab | tab | Passed |
| blank ignored | comma | comma | Passed |
| ties | comma | comma | Passed |
| score | tab | tab | Passed |
| none | comma | None | Failed |
| large width | cell | cell | Passed |
| singleton row distractor | tab | tab | Passed |
SHA-256 / 152be79286a2fa9e1fed7cba655a7584d9f1f7765d05c522b995f7fd29d19442
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:44.431408+00:00.
Case digest / db94acce0a7fa5ea9fb44c8aa83a3a06566830516e35a415739cd54dd6130d0d