FA-48646 / Delimited text / Open access
A fragment offset is treated as the next free position · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
A fragment offset is treated as the next free position.
THE FAILURE
A fragment offset is treated as the next free position.
Unsuccessful approach: The alternate implementation still violates the same declared invariant: a fragment offset is treated as the next free position.
Case contract
Assemble one row from pipe fragments offset|comma-fields and a declared width. Offsets are zero-based unsigned ASCII integers. Fragments may arrive out of order, but overlap, overrun and holes reject. Empty fields are real supplied cells. Return the complete physical row.
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):
slots={}
for line in data['fragments']:
parts=line.split('|',1)
if len(parts)!=2 or not parts[0].isascii() or not parts[0].isdecimal(): return None
start=len(slots); fields=parts[1].split(',')
if start+len(fields)>data['width']: return None
for offset,value in enumerate(fields):
index=start+offset
if index in slots: return None
slots[index]=value
if len(slots)!=data['width']: return None
return [slots[index] for index in range(data['width'])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('out of order', solve(_vary({'width': 4, 'fragments': ['2|x,z', '0|@,y']})), _vary(['@', 'y', 'x', 'z']))
check('overlap', solve(_vary({'width': 3, 'fragments': ['0|a,b', '1|c,d']})), _vary(None))
check('hole', solve(_vary({'width': 3, 'fragments': ['0|@', '2|z']})), _vary(None))
check('overrun', solve(_vary({'width': 2, 'fragments': ['1|a,b']})), _vary(None))
check('empty supplied', solve(_vary({'width': 2, 'fragments': ['1|', '0|@']})), _vary(['@', '']))
check('zero width', solve(_vary({'width': 0, 'fragments': []})), _vary([]))
check('single', solve(_vary({'width': 1, 'fragments': ['0|@']})), _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 |
|---|---|---|---|
| out of order | ['x', 'z', 'cell', 'y'] | ['cell', 'y', 'x', 'z'] | Failed |
| overlap | None | None | Passed |
| hole | None | None | Passed |
| overrun | ['a', 'b'] | None | Failed |
| empty supplied | ['', 'cell'] | ['cell', ''] | Failed |
| zero width | [] | [] | Passed |
| single | ['cell'] | ['cell'] | Passed |
SHA-256 / 0c374a970e7912b6b3b8a8a0f0d13a0055349aaf9f0b3c9ecda58a4979a0e50d
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):
slots={}
for line in data['fragments']:
parts=line.split('|',1)
if len(parts)!=2 or not parts[0].isascii() or not parts[0].isdecimal(): return None
start=0; fields=parts[1].split(',')
if start+len(fields)>data['width']: return None
for offset,value in enumerate(fields):
index=start+offset
if index in slots: return None
slots[index]=value
if len(slots)!=data['width']: return None
return [slots[index] for index in range(data['width'])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('out of order', solve(_vary({'width': 4, 'fragments': ['2|x,z', '0|@,y']})), _vary(['@', 'y', 'x', 'z']))
check('overlap', solve(_vary({'width': 3, 'fragments': ['0|a,b', '1|c,d']})), _vary(None))
check('hole', solve(_vary({'width': 3, 'fragments': ['0|@', '2|z']})), _vary(None))
check('overrun', solve(_vary({'width': 2, 'fragments': ['1|a,b']})), _vary(None))
check('empty supplied', solve(_vary({'width': 2, 'fragments': ['1|', '0|@']})), _vary(['@', '']))
check('zero width', solve(_vary({'width': 0, 'fragments': []})), _vary([]))
check('single', solve(_vary({'width': 1, 'fragments': ['0|@']})), _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 |
|---|---|---|---|
| out of order | None | ['cell', 'y', 'x', 'z'] | Failed |
| overlap | None | None | Passed |
| hole | None | None | Passed |
| overrun | ['a', 'b'] | None | Failed |
| empty supplied | None | ['cell', ''] | Failed |
| zero width | [] | [] | Passed |
| single | ['cell'] | ['cell'] | Passed |
SHA-256 / af882ceda8163ded48f8e5022346908da811064e8d0532dc4a4bebd680591cd5
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:52.791262+00:00.
Case digest / dc45984bb67cb9d1b8ea0e11a85543d2ef63e49b42858228fe1b24a75875e963