FA-48211 / Delimited text / Open access
Transposed cell values are reordered within each column · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
Transposed cell values are reordered within each column.
THE FAILURE
Transposed cell values are reordered within each column.
Unsuccessful approach: The alternate implementation still violates the same declared invariant: transposed cell values are reordered within each column.
Case contract
Transpose comma records into physical columns. Pad missing trailing cells with null, preserving explicit empty strings. Width is the largest source row width; empty input has no columns. Output columns are in increasing physical position.
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=[line.split(',') for line in data]
width=max((len(row) for row in rows),default=0)
out=[]
for col in range(width):
out.append([row[col] if col<len(row) else None for row in reversed(rows)])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ragged', solve(_vary(['@,a,b', 'x'])), _vary([['@', 'x'], ['a', None], ['b', None]]))
check('later wider', solve(_vary(['@', 'x,y'])), _vary([['@', 'x'], [None, 'y']]))
check('explicit empty', solve(_vary(['@,', 'x'])), _vary([['@', 'x'], ['', None]]))
check('empty input', solve(_vary([])), _vary([]))
check('one empty', solve(_vary([''])), _vary([['']]))
check('rectangular', solve(_vary(['a,b', 'c,d'])), _vary([['a', 'c'], ['b', 'd']]))
check('unsorted', solve(_vary(['z,1', 'a,2'])), _vary([['z', 'a'], ['1', '2']]))
check('three rows', solve(_vary(['@,x', 'y', 'z,w'])), _vary([['@', 'y', 'z'], ['x', None, 'w']]))
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 |
|---|---|---|---|
| ragged | [['x', 'cell'], [None, 'a'], [None, 'b']] | [['cell', 'x'], ['a', None], ['b', None]] | Failed |
| later wider | [['x', 'cell'], ['y', None]] | [['cell', 'x'], [None, 'y']] | Failed |
| explicit empty | [['x', 'cell'], [None, '']] | [['cell', 'x'], ['', None]] | Failed |
| empty input | [] | [] | Passed |
| one empty | [['']] | [['']] | Passed |
| rectangular | [['c', 'a'], ['d', 'b']] | [['a', 'c'], ['b', 'd']] | Failed |
| unsorted | [['a', 'z'], ['2', '1']] | [['z', 'a'], ['1', '2']] | Failed |
| three rows | [['z', 'y', 'cell'], ['w', None, 'x']] | [['cell', 'y', 'z'], ['x', None, 'w']] | Failed |
SHA-256 / f15eb254de2769326cc8fae7f6ae41cc8828d2ad93126a00c9e7dae2f9261821
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=[line.split(',') for line in data]
width=max((len(row) for row in rows),default=0)
out=[]
for col in range(width):
out.append([row[col] if col<len(row) else None for row in sorted(rows)])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('ragged', solve(_vary(['@,a,b', 'x'])), _vary([['@', 'x'], ['a', None], ['b', None]]))
check('later wider', solve(_vary(['@', 'x,y'])), _vary([['@', 'x'], [None, 'y']]))
check('explicit empty', solve(_vary(['@,', 'x'])), _vary([['@', 'x'], ['', None]]))
check('empty input', solve(_vary([])), _vary([]))
check('one empty', solve(_vary([''])), _vary([['']]))
check('rectangular', solve(_vary(['a,b', 'c,d'])), _vary([['a', 'c'], ['b', 'd']]))
check('unsorted', solve(_vary(['z,1', 'a,2'])), _vary([['z', 'a'], ['1', '2']]))
check('three rows', solve(_vary(['@,x', 'y', 'z,w'])), _vary([['@', 'y', 'z'], ['x', None, 'w']]))
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 |
|---|---|---|---|
| ragged | [['cell', 'x'], ['a', None], ['b', None]] | [['cell', 'x'], ['a', None], ['b', None]] | Passed |
| later wider | [['cell', 'x'], [None, 'y']] | [['cell', 'x'], [None, 'y']] | Passed |
| explicit empty | [['cell', 'x'], ['', None]] | [['cell', 'x'], ['', None]] | Passed |
| empty input | [] | [] | Passed |
| one empty | [['']] | [['']] | Passed |
| rectangular | [['a', 'c'], ['b', 'd']] | [['a', 'c'], ['b', 'd']] | Passed |
| unsorted | [['a', 'z'], ['2', '1']] | [['z', 'a'], ['1', '2']] | Failed |
| three rows | [['cell', 'y', 'z'], ['x', None, 'w']] | [['cell', 'y', 'z'], ['x', None, 'w']] | Passed |
SHA-256 / b797e490cd5e2d549b8238ec7b503fbd62f477e8c488e0ff627f9da54395eb8e
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:48.730875+00:00.
Case digest / c59681326b9711262d60710daa580f05f60ad62dd05c0b70ae07d10087df2f7d