FA-48386 / Delimited text / Open access
Null bitmap cells are omitted from the logical row · case 01
A structured table violates the declared record or column contract.
ROOT CAUSE
Null bitmap cells are omitted from the logical row.
VERIFIED REPAIR
Preserve the named invariant at the faulty decision: if bit=='1': out.append(None)
Unsuccessful approach: The alternate implementation still violates the same declared invariant: null bitmap cells are omitted from the logical row.
Case contract
Decode bitmap|comma-payload rows. Bitmap consists of 0 and 1; 1 denotes null and consumes no payload, 0 consumes one payload field. Empty payload encodes zero fields only when bitmap has no zero bits; otherwise it is one empty field. Reject leftover or insufficient values. Return logical cells.
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):
parts=data.split('|',1)
if len(parts)!=2: return None
bits,payload=parts
if any(bit not in '01' for bit in bits): return None
values=payload.split(',') if payload or '0' in bits else []
out=[]; cursor=0
for bit in bits:
if bit=='1': pass
else:
if cursor>=len(values): return None
out.append(values[cursor]); cursor+=1
if cursor!=len(values): return None
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed', solve(_vary('010|@,z')), _vary(['@', None, 'z']))
check('all null', solve(_vary('111|')), _vary([None, None, None]))
check('empty text', solve(_vary('0|')), _vary(['']))
check('insufficient', solve(_vary('00|x')), _vary(None))
check('extra', solve(_vary('1|x')), _vary(None))
check('empty bitmap', solve(_vary('|')), _vary([]))
check('invalid bit', solve(_vary('02|x,y')), _vary(None))
check('several nulls', solve(_vary('1101|@')), _vary([None, None, '@', None]))
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 |
|---|---|---|---|
| mixed | ['cell', 'z'] | ['cell', None, 'z'] | Failed |
| all null | [] | [None, None, None] | Failed |
| empty text | [''] | [''] | Passed |
| insufficient | None | None | Passed |
| extra | None | None | Passed |
| empty bitmap | [] | [] | Passed |
| invalid bit | None | None | Passed |
| several nulls | ['cell'] | [None, None, 'cell', None] | Failed |
SHA-256 / 5aa9a2690445c25fec77f06a97fe0d5e3835bfc3845036e8fd780381aa76cccd
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):
parts=data.split('|',1)
if len(parts)!=2: return None
bits,payload=parts
if any(bit not in '01' for bit in bits): return None
values=payload.split(',') if payload or '0' in bits else []
out=[]; cursor=0
for bit in bits:
if bit=='1': out.append([])
else:
if cursor>=len(values): return None
out.append(values[cursor]); cursor+=1
if cursor!=len(values): return None
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed', solve(_vary('010|@,z')), _vary(['@', None, 'z']))
check('all null', solve(_vary('111|')), _vary([None, None, None]))
check('empty text', solve(_vary('0|')), _vary(['']))
check('insufficient', solve(_vary('00|x')), _vary(None))
check('extra', solve(_vary('1|x')), _vary(None))
check('empty bitmap', solve(_vary('|')), _vary([]))
check('invalid bit', solve(_vary('02|x,y')), _vary(None))
check('several nulls', solve(_vary('1101|@')), _vary([None, None, '@', None]))
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 |
|---|---|---|---|
| mixed | ['cell', [], 'z'] | ['cell', None, 'z'] | Failed |
| all null | [[], [], []] | [None, None, None] | Failed |
| empty text | [''] | [''] | Passed |
| insufficient | None | None | Passed |
| extra | None | None | Passed |
| empty bitmap | [] | [] | Passed |
| invalid bit | None | None | Passed |
| several nulls | [[], [], 'cell', []] | [None, None, 'cell', None] | Failed |
SHA-256 / eb822973424a0ad06ac6f9b8281633f2f27c5aa638974eaabc0625745972b94e
3 / The verified repair
Exit 0"""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):
parts=data.split('|',1)
if len(parts)!=2: return None
bits,payload=parts
if any(bit not in '01' for bit in bits): return None
values=payload.split(',') if payload or '0' in bits else []
out=[]; cursor=0
for bit in bits:
if bit=='1': out.append(None)
else:
if cursor>=len(values): return None
out.append(values[cursor]); cursor+=1
if cursor!=len(values): return None
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed', solve(_vary('010|@,z')), _vary(['@', None, 'z']))
check('all null', solve(_vary('111|')), _vary([None, None, None]))
check('empty text', solve(_vary('0|')), _vary(['']))
check('insufficient', solve(_vary('00|x')), _vary(None))
check('extra', solve(_vary('1|x')), _vary(None))
check('empty bitmap', solve(_vary('|')), _vary([]))
check('invalid bit', solve(_vary('02|x,y')), _vary(None))
check('several nulls', solve(_vary('1101|@')), _vary([None, None, '@', None]))
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 |
|---|---|---|---|
| mixed | ['cell', None, 'z'] | ['cell', None, 'z'] | Passed |
| all null | [None, None, None] | [None, None, None] | Passed |
| empty text | [''] | [''] | Passed |
| insufficient | None | None | Passed |
| extra | None | None | Passed |
| empty bitmap | [] | [] | Passed |
| invalid bit | None | None | Passed |
| several nulls | [None, None, 'cell', None] | [None, None, 'cell', None] | Passed |
SHA-256 / d3f8627ab8eb91edbe5738cecb9167d26b64fc4108ed0f83767ca3da0d215b85
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:50.233271+00:00.
Case digest / 1e1ee4d26aec5bbb8b7cab6c9c7c752730b48edcde3c1e2711f008aa7e22672b