{"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.","contract_signature":"data","evaluation_group":"s3-delimited-text-counted-record-blocks","failed_approach":"The alternate implementation still violates the same declared invariant: a zero-count record block disappears from the decoded stream.","family":"s3-delimited-text-counted-record-blocks-empty-block","id":"FA-48291","implementations":{"attempt":{"sha256":"3613ad0b74d3f6eda5e254a267aee611e7192aa5142a6c5b694a054b0c011be4","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 if remaining else None)\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"},"broken":{"sha256":"1ca319a68fd5fb498b2f87ae1ad238d6251ff0c91a432158d18d4b9ada898973","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=[]\n            if remaining: 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-empty-block","generated_at":"2026-09-29T14:44:49.596061+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.","root_cause":"A zero-count record block disappears from the decoded stream.","sha256":"95694ddaed451c675351cb1c39a15401434045d7a9122dcac74b9feb75aa0669","title":"A zero-count record block disappears from the decoded stream · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.631,"exit_code":1,"observations":[{"actual":[["cell","x"],["z"]],"check":"blocks","expected":[["cell","x"],["z"]],"passed":true},{"actual":[null,["cell"]],"check":"empty block","expected":[[],["cell"]],"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"blocks\", \"actual\": [[\"cell\", \"x\"], [\"z\"]], \"expected\": [[\"cell\", \"x\"], [\"z\"]], \"passed\": true}, {\"check\": \"empty block\", \"actual\": [null, [\"cell\"]], \"expected\": [[], [\"cell\"]], \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":41.743,"exit_code":1,"observations":[{"actual":[["cell","x"],["z"]],"check":"blocks","expected":[["cell","x"],["z"]],"passed":true},{"actual":[["cell"]],"check":"empty block","expected":[[],["cell"]],"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"blocks\", \"actual\": [[\"cell\", \"x\"], [\"z\"]], \"expected\": [[\"cell\", \"x\"], [\"z\"]], \"passed\": true}, {\"check\": \"empty block\", \"actual\": [[\"cell\"]], \"expected\": [[], [\"cell\"]], \"passed\": false}, {\"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\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}