{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"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.","evaluation_group":"s3-delimited-text-counted-record-blocks","failed_approach":"The alternate implementation still violates the same declared invariant: an incomplete counted block is accepted at eof.","family":"s3-delimited-text-counted-record-blocks-block-eof","id":"FA-48306","implementations":{"attempt":{"sha256":"58495ea2dd0c63a03ebf69cafbf2395f18b6e770ebfe7451b5ab54163b94eaed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    blocks=[]; current=None; remaining=0\n    for line in data:\n        cells=line.split('|')\n        if len(cells)!=2: return None\n        tag,value=cells\n        if tag=='C':\n            if remaining: return None\n            if not value.isascii() or not value.isdecimal(): return None\n            remaining=int(value); current=[]; blocks.append(current)\n        elif tag=='R':\n            if remaining==0: return None\n            current.append(value); remaining-=1\n        else: return None\n    if remaining and current==[]: return None\n    return blocks\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('blocks', solve(_vary(['C|2', 'R|@', 'R|x', 'C|1', 'R|z'])), _vary([['@', 'x'], ['z']]))\ncheck('empty block', solve(_vary(['C|0', 'C|1', 'R|@'])), _vary([[], ['@']]))\ncheck('short', solve(_vary(['C|2', 'R|@'])), _vary(None))\ncheck('extra', solve(_vary(['C|1', 'R|@', 'R|x'])), _vary(None))\ncheck('orphan', solve(_vary(['R|@'])), _vary(None))\ncheck('premature block', solve(_vary(['C|2', 'R|@', 'C|0'])), _vary(None))\ncheck('bad tag', solve(_vary(['X|0'])), _vary(None))\ncheck('zero stream', solve(_vary([])), _vary([]))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"77e911e4dd7d36385b5206723c56ebdb160ac53ad6c32f022bc656c4c40326ac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    blocks=[]; current=None; remaining=0\n    for line in data:\n        cells=line.split('|')\n        if len(cells)!=2: return None\n        tag,value=cells\n        if tag=='C':\n            if remaining: return None\n            if not value.isascii() or not value.isdecimal(): return None\n            remaining=int(value); current=[]; blocks.append(current)\n        elif tag=='R':\n            if remaining==0: return None\n            current.append(value); remaining-=1\n        else: return None\n    return blocks\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('blocks', solve(_vary(['C|2', 'R|@', 'R|x', 'C|1', 'R|z'])), _vary([['@', 'x'], ['z']]))\ncheck('empty block', solve(_vary(['C|0', 'C|1', 'R|@'])), _vary([[], ['@']]))\ncheck('short', solve(_vary(['C|2', 'R|@'])), _vary(None))\ncheck('extra', solve(_vary(['C|1', 'R|@', 'R|x'])), _vary(None))\ncheck('orphan', solve(_vary(['R|@'])), _vary(None))\ncheck('premature block', solve(_vary(['C|2', 'R|@', 'C|0'])), _vary(None))\ncheck('bad tag', solve(_vary(['X|0'])), _vary(None))\ncheck('zero stream', solve(_vary([])), _vary([]))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"147fb34ed9c6b113b4f94c510f8b31c66039ee91e86ffc77c9729190bb72dfa9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\ndef _vary(value):\n    if value == '@END': return 3 + 4*N\n    if isinstance(value, str): return value.replace('@', 'cell' * N)\n    if isinstance(value, list): return [_vary(x) for x in value]\n    if isinstance(value, dict): return {_vary(k): _vary(v) for k,v in value.items()}\n    return value\nN = 1\nobservations = []\ndef solve(data):\n    blocks=[]; current=None; remaining=0\n    for line in data:\n        cells=line.split('|')\n        if len(cells)!=2: return None\n        tag,value=cells\n        if tag=='C':\n            if remaining: return None\n            if not value.isascii() or not value.isdecimal(): return None\n            remaining=int(value); current=[]; blocks.append(current)\n        elif tag=='R':\n            if remaining==0: return None\n            current.append(value); remaining-=1\n        else: return None\n    if remaining: return None\n    return blocks\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('blocks', solve(_vary(['C|2', 'R|@', 'R|x', 'C|1', 'R|z'])), _vary([['@', 'x'], ['z']]))\ncheck('empty block', solve(_vary(['C|0', 'C|1', 'R|@'])), _vary([[], ['@']]))\ncheck('short', solve(_vary(['C|2', 'R|@'])), _vary(None))\ncheck('extra', solve(_vary(['C|1', 'R|@', 'R|x'])), _vary(None))\ncheck('orphan', solve(_vary(['R|@'])), _vary(None))\ncheck('premature block', solve(_vary(['C|2', 'R|@', 'C|0'])), _vary(None))\ncheck('bad tag', solve(_vary(['X|0'])), _vary(None))\ncheck('zero stream', solve(_vary([])), _vary([]))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-delimited-text-counted-record-blocks-block-eof","generated_at":"2026-09-29T14:44:49.573553+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Delimited interchange needs explicit framing, schema and field semantics at ingestion and emission boundaries.","repair":"Preserve the named invariant at the faulty decision: if remaining: return None\nreturn blocks","root_cause":"An incomplete counted block is accepted at EOF.","sha256":"774ea8541f88a303dc5a90ec386adf40bf5fdcdadb32ecad3932507d05f1481a","title":"An incomplete counted block is accepted at EOF · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.142,"exit_code":1,"observations":[{"actual":[["cell","x"],["z"]],"check":"blocks","expected":[["cell","x"],["z"]],"passed":true},{"actual":[[],["cell"]],"check":"empty block","expected":[[],["cell"]],"passed":true},{"actual":[["cell"]],"check":"short","expected":null,"passed":false},{"actual":null,"check":"extra","expected":null,"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"premature block","expected":null,"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":[],"check":"zero stream","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"blocks\", \"actual\": [[\"cell\", \"x\"], [\"z\"]], \"expected\": [[\"cell\", \"x\"], [\"z\"]], \"passed\": true}, {\"check\": \"empty block\", \"actual\": [[], [\"cell\"]], \"expected\": [[], [\"cell\"]], \"passed\": true}, {\"check\": \"short\", \"actual\": [[\"cell\"]], \"expected\": null, \"passed\": false}, {\"check\": \"extra\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"premature block\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero stream\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.296,"exit_code":1,"observations":[{"actual":[["cell","x"],["z"]],"check":"blocks","expected":[["cell","x"],["z"]],"passed":true},{"actual":[[],["cell"]],"check":"empty block","expected":[[],["cell"]],"passed":true},{"actual":[["cell"]],"check":"short","expected":null,"passed":false},{"actual":null,"check":"extra","expected":null,"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"premature block","expected":null,"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":[],"check":"zero stream","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"blocks\", \"actual\": [[\"cell\", \"x\"], [\"z\"]], \"expected\": [[\"cell\", \"x\"], [\"z\"]], \"passed\": true}, {\"check\": \"empty block\", \"actual\": [[], [\"cell\"]], \"expected\": [[], [\"cell\"]], \"passed\": true}, {\"check\": \"short\", \"actual\": [[\"cell\"]], \"expected\": null, \"passed\": false}, {\"check\": \"extra\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"premature block\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero stream\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.119,"exit_code":0,"observations":[{"actual":[["cell","x"],["z"]],"check":"blocks","expected":[["cell","x"],["z"]],"passed":true},{"actual":[[],["cell"]],"check":"empty block","expected":[[],["cell"]],"passed":true},{"actual":null,"check":"short","expected":null,"passed":true},{"actual":null,"check":"extra","expected":null,"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"premature block","expected":null,"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":[],"check":"zero stream","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"blocks\", \"actual\": [[\"cell\", \"x\"], [\"z\"]], \"expected\": [[\"cell\", \"x\"], [\"z\"]], \"passed\": true}, {\"check\": \"empty block\", \"actual\": [[], [\"cell\"]], \"expected\": [[], [\"cell\"]], \"passed\": true}, {\"check\": \"short\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"extra\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"premature block\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero stream\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}