{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Assemble one row from pipe fragments offset|comma-fields and a declared width. Offsets are zero-based unsigned ASCII integers. Fragments may arrive out of order, but overlap, overrun and holes reject. Empty fields are real supplied cells. Return the complete physical row.","evaluation_group":"s3-delimited-text-segmented-row","failed_approach":"The alternate implementation still violates the same declared invariant: every fragment cell is assigned to the fragment start.","family":"s3-delimited-text-segmented-row-fragment-index","id":"FA-48661","implementations":{"attempt":{"sha256":"2e6cd5c63587f7f90c0552f2088df59cf533bfc36f96254325276733ffdd7c2e","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    slots={}\n    for line in data['fragments']:\n        parts=line.split('|',1)\n        if len(parts)!=2 or not parts[0].isascii() or not parts[0].isdecimal(): return None\n        start=int(parts[0]); fields=parts[1].split(',')\n        if start+len(fields)>data['width']: return None\n        for offset,value in enumerate(fields):\n            index=offset\n            if index in slots: return None\n            slots[index]=value\n    if len(slots)!=data['width']: return None\n    return [slots[index] for index in range(data['width'])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('out of order', solve(_vary({'width': 4, 'fragments': ['2|x,z', '0|@,y']})), _vary(['@', 'y', 'x', 'z']))\ncheck('overlap', solve(_vary({'width': 3, 'fragments': ['0|a,b', '1|c,d']})), _vary(None))\ncheck('hole', solve(_vary({'width': 3, 'fragments': ['0|@', '2|z']})), _vary(None))\ncheck('overrun', solve(_vary({'width': 2, 'fragments': ['1|a,b']})), _vary(None))\ncheck('empty supplied', solve(_vary({'width': 2, 'fragments': ['1|', '0|@']})), _vary(['@', '']))\ncheck('zero width', solve(_vary({'width': 0, 'fragments': []})), _vary([]))\ncheck('single', solve(_vary({'width': 1, 'fragments': ['0|@']})), _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":"fd72044fda6899660a1f399bce8aa60d5a8c0fbf44c10531591e2ad619161346","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    slots={}\n    for line in data['fragments']:\n        parts=line.split('|',1)\n        if len(parts)!=2 or not parts[0].isascii() or not parts[0].isdecimal(): return None\n        start=int(parts[0]); fields=parts[1].split(',')\n        if start+len(fields)>data['width']: return None\n        for offset,value in enumerate(fields):\n            index=start\n            if index in slots: return None\n            slots[index]=value\n    if len(slots)!=data['width']: return None\n    return [slots[index] for index in range(data['width'])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('out of order', solve(_vary({'width': 4, 'fragments': ['2|x,z', '0|@,y']})), _vary(['@', 'y', 'x', 'z']))\ncheck('overlap', solve(_vary({'width': 3, 'fragments': ['0|a,b', '1|c,d']})), _vary(None))\ncheck('hole', solve(_vary({'width': 3, 'fragments': ['0|@', '2|z']})), _vary(None))\ncheck('overrun', solve(_vary({'width': 2, 'fragments': ['1|a,b']})), _vary(None))\ncheck('empty supplied', solve(_vary({'width': 2, 'fragments': ['1|', '0|@']})), _vary(['@', '']))\ncheck('zero width', solve(_vary({'width': 0, 'fragments': []})), _vary([]))\ncheck('single', solve(_vary({'width': 1, 'fragments': ['0|@']})), _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"},"fixed":{"sha256":"e004e947c95e28dbc23749344fabcef6eee9a284a321b52fbab788418227e5db","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    slots={}\n    for line in data['fragments']:\n        parts=line.split('|',1)\n        if len(parts)!=2 or not parts[0].isascii() or not parts[0].isdecimal(): return None\n        start=int(parts[0]); fields=parts[1].split(',')\n        if start+len(fields)>data['width']: return None\n        for offset,value in enumerate(fields):\n            index=start+offset\n            if index in slots: return None\n            slots[index]=value\n    if len(slots)!=data['width']: return None\n    return [slots[index] for index in range(data['width'])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('out of order', solve(_vary({'width': 4, 'fragments': ['2|x,z', '0|@,y']})), _vary(['@', 'y', 'x', 'z']))\ncheck('overlap', solve(_vary({'width': 3, 'fragments': ['0|a,b', '1|c,d']})), _vary(None))\ncheck('hole', solve(_vary({'width': 3, 'fragments': ['0|@', '2|z']})), _vary(None))\ncheck('overrun', solve(_vary({'width': 2, 'fragments': ['1|a,b']})), _vary(None))\ncheck('empty supplied', solve(_vary({'width': 2, 'fragments': ['1|', '0|@']})), _vary(['@', '']))\ncheck('zero width', solve(_vary({'width': 0, 'fragments': []})), _vary([]))\ncheck('single', solve(_vary({'width': 1, 'fragments': ['0|@']})), _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-segmented-row-fragment-index","generated_at":"2026-09-29T14:44:52.791262+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: index=start+offset","root_cause":"Every fragment cell is assigned to the fragment start.","sha256":"4c6fedf624e082a653f463ae6f1fe9a5678dfad81ec327d6e6a4f7073d6b44ed","title":"Every fragment cell is assigned to the fragment start · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.049,"exit_code":1,"observations":[{"actual":null,"check":"out of order","expected":["cell","y","x","z"],"passed":false},{"actual":null,"check":"overlap","expected":null,"passed":true},{"actual":null,"check":"hole","expected":null,"passed":true},{"actual":null,"check":"overrun","expected":null,"passed":true},{"actual":null,"check":"empty supplied","expected":["cell",""],"passed":false},{"actual":[],"check":"zero width","expected":[],"passed":true},{"actual":["cell"],"check":"single","expected":["cell"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"out of order\", \"actual\": null, \"expected\": [\"cell\", \"y\", \"x\", \"z\"], \"passed\": false}, {\"check\": \"overlap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"hole\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"overrun\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty supplied\", \"actual\": null, \"expected\": [\"cell\", \"\"], \"passed\": false}, {\"check\": \"zero width\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.163,"exit_code":1,"observations":[{"actual":null,"check":"out of order","expected":["cell","y","x","z"],"passed":false},{"actual":null,"check":"overlap","expected":null,"passed":true},{"actual":null,"check":"hole","expected":null,"passed":true},{"actual":null,"check":"overrun","expected":null,"passed":true},{"actual":["cell",""],"check":"empty supplied","expected":["cell",""],"passed":true},{"actual":[],"check":"zero width","expected":[],"passed":true},{"actual":["cell"],"check":"single","expected":["cell"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"out of order\", \"actual\": null, \"expected\": [\"cell\", \"y\", \"x\", \"z\"], \"passed\": false}, {\"check\": \"overlap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"hole\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"overrun\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty supplied\", \"actual\": [\"cell\", \"\"], \"expected\": [\"cell\", \"\"], \"passed\": true}, {\"check\": \"zero width\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.132,"exit_code":0,"observations":[{"actual":["cell","y","x","z"],"check":"out of order","expected":["cell","y","x","z"],"passed":true},{"actual":null,"check":"overlap","expected":null,"passed":true},{"actual":null,"check":"hole","expected":null,"passed":true},{"actual":null,"check":"overrun","expected":null,"passed":true},{"actual":["cell",""],"check":"empty supplied","expected":["cell",""],"passed":true},{"actual":[],"check":"zero width","expected":[],"passed":true},{"actual":["cell"],"check":"single","expected":["cell"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"out of order\", \"actual\": [\"cell\", \"y\", \"x\", \"z\"], \"expected\": [\"cell\", \"y\", \"x\", \"z\"], \"passed\": true}, {\"check\": \"overlap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"hole\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"overrun\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty supplied\", \"actual\": [\"cell\", \"\"], \"expected\": [\"cell\", \"\"], \"passed\": true}, {\"check\": \"zero width\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [\"cell\"], \"expected\": [\"cell\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}