{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Process an initial comma header plus ORDER|comma-indexes and DATA|comma-values records. ORDER is a zero-based permutation describing each incoming position original column index. Each new order replaces the previous order. DATA is rearranged into original header order. Reject invalid permutations and row widths.","contract_signature":"data","evaluation_group":"s3-delimited-text-column-order-records","failed_approach":"The alternate implementation still violates the same declared invariant: incoming column indexes are used in the inverse direction.","family":"s3-delimited-text-column-order-records-permutation-direction","id":"FA-48391","implementations":{"attempt":{"sha256":"ef16b198ee4329f4ff1ec5b8cb18038b33c2882431282efe8b5336dd9aa7422b","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    width=len(data[0].split(',')); order=list(range(width)); rows=[]\n    for line in data[1:]:\n        tag,payload=(line.split('|',1)+[''])[:2]\n        fields=payload.split(',')\n        if tag=='ORDER':\n            if any(not x.isascii() or not x.isdecimal() for x in fields): return None\n            proposal=[int(x) for x in fields]\n            if sorted(proposal)!=list(range(width)): return None\n            order=proposal\n        elif tag=='DATA':\n            if len(fields)!=width: return None\n            row=[None]*width\n            for position,original in enumerate(order): row[position]=fields[position]\n            rows.append(row)\n        else: return None\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cyclic', solve(_vary(['a,b,c', 'ORDER|2,0,1', 'DATA|z,@,y'])), _vary([['@', 'y', 'z']]))\ncheck('replace', solve(_vary(['a,b,c', 'ORDER|2,0,1', 'ORDER|1,2,0', 'DATA|y,z,@'])), _vary([['@', 'y', 'z']]))\ncheck('duplicate order', solve(_vary(['a,b', 'ORDER|0,0'])), _vary(None))\ncheck('out of range', solve(_vary(['a,b', 'ORDER|0,2'])), _vary(None))\ncheck('wrong width', solve(_vary(['a,b', 'DATA|@'])), _vary(None))\ncheck('identity', solve(_vary(['a,b', 'DATA|@,z'])), _vary([['@', 'z']]))\ncheck('reset', solve(_vary(['a,b', 'ORDER|1,0', 'DATA|x,@', 'ORDER|0,1', 'DATA|@,y'])), _vary([['@', 'x'], ['@', 'y']]))\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":"e126168aff5f7abccd6eaa2ca430b9071d9cb3722a0a5c2361d215f141ad674e","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    width=len(data[0].split(',')); order=list(range(width)); rows=[]\n    for line in data[1:]:\n        tag,payload=(line.split('|',1)+[''])[:2]\n        fields=payload.split(',')\n        if tag=='ORDER':\n            if any(not x.isascii() or not x.isdecimal() for x in fields): return None\n            proposal=[int(x) for x in fields]\n            if sorted(proposal)!=list(range(width)): return None\n            order=proposal\n        elif tag=='DATA':\n            if len(fields)!=width: return None\n            row=[None]*width\n            for position,original in enumerate(order): row[position]=fields[original]\n            rows.append(row)\n        else: return None\n    return rows\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('cyclic', solve(_vary(['a,b,c', 'ORDER|2,0,1', 'DATA|z,@,y'])), _vary([['@', 'y', 'z']]))\ncheck('replace', solve(_vary(['a,b,c', 'ORDER|2,0,1', 'ORDER|1,2,0', 'DATA|y,z,@'])), _vary([['@', 'y', 'z']]))\ncheck('duplicate order', solve(_vary(['a,b', 'ORDER|0,0'])), _vary(None))\ncheck('out of range', solve(_vary(['a,b', 'ORDER|0,2'])), _vary(None))\ncheck('wrong width', solve(_vary(['a,b', 'DATA|@'])), _vary(None))\ncheck('identity', solve(_vary(['a,b', 'DATA|@,z'])), _vary([['@', 'z']]))\ncheck('reset', solve(_vary(['a,b', 'ORDER|1,0', 'DATA|x,@', 'ORDER|0,1', 'DATA|@,y'])), _vary([['@', 'x'], ['@', 'y']]))\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-column-order-records-permutation-direction","generated_at":"2026-09-29T14:44:50.539296+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":"Incoming column indexes are used in the inverse direction.","sha256":"c82ac89f81eca3a92b78f94d3b59fe190c5080b66d975956fa6a9720fa42e06d","title":"Incoming column indexes are used in the inverse direction · 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":41.233,"exit_code":1,"observations":[{"actual":[["z","cell","y"]],"check":"cyclic","expected":[["cell","y","z"]],"passed":false},{"actual":[["y","z","cell"]],"check":"replace","expected":[["cell","y","z"]],"passed":false},{"actual":null,"check":"duplicate order","expected":null,"passed":true},{"actual":null,"check":"out of range","expected":null,"passed":true},{"actual":null,"check":"wrong width","expected":null,"passed":true},{"actual":[["cell","z"]],"check":"identity","expected":[["cell","z"]],"passed":true},{"actual":[["x","cell"],["cell","y"]],"check":"reset","expected":[["cell","x"],["cell","y"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cyclic\", \"actual\": [[\"z\", \"cell\", \"y\"]], \"expected\": [[\"cell\", \"y\", \"z\"]], \"passed\": false}, {\"check\": \"replace\", \"actual\": [[\"y\", \"z\", \"cell\"]], \"expected\": [[\"cell\", \"y\", \"z\"]], \"passed\": false}, {\"check\": \"duplicate order\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"out of range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong width\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"identity\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"reset\", \"actual\": [[\"x\", \"cell\"], [\"cell\", \"y\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"y\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.228,"exit_code":1,"observations":[{"actual":[["y","z","cell"]],"check":"cyclic","expected":[["cell","y","z"]],"passed":false},{"actual":[["z","cell","y"]],"check":"replace","expected":[["cell","y","z"]],"passed":false},{"actual":null,"check":"duplicate order","expected":null,"passed":true},{"actual":null,"check":"out of range","expected":null,"passed":true},{"actual":null,"check":"wrong width","expected":null,"passed":true},{"actual":[["cell","z"]],"check":"identity","expected":[["cell","z"]],"passed":true},{"actual":[["cell","x"],["cell","y"]],"check":"reset","expected":[["cell","x"],["cell","y"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cyclic\", \"actual\": [[\"y\", \"z\", \"cell\"]], \"expected\": [[\"cell\", \"y\", \"z\"]], \"passed\": false}, {\"check\": \"replace\", \"actual\": [[\"z\", \"cell\", \"y\"]], \"expected\": [[\"cell\", \"y\", \"z\"]], \"passed\": false}, {\"check\": \"duplicate order\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"out of range\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong width\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"identity\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"reset\", \"actual\": [[\"cell\", \"x\"], [\"cell\", \"y\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"y\"]], \"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."}}