FAILURE MAP
← Case archive

FA-47731 / Delimited text / Open access

Blank lines vote against a valid delimiter · case 01

A structured table violates the declared record or column contract.

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

ROOT CAUSE

Blank physical records are turned into observed field widths.

THE FAILURE

Blank physical records are turned into observed field widths.

Unsuccessful approach: Treating blanks as one-column records still invalidates a consistent table.

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 = [0 if c is None else c for c in counts]
        if not counts: continue
        if min(counts) < 2: 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 fixtureActualExpectedOutcome
stablecommacommaPassed
ragged distractortabtabPassed
blank ignoredNonecommaFailed
tiescommacommaPassed
scoretabtabPassed
noneNoneNonePassed
large widthcellcellPassed
singleton row distractortabtabPassed

SHA-256 / 8307c695f48db77959d7295ff3db0eccd486f451b498ccb532c74df2214a3900

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 = [1 if c is None else c for c in counts]
        if not counts: continue
        if min(counts) < 2: 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 fixtureActualExpectedOutcome
stablecommacommaPassed
ragged distractortabtabPassed
blank ignoredNonecommaFailed
tiescommacommaPassed
scoretabtabPassed
noneNoneNonePassed
large widthcellcellPassed
singleton row distractortabtabPassed

SHA-256 / 65474c74825cf64d8d81aaee1e19adb4f0b16b72d5d742303485ae3dddb6e81d

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 / 360eadbb53aea59144cf6a3971ca3c5bb71638e75c1eceafd3b0059acfe01e3d