{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":9,"contract":"Read a bounded sectioned TSV stream: @name starts a new table, the next record is its header, subsequent records its data. Names are unique and nonempty. A blank line closes a section; body records outside sections and sections without headers reject. Return ordered [name, header, rows] sections.","contract_signature":"data","evaluation_group":"s3-delimited-text-sectioned-tables","failed_approach":"Only validating later sections still accepts a first headerless section.","family":"s3-delimited-text-sectioned-tables-pending-eof","id":"FA-47556","implementations":{"attempt":{"sha256":"64a2410efcd39235fa0265cef0a39a6b5eaa79f8281348b92832f158e562fd23","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    sections, current, needs_header = [], None, False\n    for line in data:\n        if line.startswith('%'):\n            if current is not None and needs_header: return None\n            name = line[1:]\n            if not name or any(s[0] == name for s in sections): return None\n            current = [name, [], []]\n            sections.append(current)\n            needs_header = True\n        elif line == '':\n            if needs_header: return None\n            current = None\n        elif current is None: return None\n        elif needs_header:\n            current[1] = line.split('\\t')\n            needs_header = False\n        else: current[2].append(line.split('\\t'))\n    if needs_header and len(sections) > 1: return None\n    return sections\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two sections', solve(_vary(['%one', 'a\\tb', '@\\tz', '%two', 'x', 'q'])), _vary([['one', ['a', 'b'], [['@', 'z']]], ['two', ['x'], [['q']]]]))\ncheck('section close', solve(_vary(['%one', 'a', 'x', '', 'orphan'])), _vary(None))\ncheck('empty section', solve(_vary(['%one', '%two', 'a'])), _vary(None))\ncheck('missing eof header', solve(_vary(['%one'])), _vary(None))\ncheck('duplicate', solve(_vary(['%one', 'a', '%one', 'b'])), _vary(None))\ncheck('empty name', solve(_vary(['%', 'a'])), _vary(None))\ncheck('normal', solve(_vary(['%one', 'a', '%'])), _vary(None))\ncheck('zero', solve(_vary([])), _vary([]))\ncheck('body control', solve(_vary(['%one', 'a', 'cell', 'two'])), _vary([['one', ['a'], [['cell'], ['two']]]]))\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":"6b88a1ff376d19ab0b0174a218b3eee1708bd4a6194ebaded219c260cdebd9d6","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    sections, current, needs_header = [], None, False\n    for line in data:\n        if line.startswith('%'):\n            if current is not None and needs_header: return None\n            name = line[1:]\n            if not name or any(s[0] == name for s in sections): return None\n            current = [name, [], []]\n            sections.append(current)\n            needs_header = True\n        elif line == '':\n            if needs_header: return None\n            current = None\n        elif current is None: return None\n        elif needs_header:\n            current[1] = line.split('\\t')\n            needs_header = False\n        else: current[2].append(line.split('\\t'))\n    return sections\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two sections', solve(_vary(['%one', 'a\\tb', '@\\tz', '%two', 'x', 'q'])), _vary([['one', ['a', 'b'], [['@', 'z']]], ['two', ['x'], [['q']]]]))\ncheck('section close', solve(_vary(['%one', 'a', 'x', '', 'orphan'])), _vary(None))\ncheck('empty section', solve(_vary(['%one', '%two', 'a'])), _vary(None))\ncheck('missing eof header', solve(_vary(['%one'])), _vary(None))\ncheck('duplicate', solve(_vary(['%one', 'a', '%one', 'b'])), _vary(None))\ncheck('empty name', solve(_vary(['%', 'a'])), _vary(None))\ncheck('normal', solve(_vary(['%one', 'a', '%'])), _vary(None))\ncheck('zero', solve(_vary([])), _vary([]))\ncheck('body control', solve(_vary(['%one', 'a', 'cell', 'two'])), _vary([['one', ['a'], [['cell'], ['two']]]]))\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-sectioned-tables-pending-eof","generated_at":"2026-09-29T14:44:42.629573+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":"EOF forgets a pending section header obligation.","sha256":"8f80f79d2e92b2bdb72bdd06c12e5db22f4757a5c98ed5f0c01b7d24fd1051e1","title":"An EOF section directive is accepted without a header · 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":44.583,"exit_code":1,"observations":[{"actual":[["one",["a","b"],[["cell","z"]]],["two",["x"],[["q"]]]],"check":"two sections","expected":[["one",["a","b"],[["cell","z"]]],["two",["x"],[["q"]]]],"passed":true},{"actual":null,"check":"section close","expected":null,"passed":true},{"actual":null,"check":"empty section","expected":null,"passed":true},{"actual":[["one",[],[]]],"check":"missing eof header","expected":null,"passed":false},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":null,"check":"normal","expected":null,"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true},{"actual":[["one",["a"],[["cell"],["two"]]]],"check":"body control","expected":[["one",["a"],[["cell"],["two"]]]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two sections\", \"actual\": [[\"one\", [\"a\", \"b\"], [[\"cell\", \"z\"]]], [\"two\", [\"x\"], [[\"q\"]]]], \"expected\": [[\"one\", [\"a\", \"b\"], [[\"cell\", \"z\"]]], [\"two\", [\"x\"], [[\"q\"]]]], \"passed\": true}, {\"check\": \"section close\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty section\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"missing eof header\", \"actual\": [[\"one\", [], []]], \"expected\": null, \"passed\": false}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"body control\", \"actual\": [[\"one\", [\"a\"], [[\"cell\"], [\"two\"]]]], \"expected\": [[\"one\", [\"a\"], [[\"cell\"], [\"two\"]]]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.665,"exit_code":1,"observations":[{"actual":[["one",["a","b"],[["cell","z"]]],["two",["x"],[["q"]]]],"check":"two sections","expected":[["one",["a","b"],[["cell","z"]]],["two",["x"],[["q"]]]],"passed":true},{"actual":null,"check":"section close","expected":null,"passed":true},{"actual":null,"check":"empty section","expected":null,"passed":true},{"actual":[["one",[],[]]],"check":"missing eof header","expected":null,"passed":false},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":null,"check":"normal","expected":null,"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true},{"actual":[["one",["a"],[["cell"],["two"]]]],"check":"body control","expected":[["one",["a"],[["cell"],["two"]]]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two sections\", \"actual\": [[\"one\", [\"a\", \"b\"], [[\"cell\", \"z\"]]], [\"two\", [\"x\"], [[\"q\"]]]], \"expected\": [[\"one\", [\"a\", \"b\"], [[\"cell\", \"z\"]]], [\"two\", [\"x\"], [[\"q\"]]]], \"passed\": true}, {\"check\": \"section close\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty section\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"missing eof header\", \"actual\": [[\"one\", [], []]], \"expected\": null, \"passed\": false}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"body control\", \"actual\": [[\"one\", [\"a\"], [[\"cell\"], [\"two\"]]]], \"expected\": [[\"one\", [\"a\"], [[\"cell\"], [\"two\"]]]], \"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."}}