FAILURE MAP
← Case archive

FA-47706 / Delimited text / Open access

Ditto expansion copies the previous first column into every cell · 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

The expansion loses the current column index.

THE FAILURE

The expansion loses the current column index.

Unsuccessful approach: Always reading the last column is the opposite positional error.

Case contract

Read semicolon rows in a schema where bare ^ copies the previous value in that column, ^^ represents literal ^, and ^! resets that column to null. A copy in the first row rejects. Exactly two columns are required; an explicit empty string replaces the previous value.

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, previous = [], None
    for line in data:
        cells = line.split(';')
        if len(cells) != 2: return None
        row = []
        for i, cell in enumerate(cells):
            if cell == '^':
                if previous is None: return None
                value = previous[0]
            elif cell == '^^': value = '^'
            elif cell == '^!': value = None
            else: value = cell
            row.append(value)
        rows.append(row)
        previous = row
    return rows
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('copy columns', solve(_vary(['@;a', '^;b', 'c;^'])), _vary([['@', 'a'], ['@', 'b'], ['c', 'b']]))
check('first copy', solve(_vary(['^;x'])), _vary(None))
check('literal marker', solve(_vary(['^^;@'])), _vary([['^', '@']]))
check('null reset', solve(_vary(['@;a', '^!;^', '^;z'])), _vary([['@', 'a'], [None, 'a'], [None, 'z']]))
check('empty replaces', solve(_vary(['@;a', ';b', '^;^'])), _vary([['@', 'a'], ['', 'b'], ['', 'b']]))
check('wrong width', solve(_vary(['@'])), _vary(None))
check('zero', solve(_vary([])), _vary([]))
check('literal prefix', solve(_vary(['^x;@'])), _vary([['^x', '@']]))
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
copy columns[['cell', 'a'], ['cell', 'b'], ['c', 'cell']][['cell', 'a'], ['cell', 'b'], ['c', 'b']]Failed
first copyNoneNonePassed
literal marker[['^', 'cell']][['^', 'cell']]Passed
null reset[['cell', 'a'], [None, 'cell'], [None, 'z']][['cell', 'a'], [None, 'a'], [None, 'z']]Failed
empty replaces[['cell', 'a'], ['', 'b'], ['', '']][['cell', 'a'], ['', 'b'], ['', 'b']]Failed
wrong widthNoneNonePassed
zero[][]Passed
literal prefix[['^x', 'cell']][['^x', 'cell']]Passed

SHA-256 / c92a4c174eea57d62ed8648b6af251007bd435b7bb51ca740686a21299bc217f

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, previous = [], None
    for line in data:
        cells = line.split(';')
        if len(cells) != 2: return None
        row = []
        for i, cell in enumerate(cells):
            if cell == '^':
                if previous is None: return None
                value = previous[-1]
            elif cell == '^^': value = '^'
            elif cell == '^!': value = None
            else: value = cell
            row.append(value)
        rows.append(row)
        previous = row
    return rows
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('copy columns', solve(_vary(['@;a', '^;b', 'c;^'])), _vary([['@', 'a'], ['@', 'b'], ['c', 'b']]))
check('first copy', solve(_vary(['^;x'])), _vary(None))
check('literal marker', solve(_vary(['^^;@'])), _vary([['^', '@']]))
check('null reset', solve(_vary(['@;a', '^!;^', '^;z'])), _vary([['@', 'a'], [None, 'a'], [None, 'z']]))
check('empty replaces', solve(_vary(['@;a', ';b', '^;^'])), _vary([['@', 'a'], ['', 'b'], ['', 'b']]))
check('wrong width', solve(_vary(['@'])), _vary(None))
check('zero', solve(_vary([])), _vary([]))
check('literal prefix', solve(_vary(['^x;@'])), _vary([['^x', '@']]))
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
copy columns[['cell', 'a'], ['a', 'b'], ['c', 'b']][['cell', 'a'], ['cell', 'b'], ['c', 'b']]Failed
first copyNoneNonePassed
literal marker[['^', 'cell']][['^', 'cell']]Passed
null reset[['cell', 'a'], [None, 'a'], ['a', 'z']][['cell', 'a'], [None, 'a'], [None, 'z']]Failed
empty replaces[['cell', 'a'], ['', 'b'], ['b', 'b']][['cell', 'a'], ['', 'b'], ['', 'b']]Failed
wrong widthNoneNonePassed
zero[][]Passed
literal prefix[['^x', 'cell']][['^x', 'cell']]Passed

SHA-256 / 8cad2e06980b92bb672ed61e567de754dce4625c2c385d78569b9f8bf1b94546

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.219819+00:00.

Case digest / f73934f64754987fac33bb32bbcdd718a0e36ab68110f403e5ffb72c2dce9c06