FAILURE MAP
← Case archive

FA-48311 / Delimited text / Open access

Rows beyond a block count are silently dropped · 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

Rows beyond a block count are silently dropped.

THE FAILURE

Rows beyond a block count are silently dropped.

Unsuccessful approach: The alternate implementation still violates the same declared invariant: rows beyond a block count are silently dropped.

Case contract

Decode pipe records arranged as C|count followed by exactly count R|value rows. Multiple blocks may follow. Counts are ASCII nonnegative decimals; values contain no pipe in this bounded grammar. Empty blocks are emitted as empty lists. Missing, unexpected, and surplus R records reject.

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):
    blocks=[]; current=None; remaining=0
    for line in data:
        cells=line.split('|')
        if len(cells)!=2: return None
        tag,value=cells
        if tag=='C':
            if remaining: return None
            if not value.isascii() or not value.isdecimal(): return None
            remaining=int(value); current=[]; blocks.append(current)
        elif tag=='R':
            if remaining==0: continue
            current.append(value); remaining-=1
        else: return None
    if remaining: return None
    return blocks
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('blocks', solve(_vary(['C|2', 'R|@', 'R|x', 'C|1', 'R|z'])), _vary([['@', 'x'], ['z']]))
check('empty block', solve(_vary(['C|0', 'C|1', 'R|@'])), _vary([[], ['@']]))
check('short', solve(_vary(['C|2', 'R|@'])), _vary(None))
check('extra', solve(_vary(['C|1', 'R|@', 'R|x'])), _vary(None))
check('orphan', solve(_vary(['R|@'])), _vary(None))
check('premature block', solve(_vary(['C|2', 'R|@', 'C|0'])), _vary(None))
check('bad tag', solve(_vary(['X|0'])), _vary(None))
check('zero stream', solve(_vary([])), _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 fixtureActualExpectedOutcome
blocks[['cell', 'x'], ['z']][['cell', 'x'], ['z']]Passed
empty block[[], ['cell']][[], ['cell']]Passed
shortNoneNonePassed
extra[['cell']]NoneFailed
orphan[]NoneFailed
premature blockNoneNonePassed
bad tagNoneNonePassed
zero stream[][]Passed

SHA-256 / e4f2d4f0177a6b2db346ae471e916c55d22fa7f6166e9865ab71272b62e3e924

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):
    blocks=[]; current=None; remaining=0
    for line in data:
        cells=line.split('|')
        if len(cells)!=2: return None
        tag,value=cells
        if tag=='C':
            if remaining: return None
            if not value.isascii() or not value.isdecimal(): return None
            remaining=int(value); current=[]; blocks.append(current)
        elif tag=='R':
            if remaining==0: blocks.append([value]); continue
            current.append(value); remaining-=1
        else: return None
    if remaining: return None
    return blocks
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('blocks', solve(_vary(['C|2', 'R|@', 'R|x', 'C|1', 'R|z'])), _vary([['@', 'x'], ['z']]))
check('empty block', solve(_vary(['C|0', 'C|1', 'R|@'])), _vary([[], ['@']]))
check('short', solve(_vary(['C|2', 'R|@'])), _vary(None))
check('extra', solve(_vary(['C|1', 'R|@', 'R|x'])), _vary(None))
check('orphan', solve(_vary(['R|@'])), _vary(None))
check('premature block', solve(_vary(['C|2', 'R|@', 'C|0'])), _vary(None))
check('bad tag', solve(_vary(['X|0'])), _vary(None))
check('zero stream', solve(_vary([])), _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 fixtureActualExpectedOutcome
blocks[['cell', 'x'], ['z']][['cell', 'x'], ['z']]Passed
empty block[[], ['cell']][[], ['cell']]Passed
shortNoneNonePassed
extra[['cell'], ['x']]NoneFailed
orphan[['cell']]NoneFailed
premature blockNoneNonePassed
bad tagNoneNonePassed
zero stream[][]Passed

SHA-256 / a05002f6f63afe78908afffa58c6a5ce6b295e62c1832afaf5a31ef7585e5fbf

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

Case digest / 8762abdac3a73bd46c6fe0ff692ffcdcb80e3f8c3bd31785e657862d8240e65b