FA-47401 / Delimited text / Open access
TSV fields retain the previous column buffer · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
Field emission does not clear the buffer before the next column.
THE FAILURE
Field emission does not clear the buffer before the next column.
Unsuccessful approach: Keeping a suffix still leaks the preceding cell into an empty successor.
Case contract
Decode TSV fields with exactly four escapes: backslash-t, backslash-n, backslash-r, backslash-backslash. Raw tabs split fields, raw newlines are forbidden; unknown and dangling escapes reject the row. Empty input is one empty field.
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):
out, field, escaped = [], [], False
for ch in data:
if escaped:
if ch not in 'tnr\\': return None
field.append({'t':'\t','n':'\n','r':'\r','\\':'\\'}[ch])
escaped = False
elif ch == '\\': escaped = True
elif ch == '\t':
out.append(''.join(field))
field = field
elif ch in '\r\n': return None
else: field.append(ch)
if escaped: return None
out.append(''.join(field))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mapped escapes', solve(_vary('@\\tA\\nB\\rC\\\\D')), _vary(['@\tA\nB\rC\\D']))
check('separators', solve(_vary('@\t\tZ')), _vary(['@', '', 'Z']))
check('escaped backslash then t', solve(_vary('\\\\t')), _vary(['\\t']))
check('unknown', solve(_vary('\\q')), _vary(None))
check('dangling', solve(_vary('@\\')), _vary(None))
check('raw newline', solve(_vary('@\nZ')), _vary(None))
check('empty', solve(_vary('')), _vary(['']))
check('leading trailing', solve(_vary('\t@\t')), _vary(['', '@', '']))
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 |
|---|---|---|---|
| mapped escapes | ['cell\tA\nB\rC\\D'] | ['cell\tA\nB\rC\\D'] | Passed |
| separators | ['cell', 'cell', 'cellZ'] | ['cell', '', 'Z'] | Failed |
| escaped backslash then t | ['\\t'] | ['\\t'] | Passed |
| unknown | None | None | Passed |
| dangling | None | None | Passed |
| raw newline | None | None | Passed |
| empty | [''] | [''] | Passed |
| leading trailing | ['', 'cell', 'cell'] | ['', 'cell', ''] | Failed |
SHA-256 / 3d1213dd0385df16a36eb2b0ed7c6bd842c1c6cf3b188afb1f32f3197e6b90e6
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):
out, field, escaped = [], [], False
for ch in data:
if escaped:
if ch not in 'tnr\\': return None
field.append({'t':'\t','n':'\n','r':'\r','\\':'\\'}[ch])
escaped = False
elif ch == '\\': escaped = True
elif ch == '\t':
out.append(''.join(field))
field = field[-1:]
elif ch in '\r\n': return None
else: field.append(ch)
if escaped: return None
out.append(''.join(field))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mapped escapes', solve(_vary('@\\tA\\nB\\rC\\\\D')), _vary(['@\tA\nB\rC\\D']))
check('separators', solve(_vary('@\t\tZ')), _vary(['@', '', 'Z']))
check('escaped backslash then t', solve(_vary('\\\\t')), _vary(['\\t']))
check('unknown', solve(_vary('\\q')), _vary(None))
check('dangling', solve(_vary('@\\')), _vary(None))
check('raw newline', solve(_vary('@\nZ')), _vary(None))
check('empty', solve(_vary('')), _vary(['']))
check('leading trailing', solve(_vary('\t@\t')), _vary(['', '@', '']))
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 |
|---|---|---|---|
| mapped escapes | ['cell\tA\nB\rC\\D'] | ['cell\tA\nB\rC\\D'] | Passed |
| separators | ['cell', 'l', 'lZ'] | ['cell', '', 'Z'] | Failed |
| escaped backslash then t | ['\\t'] | ['\\t'] | Passed |
| unknown | None | None | Passed |
| dangling | None | None | Passed |
| raw newline | None | None | Passed |
| empty | [''] | [''] | Passed |
| leading trailing | ['', 'cell', 'l'] | ['', 'cell', ''] | Failed |
SHA-256 / f21ac50e0e3a08e2a5dd7ddf2b0c65fdf032c01c7e041de5083b2a86fdb40346
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:41.176248+00:00.
Case digest / 63f606f06c170d78189ed5ec6883911ddae2805aa53383b04d1dce1c0a21eb40