{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":10,"contract":"Parse nonempty comma records with a first header. Skip later records only when the complete row equals the initial header; reject duplicate first header names, data before a header, and data width mismatches. Blank physical lines are ignored.","evaluation_group":"s3-delimited-text-repeated-header","failed_approach":"Dropping only nonfinal blanks leaves a terminal blank record.","family":"s3-delimited-text-repeated-header-blank","id":"FA-47366","implementations":{"attempt":{"sha256":"6faf5a4a6d7814c4909beef2eaf01fece788870ed397b19a577740e6b544ab7a","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    lines = [line for line in data.split('\\n') if line != '' or line == data.split('\\n')[-1]]\n    if not lines: return []\n    header = lines[0].split(',')\n    if len(set(header)) != len(header): return None\n    out = []\n    for line in lines[1:]:\n        row = line.split(',')\n        if row == header: continue\n        if len(row) != len(header): return None\n        out.append(row)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated', solve(_vary('a,b\\n@,z\\na,b\\nx,y')), _vary([['@', 'z'], ['x', 'y']]))\ncheck('partial', solve(_vary('a,b\\na,y')), _vary([['a', 'y']]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('blank', solve(_vary('a,b\\n\\n@,z')), _vary([['@', 'z']]))\ncheck('duplicates', solve(_vary('a,a\\nx,y')), _vary(None))\ncheck('wide', solve(_vary('a,b\\nx,y,z')), _vary(None))\ncheck('narrow', solve(_vary('a,b\\nx')), _vary(None))\ncheck('header only', solve(_vary('a,b')), _vary([]))\ncheck('trailing blank', solve(_vary('a,b\\n@,z\\n')), _vary([['@', 'z']]))\ncheck('permuted header cells', solve(_vary('a,b\\nb,a')), _vary([['b', 'a']]))\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":"d8524d979003d6a74338ecefa839cbe8effae34d802532cc5540e4d9ef7033c6","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    lines = data.split('\\n')\n    if not lines: return []\n    header = lines[0].split(',')\n    if len(set(header)) != len(header): return None\n    out = []\n    for line in lines[1:]:\n        row = line.split(',')\n        if row == header: continue\n        if len(row) != len(header): return None\n        out.append(row)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated', solve(_vary('a,b\\n@,z\\na,b\\nx,y')), _vary([['@', 'z'], ['x', 'y']]))\ncheck('partial', solve(_vary('a,b\\na,y')), _vary([['a', 'y']]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('blank', solve(_vary('a,b\\n\\n@,z')), _vary([['@', 'z']]))\ncheck('duplicates', solve(_vary('a,a\\nx,y')), _vary(None))\ncheck('wide', solve(_vary('a,b\\nx,y,z')), _vary(None))\ncheck('narrow', solve(_vary('a,b\\nx')), _vary(None))\ncheck('header only', solve(_vary('a,b')), _vary([]))\ncheck('trailing blank', solve(_vary('a,b\\n@,z\\n')), _vary([['@', 'z']]))\ncheck('permuted header cells', solve(_vary('a,b\\nb,a')), _vary([['b', 'a']]))\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":"f360b808b146bdee2cc1bd3528e596ddccba1f079f2fff0159ca59855ba9ae6d","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    lines = [line for line in data.split('\\n') if line != '']\n    if not lines: return []\n    header = lines[0].split(',')\n    if len(set(header)) != len(header): return None\n    out = []\n    for line in lines[1:]:\n        row = line.split(',')\n        if row == header: continue\n        if len(row) != len(header): return None\n        out.append(row)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('repeated', solve(_vary('a,b\\n@,z\\na,b\\nx,y')), _vary([['@', 'z'], ['x', 'y']]))\ncheck('partial', solve(_vary('a,b\\na,y')), _vary([['a', 'y']]))\ncheck('empty', solve(_vary('')), _vary([]))\ncheck('blank', solve(_vary('a,b\\n\\n@,z')), _vary([['@', 'z']]))\ncheck('duplicates', solve(_vary('a,a\\nx,y')), _vary(None))\ncheck('wide', solve(_vary('a,b\\nx,y,z')), _vary(None))\ncheck('narrow', solve(_vary('a,b\\nx')), _vary(None))\ncheck('header only', solve(_vary('a,b')), _vary([]))\ncheck('trailing blank', solve(_vary('a,b\\n@,z\\n')), _vary([['@', 'z']]))\ncheck('permuted header cells', solve(_vary('a,b\\nb,a')), _vary([['b', 'a']]))\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-repeated-header-blank","generated_at":"2026-09-29T14:44:40.821353+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: [line for line in data.split('\\n') if line != '']","root_cause":"Physical blank records are retained before schema processing.","sha256":"90f2b0a2695ad59c600f052378d0368657dfcca1202e852fa5a679ae1af37915","title":"Blank table separators become empty records · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.597,"exit_code":1,"observations":[{"actual":[["cell","z"],["x","y"]],"check":"repeated","expected":[["cell","z"],["x","y"]],"passed":true},{"actual":[["a","y"]],"check":"partial","expected":[["a","y"]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["cell","z"]],"check":"blank","expected":[["cell","z"]],"passed":true},{"actual":null,"check":"duplicates","expected":null,"passed":true},{"actual":null,"check":"wide","expected":null,"passed":true},{"actual":null,"check":"narrow","expected":null,"passed":true},{"actual":[],"check":"header only","expected":[],"passed":true},{"actual":null,"check":"trailing blank","expected":[["cell","z"]],"passed":false},{"actual":[["b","a"]],"check":"permuted header cells","expected":[["b","a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated\", \"actual\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"expected\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"passed\": true}, {\"check\": \"partial\", \"actual\": [[\"a\", \"y\"]], \"expected\": [[\"a\", \"y\"]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"blank\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wide\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"narrow\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"header only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing blank\", \"actual\": null, \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"permuted header cells\", \"actual\": [[\"b\", \"a\"]], \"expected\": [[\"b\", \"a\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.766,"exit_code":1,"observations":[{"actual":[["cell","z"],["x","y"]],"check":"repeated","expected":[["cell","z"],["x","y"]],"passed":true},{"actual":[["a","y"]],"check":"partial","expected":[["a","y"]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":null,"check":"blank","expected":[["cell","z"]],"passed":false},{"actual":null,"check":"duplicates","expected":null,"passed":true},{"actual":null,"check":"wide","expected":null,"passed":true},{"actual":null,"check":"narrow","expected":null,"passed":true},{"actual":[],"check":"header only","expected":[],"passed":true},{"actual":null,"check":"trailing blank","expected":[["cell","z"]],"passed":false},{"actual":[["b","a"]],"check":"permuted header cells","expected":[["b","a"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated\", \"actual\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"expected\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"passed\": true}, {\"check\": \"partial\", \"actual\": [[\"a\", \"y\"]], \"expected\": [[\"a\", \"y\"]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"blank\", \"actual\": null, \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"duplicates\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wide\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"narrow\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"header only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing blank\", \"actual\": null, \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"permuted header cells\", \"actual\": [[\"b\", \"a\"]], \"expected\": [[\"b\", \"a\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.595,"exit_code":0,"observations":[{"actual":[["cell","z"],["x","y"]],"check":"repeated","expected":[["cell","z"],["x","y"]],"passed":true},{"actual":[["a","y"]],"check":"partial","expected":[["a","y"]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["cell","z"]],"check":"blank","expected":[["cell","z"]],"passed":true},{"actual":null,"check":"duplicates","expected":null,"passed":true},{"actual":null,"check":"wide","expected":null,"passed":true},{"actual":null,"check":"narrow","expected":null,"passed":true},{"actual":[],"check":"header only","expected":[],"passed":true},{"actual":[["cell","z"]],"check":"trailing blank","expected":[["cell","z"]],"passed":true},{"actual":[["b","a"]],"check":"permuted header cells","expected":[["b","a"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated\", \"actual\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"expected\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"passed\": true}, {\"check\": \"partial\", \"actual\": [[\"a\", \"y\"]], \"expected\": [[\"a\", \"y\"]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"blank\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wide\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"narrow\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"header only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing blank\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"permuted header cells\", \"actual\": [[\"b\", \"a\"]], \"expected\": [[\"b\", \"a\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}