FAILURE MAP
← Case archive

FA-47986 / Delimited text / Open access

Skip mode unexpectedly retains quarantined error payloads · case 01

A structured table violates the declared record or column contract.

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

ROOT CAUSE

Error-payload retention ignores the chosen discard policy.

THE FAILURE

Error-payload retention ignores the chosen discard policy.

Unsuccessful approach: Unconditional collection has the same policy leak.

Case contract

Import three-column comma rows with exact modes strict, skip, or collect. Width failures are 1-based source record positions. Strict returns {error:position}; skip omits bad rows; collect returns valid rows and errors containing position and original cells. Header is supplied separately and not counted.

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):
    rows, errors = [], []
    for position,line in enumerate(data['lines'], 1):
        cells = line.split(',')
        if len(cells) != 3:
            if data['mode'] == 'strict': return {'error':position}
            if data['mode'] != 'strict': errors.append([position, cells])
            continue
        rows.append(cells)
    return {'rows':rows, 'errors':errors}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('collect', solve(_vary({'mode': 'collect', 'lines': ['@,a,b', 'x,y', 'c,d,e', 'z']})), _vary({'rows': [['@', 'a', 'b'], ['c', 'd', 'e']], 'errors': [[2, ['x', 'y']], [4, ['z']]]}))
check('strict', solve(_vary({'mode': 'strict', 'lines': ['@,a,b', 'x,y', 'c,d,e']})), _vary({'error': 2}))
check('skip', solve(_vary({'mode': 'skip', 'lines': ['x,y', '@,a,b', 'z']})), _vary({'rows': [['@', 'a', 'b']], 'errors': []}))
check('normal', solve(_vary({'mode': 'strict', 'lines': ['@,a,b']})), _vary({'rows': [['@', 'a', 'b']], 'errors': []}))
check('empty', solve(_vary({'mode': 'collect', 'lines': []})), _vary({'rows': [], 'errors': []}))
check('empty cells', solve(_vary({'mode': 'collect', 'lines': [',,']})), _vary({'rows': [['', '', '']], 'errors': []}))
check('wide', solve(_vary({'mode': 'collect', 'lines': ['a,b,c,d']})), _vary({'rows': [], 'errors': [[1, ['a', 'b', 'c', 'd']]]}))
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
collect{'errors': [[2, ['x', 'y']], [4, ['z']]], 'rows': [['cell', 'a', 'b'], ['c', 'd', 'e']]}{'errors': [[2, ['x', 'y']], [4, ['z']]], 'rows': [['cell', 'a', 'b'], ['c', 'd', 'e']]}Passed
strict{'error': 2}{'error': 2}Passed
skip{'errors': [[1, ['x', 'y']], [3, ['z']]], 'rows': [['cell', 'a', 'b']]}{'errors': [], 'rows': [['cell', 'a', 'b']]}Failed
normal{'errors': [], 'rows': [['cell', 'a', 'b']]}{'errors': [], 'rows': [['cell', 'a', 'b']]}Passed
empty{'errors': [], 'rows': []}{'errors': [], 'rows': []}Passed
empty cells{'errors': [], 'rows': [['', '', '']]}{'errors': [], 'rows': [['', '', '']]}Passed
wide{'errors': [[1, ['a', 'b', 'c', 'd']]], 'rows': []}{'errors': [[1, ['a', 'b', 'c', 'd']]], 'rows': []}Passed

SHA-256 / 06e4fd753c90e2c98b1c8c4998e97ca93c607b0689b20053559532a3d8e97509

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):
    rows, errors = [], []
    for position,line in enumerate(data['lines'], 1):
        cells = line.split(',')
        if len(cells) != 3:
            if data['mode'] == 'strict': return {'error':position}
            if True: errors.append([position, cells])
            continue
        rows.append(cells)
    return {'rows':rows, 'errors':errors}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('collect', solve(_vary({'mode': 'collect', 'lines': ['@,a,b', 'x,y', 'c,d,e', 'z']})), _vary({'rows': [['@', 'a', 'b'], ['c', 'd', 'e']], 'errors': [[2, ['x', 'y']], [4, ['z']]]}))
check('strict', solve(_vary({'mode': 'strict', 'lines': ['@,a,b', 'x,y', 'c,d,e']})), _vary({'error': 2}))
check('skip', solve(_vary({'mode': 'skip', 'lines': ['x,y', '@,a,b', 'z']})), _vary({'rows': [['@', 'a', 'b']], 'errors': []}))
check('normal', solve(_vary({'mode': 'strict', 'lines': ['@,a,b']})), _vary({'rows': [['@', 'a', 'b']], 'errors': []}))
check('empty', solve(_vary({'mode': 'collect', 'lines': []})), _vary({'rows': [], 'errors': []}))
check('empty cells', solve(_vary({'mode': 'collect', 'lines': [',,']})), _vary({'rows': [['', '', '']], 'errors': []}))
check('wide', solve(_vary({'mode': 'collect', 'lines': ['a,b,c,d']})), _vary({'rows': [], 'errors': [[1, ['a', 'b', 'c', 'd']]]}))
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
collect{'errors': [[2, ['x', 'y']], [4, ['z']]], 'rows': [['cell', 'a', 'b'], ['c', 'd', 'e']]}{'errors': [[2, ['x', 'y']], [4, ['z']]], 'rows': [['cell', 'a', 'b'], ['c', 'd', 'e']]}Passed
strict{'error': 2}{'error': 2}Passed
skip{'errors': [[1, ['x', 'y']], [3, ['z']]], 'rows': [['cell', 'a', 'b']]}{'errors': [], 'rows': [['cell', 'a', 'b']]}Failed
normal{'errors': [], 'rows': [['cell', 'a', 'b']]}{'errors': [], 'rows': [['cell', 'a', 'b']]}Passed
empty{'errors': [], 'rows': []}{'errors': [], 'rows': []}Passed
empty cells{'errors': [], 'rows': [['', '', '']]}{'errors': [], 'rows': [['', '', '']]}Passed
wide{'errors': [[1, ['a', 'b', 'c', 'd']]], 'rows': []}{'errors': [[1, ['a', 'b', 'c', 'd']]], 'rows': []}Passed

SHA-256 / 7555f34dfd09f39833f290073a0a8a3610cea500953a84183b5092fbe6e18231

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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:46.693247+00:00.

Case digest / 027153e924fc05baca20066ae8f49b4330d6fed94f32ccde5448688e195326fb