{"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: a new column-order announcement composes with stale order.","family":"s3-delimited-text-column-order-records-replace-order","id":"FA-48396","implementations":{"attempt":{"sha256":"e1005cb62df82f1f72ef24a71f5b080c6c44bb2eb8bd1d4ffc56f0395ad16e74","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=list(reversed(proposal))\n        elif tag=='DATA':\n            if len(fields)!=width: return None\n            row=[None]*width\n            for position,original in enumerate(order): row[original]=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":"92a3114f8d1af85addecefe463d3f929ea992066a9eb3da3725abcb960b910a7","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=[order[i] for i in proposal]\n        elif tag=='DATA':\n            if len(fields)!=width: return None\n            row=[None]*width\n            for position,original in enumerate(order): row[original]=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"}},"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-replace-order","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":"A new column-order announcement composes with stale order.","sha256":"98f6ec1ceed714d833ff8f15b10dac12ad4ce74ee58c26878392b08d0d99ae8b","title":"A new column-order announcement composes with stale order · 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":37.47,"exit_code":1,"observations":[{"actual":[["cell","z","y"]],"check":"cyclic","expected":[["cell","y","z"]],"passed":false},{"actual":[["y","cell","z"]],"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"],["y","cell"]],"check":"reset","expected":[["cell","x"],["cell","y"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cyclic\", \"actual\": [[\"cell\", \"z\", \"y\"]], \"expected\": [[\"cell\", \"y\", \"z\"]], \"passed\": false}, {\"check\": \"replace\", \"actual\": [[\"y\", \"cell\", \"z\"]], \"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\"], [\"y\", \"cell\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"y\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.555,"exit_code":1,"observations":[{"actual":[["cell","y","z"]],"check":"cyclic","expected":[["cell","y","z"]],"passed":true},{"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":[["cell","x"],["y","cell"]],"check":"reset","expected":[["cell","x"],["cell","y"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cyclic\", \"actual\": [[\"cell\", \"y\", \"z\"]], \"expected\": [[\"cell\", \"y\", \"z\"]], \"passed\": true}, {\"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\": [[\"cell\", \"x\"], [\"y\", \"cell\"]], \"expected\": [[\"cell\", \"x\"], [\"cell\", \"y\"]], \"passed\": false}], \"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."}}