FAILURE MAP
← Case archive

FA-48461 / Delimited text / Open access

A mismatched row checksum is returned as successful data · case 01

A structured table violates the declared record or column contract.

Verified by executionVariant 1 · 10 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A mismatched row checksum is returned as successful data.

THE FAILURE

A mismatched row checksum is returned as successful data.

Unsuccessful approach: The alternate implementation still violates the same declared invariant: a mismatched row checksum is returned as successful data.

Case contract

Decode rows encoded as comma cells followed by |decimal check. The check is the sum of Unicode code points in the exact comma payload modulo 97; this is only a corruption-detection toy, not cryptographic integrity. Use the last pipe as trailer separator, permitting pipes in cells. Reject malformed or mismatched checks. Return fields.

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.rsplit('|',1)
    if len(parts)!=2: return None
    payload,token=parts
    if not token.isascii() or not token.isdecimal(): return None
    check=int(token)
    if check>=97: return None
    expected=sum(ord(ch) for ch in payload)%97
    if False: return None
    return payload.split(',')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('comma', solve(_vary('a,b|45')), _vary(['a', 'b']))
check('empty', solve(_vary('|0')), _vary(['']))
check('pipe data', solve(_vary('a|b|28')), _vary(['a|b']))
check('unicode', solve(_vary('é|39')), _vary(['é']))
check('astral checksum', solve(_vary('😀|84')), _vary(['😀']))
check('bad checksum', solve(_vary('a|1')), _vary(None))
check('bad trailer', solve(_vary('a|-1')), _vary(None))
check('unreduced', solve(_vary('a|97')), _vary(None))
check('normal', solve(_vary('z|25')), _vary(['z']))
check('variant checksum width', solve(('x'*N)+'|'+str((120*N)%97)), ['x'*N])
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
comma['a', 'b']['a', 'b']Passed
empty['']['']Passed
pipe data['a|b']['a|b']Passed
unicode['é']['é']Passed
astral checksum['😀']['😀']Passed
bad checksum['a']NoneFailed
bad trailerNoneNonePassed
unreducedNoneNonePassed
normal['z']['z']Passed
variant checksum width['x']['x']Passed

SHA-256 / 13f500991f6600b0922c618c47c657f7f8f2b8b9fffbc749b94631cb526c0d12

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.rsplit('|',1)
    if len(parts)!=2: return None
    payload,token=parts
    if not token.isascii() or not token.isdecimal(): return None
    check=int(token)
    if check>=97: return None
    expected=sum(ord(ch) for ch in payload)%97
    if check!=expected and payload=='': return None
    return payload.split(',')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('comma', solve(_vary('a,b|45')), _vary(['a', 'b']))
check('empty', solve(_vary('|0')), _vary(['']))
check('pipe data', solve(_vary('a|b|28')), _vary(['a|b']))
check('unicode', solve(_vary('é|39')), _vary(['é']))
check('astral checksum', solve(_vary('😀|84')), _vary(['😀']))
check('bad checksum', solve(_vary('a|1')), _vary(None))
check('bad trailer', solve(_vary('a|-1')), _vary(None))
check('unreduced', solve(_vary('a|97')), _vary(None))
check('normal', solve(_vary('z|25')), _vary(['z']))
check('variant checksum width', solve(('x'*N)+'|'+str((120*N)%97)), ['x'*N])
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
comma['a', 'b']['a', 'b']Passed
empty['']['']Passed
pipe data['a|b']['a|b']Passed
unicode['é']['é']Passed
astral checksum['😀']['😀']Passed
bad checksum['a']NoneFailed
bad trailerNoneNonePassed
unreducedNoneNonePassed
normal['z']['z']Passed
variant checksum width['x']['x']Passed

SHA-256 / c38b415e192bb28397f4a1f5cb353e8c6aff9f56a1d6def4d57a592f53cfe703

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 10 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:50.879028+00:00.

Case digest / 89310247eef481eb50385b78f600e5cf67880c79b56f725d62d5a73c1e91d7b5