{"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":"Clipping the last record changes which legitimate row disappears.","family":"s3-delimited-text-repeated-header-header-start","id":"FA-47371","implementations":{"attempt":{"sha256":"629e7160da9e2d6b9d44f575485bde3b61ad68ad60c674dc3e958f661c9af62b","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:-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":"f83ecc7a6ba2abca632995a91beead76a0d3be66fa56fcf3563cb889fa6b607e","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[2:]:\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-header-start","generated_at":"2026-09-29T14:44:40.863165+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: for line in lines[1:]:","root_cause":"The body cursor advances one record too far.","sha256":"f27f80c7a6cb32f5b87bb6ff5e6b0f75aeead6e3c2926cce7c99a849bd3cc0d2","title":"The first data row is skipped as another header · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.504,"exit_code":1,"observations":[{"actual":[["cell","z"]],"check":"repeated","expected":[["cell","z"],["x","y"]],"passed":false},{"actual":[],"check":"partial","expected":[["a","y"]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[],"check":"blank","expected":[["cell","z"]],"passed":false},{"actual":null,"check":"duplicates","expected":null,"passed":true},{"actual":[],"check":"wide","expected":null,"passed":false},{"actual":[],"check":"narrow","expected":null,"passed":false},{"actual":[],"check":"header only","expected":[],"passed":true},{"actual":[],"check":"trailing blank","expected":[["cell","z"]],"passed":false},{"actual":[],"check":"permuted header cells","expected":[["b","a"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"passed\": false}, {\"check\": \"partial\", \"actual\": [], \"expected\": [[\"a\", \"y\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"blank\", \"actual\": [], \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"duplicates\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wide\", \"actual\": [], \"expected\": null, \"passed\": false}, {\"check\": \"narrow\", \"actual\": [], \"expected\": null, \"passed\": false}, {\"check\": \"header only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing blank\", \"actual\": [], \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"permuted header cells\", \"actual\": [], \"expected\": [[\"b\", \"a\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.787,"exit_code":1,"observations":[{"actual":[["x","y"]],"check":"repeated","expected":[["cell","z"],["x","y"]],"passed":false},{"actual":[],"check":"partial","expected":[["a","y"]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[],"check":"blank","expected":[["cell","z"]],"passed":false},{"actual":null,"check":"duplicates","expected":null,"passed":true},{"actual":[],"check":"wide","expected":null,"passed":false},{"actual":[],"check":"narrow","expected":null,"passed":false},{"actual":[],"check":"header only","expected":[],"passed":true},{"actual":[],"check":"trailing blank","expected":[["cell","z"]],"passed":false},{"actual":[],"check":"permuted header cells","expected":[["b","a"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeated\", \"actual\": [[\"x\", \"y\"]], \"expected\": [[\"cell\", \"z\"], [\"x\", \"y\"]], \"passed\": false}, {\"check\": \"partial\", \"actual\": [], \"expected\": [[\"a\", \"y\"]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"blank\", \"actual\": [], \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"duplicates\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wide\", \"actual\": [], \"expected\": null, \"passed\": false}, {\"check\": \"narrow\", \"actual\": [], \"expected\": null, \"passed\": false}, {\"check\": \"header only\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"trailing blank\", \"actual\": [], \"expected\": [[\"cell\", \"z\"]], \"passed\": false}, {\"check\": \"permuted header cells\", \"actual\": [], \"expected\": [[\"b\", \"a\"]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":46.643,"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"}