{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Bind a parsed comma row to an exact schema [head, ..., tail] where the middle ... captures zero or more fields as a list. The first and last physical cells bind head and tail; at least two cells are required. The rest list preserves empty cells and order.","evaluation_group":"s3-delimited-text-named-rest-column","failed_approach":"The alternate implementation still violates the same declared invariant: the trailing fixed field uses a schema index instead of the final physical index.","family":"s3-delimited-text-named-rest-column-tail-index","id":"FA-48181","implementations":{"attempt":{"sha256":"dd157635e9c76cf77a2e5a367b7a4a48c4309e4b04ffeed6a2d9966af78f9e67","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    cells=data.split(',')\n    if len(cells)<2: return None\n    head=cells[0]\n    tail=cells[min(2,len(cells)-1)]\n    rest=cells[1:-1]\n    return {'head':head,'rest':rest,'tail':tail}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rest', solve(_vary('a,@,x,z')), _vary({'head': 'a', 'rest': ['@', 'x'], 'tail': 'z'}))\ncheck('none', solve(_vary('a,z')), _vary({'head': 'a', 'rest': [], 'tail': 'z'}))\ncheck('empty rest', solve(_vary('a,,z')), _vary({'head': 'a', 'rest': [''], 'tail': 'z'}))\ncheck('two empties', solve(_vary(',')), _vary({'head': '', 'rest': [], 'tail': ''}))\ncheck('short', solve(_vary('@')), _vary(None))\ncheck('one rest', solve(_vary('a,@,z')), _vary({'head': 'a', 'rest': ['@'], 'tail': 'z'}))\ncheck('trailing', solve(_vary('a,@,')), _vary({'head': 'a', 'rest': ['@'], 'tail': ''}))\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":"1357adc70d4ec662569e1abe61d49154590ed2196965baa19c64c08bebbbb68e","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    cells=data.split(',')\n    if len(cells)<2: return None\n    head=cells[0]\n    tail=cells[1]\n    rest=cells[1:-1]\n    return {'head':head,'rest':rest,'tail':tail}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rest', solve(_vary('a,@,x,z')), _vary({'head': 'a', 'rest': ['@', 'x'], 'tail': 'z'}))\ncheck('none', solve(_vary('a,z')), _vary({'head': 'a', 'rest': [], 'tail': 'z'}))\ncheck('empty rest', solve(_vary('a,,z')), _vary({'head': 'a', 'rest': [''], 'tail': 'z'}))\ncheck('two empties', solve(_vary(',')), _vary({'head': '', 'rest': [], 'tail': ''}))\ncheck('short', solve(_vary('@')), _vary(None))\ncheck('one rest', solve(_vary('a,@,z')), _vary({'head': 'a', 'rest': ['@'], 'tail': 'z'}))\ncheck('trailing', solve(_vary('a,@,')), _vary({'head': 'a', 'rest': ['@'], 'tail': ''}))\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":"72ec4b83818c5a5d3f4770f7b3f760949a17f915394c3c185f1cbaf239a86f5d","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    cells=data.split(',')\n    if len(cells)<2: return None\n    head=cells[0]\n    tail=cells[-1]\n    rest=cells[1:-1]\n    return {'head':head,'rest':rest,'tail':tail}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rest', solve(_vary('a,@,x,z')), _vary({'head': 'a', 'rest': ['@', 'x'], 'tail': 'z'}))\ncheck('none', solve(_vary('a,z')), _vary({'head': 'a', 'rest': [], 'tail': 'z'}))\ncheck('empty rest', solve(_vary('a,,z')), _vary({'head': 'a', 'rest': [''], 'tail': 'z'}))\ncheck('two empties', solve(_vary(',')), _vary({'head': '', 'rest': [], 'tail': ''}))\ncheck('short', solve(_vary('@')), _vary(None))\ncheck('one rest', solve(_vary('a,@,z')), _vary({'head': 'a', 'rest': ['@'], 'tail': 'z'}))\ncheck('trailing', solve(_vary('a,@,')), _vary({'head': 'a', 'rest': ['@'], 'tail': ''}))\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-named-rest-column-tail-index","generated_at":"2026-09-29T14:44:48.342856+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: tail=cells[-1]","root_cause":"The trailing fixed field uses a schema index instead of the final physical index.","sha256":"ea0060d726578603f8f497cb1de6b6aa6de06ae3b3e7e6384b6138b9d069e285","title":"The trailing fixed field uses a schema index instead of the final physical index · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.991,"exit_code":1,"observations":[{"actual":{"head":"a","rest":["cell","x"],"tail":"x"},"check":"rest","expected":{"head":"a","rest":["cell","x"],"tail":"z"},"passed":false},{"actual":{"head":"a","rest":[],"tail":"z"},"check":"none","expected":{"head":"a","rest":[],"tail":"z"},"passed":true},{"actual":{"head":"a","rest":[""],"tail":"z"},"check":"empty rest","expected":{"head":"a","rest":[""],"tail":"z"},"passed":true},{"actual":{"head":"","rest":[],"tail":""},"check":"two empties","expected":{"head":"","rest":[],"tail":""},"passed":true},{"actual":null,"check":"short","expected":null,"passed":true},{"actual":{"head":"a","rest":["cell"],"tail":"z"},"check":"one rest","expected":{"head":"a","rest":["cell"],"tail":"z"},"passed":true},{"actual":{"head":"a","rest":["cell"],"tail":""},"check":"trailing","expected":{"head":"a","rest":["cell"],"tail":""},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\", \"x\"], \"tail\": \"x\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\", \"x\"], \"tail\": \"z\"}, \"passed\": false}, {\"check\": \"none\", \"actual\": {\"head\": \"a\", \"rest\": [], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"empty rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"\"], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"\"], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"two empties\", \"actual\": {\"head\": \"\", \"rest\": [], \"tail\": \"\"}, \"expected\": {\"head\": \"\", \"rest\": [], \"tail\": \"\"}, \"passed\": true}, {\"check\": \"short\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"one rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"trailing\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.451,"exit_code":1,"observations":[{"actual":{"head":"a","rest":["cell","x"],"tail":"cell"},"check":"rest","expected":{"head":"a","rest":["cell","x"],"tail":"z"},"passed":false},{"actual":{"head":"a","rest":[],"tail":"z"},"check":"none","expected":{"head":"a","rest":[],"tail":"z"},"passed":true},{"actual":{"head":"a","rest":[""],"tail":""},"check":"empty rest","expected":{"head":"a","rest":[""],"tail":"z"},"passed":false},{"actual":{"head":"","rest":[],"tail":""},"check":"two empties","expected":{"head":"","rest":[],"tail":""},"passed":true},{"actual":null,"check":"short","expected":null,"passed":true},{"actual":{"head":"a","rest":["cell"],"tail":"cell"},"check":"one rest","expected":{"head":"a","rest":["cell"],"tail":"z"},"passed":false},{"actual":{"head":"a","rest":["cell"],"tail":"cell"},"check":"trailing","expected":{"head":"a","rest":["cell"],"tail":""},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\", \"x\"], \"tail\": \"cell\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\", \"x\"], \"tail\": \"z\"}, \"passed\": false}, {\"check\": \"none\", \"actual\": {\"head\": \"a\", \"rest\": [], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"empty rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"\"], \"tail\": \"\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"\"], \"tail\": \"z\"}, \"passed\": false}, {\"check\": \"two empties\", \"actual\": {\"head\": \"\", \"rest\": [], \"tail\": \"\"}, \"expected\": {\"head\": \"\", \"rest\": [], \"tail\": \"\"}, \"passed\": true}, {\"check\": \"short\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"one rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"cell\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"z\"}, \"passed\": false}, {\"check\": \"trailing\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"cell\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"\"}, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.47,"exit_code":0,"observations":[{"actual":{"head":"a","rest":["cell","x"],"tail":"z"},"check":"rest","expected":{"head":"a","rest":["cell","x"],"tail":"z"},"passed":true},{"actual":{"head":"a","rest":[],"tail":"z"},"check":"none","expected":{"head":"a","rest":[],"tail":"z"},"passed":true},{"actual":{"head":"a","rest":[""],"tail":"z"},"check":"empty rest","expected":{"head":"a","rest":[""],"tail":"z"},"passed":true},{"actual":{"head":"","rest":[],"tail":""},"check":"two empties","expected":{"head":"","rest":[],"tail":""},"passed":true},{"actual":null,"check":"short","expected":null,"passed":true},{"actual":{"head":"a","rest":["cell"],"tail":"z"},"check":"one rest","expected":{"head":"a","rest":["cell"],"tail":"z"},"passed":true},{"actual":{"head":"a","rest":["cell"],"tail":""},"check":"trailing","expected":{"head":"a","rest":["cell"],"tail":""},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\", \"x\"], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\", \"x\"], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"none\", \"actual\": {\"head\": \"a\", \"rest\": [], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"empty rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"\"], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"\"], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"two empties\", \"actual\": {\"head\": \"\", \"rest\": [], \"tail\": \"\"}, \"expected\": {\"head\": \"\", \"rest\": [], \"tail\": \"\"}, \"passed\": true}, {\"check\": \"short\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"one rest\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"z\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"z\"}, \"passed\": true}, {\"check\": \"trailing\", \"actual\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"\"}, \"expected\": {\"head\": \"a\", \"rest\": [\"cell\"], \"tail\": \"\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}