{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Read tagged pipe rows. S|version|headers installs a schema; D|version|values binds a data row to the matching installed version. Revisions are immutable, may be referenced out of installation order, and headers must be unique. Reject unknown version, duplicate revision, or incorrect row width. Return version plus named rows.","evaluation_group":"s3-delimited-text-schema-revision","failed_approach":"Using the first revision merely selects a different incorrect schema.","family":"s3-delimited-text-schema-revision-version-lookup","id":"FA-47991","implementations":{"attempt":{"sha256":"80d764c34a81a1fd1ed0aa0738c4ab90ae44c8d4d4242aece319a5190a4bed3b","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    schemas, rows = {}, []\n    for line in data:\n        cells = line.split('|')\n        if len(cells) < 3: return None\n        tag, version, values = cells[0], cells[1], cells[2:]\n        if tag == 'S':\n            if version in schemas or len(set(values)) != len(values): return None\n            schemas[version] = values\n        elif tag == 'D':\n            if version not in schemas: return None\n            header = list(schemas.values())[0]\n            if len(values) != len(header): return None\n            rows.append([version, dict(zip(header,values))])\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('versions', solve(_vary(['S|unused|x', 'S|1|a|b', 'D|1|@|z', 'S|2|b|a', 'D|2|y|x', 'D|1|m|n'])), _vary([['1', {'a': '@', 'b': 'z'}], ['2', {'b': 'y', 'a': 'x'}], ['1', {'a': 'm', 'b': 'n'}]]))\ncheck('unknown', solve(_vary(['D|1|@'])), _vary(None))\ncheck('immutable', solve(_vary(['S|1|a', 'S|1|b'])), _vary(None))\ncheck('duplicate header', solve(_vary(['S|1|a|a'])), _vary(None))\ncheck('wrong width', solve(_vary(['S|1|a|b', 'D|1|@'])), _vary(None))\ncheck('normal', solve(_vary(['S|@|a', 'D|@|z'])), _vary([['@', {'a': 'z'}]]))\ncheck('bad tag', solve(_vary(['X|1|a'])), _vary(None))\ncheck('empty', solve(_vary([])), _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":"64ae3a827e56ca9257e8967002589a39bb3a96da4b3998e9b10c3fb5202157cc","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    schemas, rows = {}, []\n    for line in data:\n        cells = line.split('|')\n        if len(cells) < 3: return None\n        tag, version, values = cells[0], cells[1], cells[2:]\n        if tag == 'S':\n            if version in schemas or len(set(values)) != len(values): return None\n            schemas[version] = values\n        elif tag == 'D':\n            if version not in schemas: return None\n            header = list(schemas.values())[-1]\n            if len(values) != len(header): return None\n            rows.append([version, dict(zip(header,values))])\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('versions', solve(_vary(['S|unused|x', 'S|1|a|b', 'D|1|@|z', 'S|2|b|a', 'D|2|y|x', 'D|1|m|n'])), _vary([['1', {'a': '@', 'b': 'z'}], ['2', {'b': 'y', 'a': 'x'}], ['1', {'a': 'm', 'b': 'n'}]]))\ncheck('unknown', solve(_vary(['D|1|@'])), _vary(None))\ncheck('immutable', solve(_vary(['S|1|a', 'S|1|b'])), _vary(None))\ncheck('duplicate header', solve(_vary(['S|1|a|a'])), _vary(None))\ncheck('wrong width', solve(_vary(['S|1|a|b', 'D|1|@'])), _vary(None))\ncheck('normal', solve(_vary(['S|@|a', 'D|@|z'])), _vary([['@', {'a': 'z'}]]))\ncheck('bad tag', solve(_vary(['X|1|a'])), _vary(None))\ncheck('empty', solve(_vary([])), _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":"e7078e9ff823c24eec1191595019885569342ff434b22e8e34604bf818424098","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    schemas, rows = {}, []\n    for line in data:\n        cells = line.split('|')\n        if len(cells) < 3: return None\n        tag, version, values = cells[0], cells[1], cells[2:]\n        if tag == 'S':\n            if version in schemas or len(set(values)) != len(values): return None\n            schemas[version] = values\n        elif tag == 'D':\n            if version not in schemas: return None\n            header = schemas[version]\n            if len(values) != len(header): return None\n            rows.append([version, dict(zip(header,values))])\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('versions', solve(_vary(['S|unused|x', 'S|1|a|b', 'D|1|@|z', 'S|2|b|a', 'D|2|y|x', 'D|1|m|n'])), _vary([['1', {'a': '@', 'b': 'z'}], ['2', {'b': 'y', 'a': 'x'}], ['1', {'a': 'm', 'b': 'n'}]]))\ncheck('unknown', solve(_vary(['D|1|@'])), _vary(None))\ncheck('immutable', solve(_vary(['S|1|a', 'S|1|b'])), _vary(None))\ncheck('duplicate header', solve(_vary(['S|1|a|a'])), _vary(None))\ncheck('wrong width', solve(_vary(['S|1|a|b', 'D|1|@'])), _vary(None))\ncheck('normal', solve(_vary(['S|@|a', 'D|@|z'])), _vary([['@', {'a': 'z'}]]))\ncheck('bad tag', solve(_vary(['X|1|a'])), _vary(None))\ncheck('empty', solve(_vary([])), _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-schema-revision-version-lookup","generated_at":"2026-09-29T14:44:46.711333+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: header = schemas[version]","root_cause":"The binding path ignores the row version tag.","sha256":"665f0a751530a4036677d5a18aad89e61e459dc99ac77e1be90f16b69f2aea09","title":"A row is bound using the newest schema instead of its declared revision · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.738,"exit_code":1,"observations":[{"actual":null,"check":"versions","expected":[["1",{"a":"cell","b":"z"}],["2",{"a":"x","b":"y"}],["1",{"a":"m","b":"n"}]],"passed":false},{"actual":null,"check":"unknown","expected":null,"passed":true},{"actual":null,"check":"immutable","expected":null,"passed":true},{"actual":null,"check":"duplicate header","expected":null,"passed":true},{"actual":null,"check":"wrong width","expected":null,"passed":true},{"actual":[["cell",{"a":"z"}]],"check":"normal","expected":[["cell",{"a":"z"}]],"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"versions\", \"actual\": null, \"expected\": [[\"1\", {\"a\": \"cell\", \"b\": \"z\"}], [\"2\", {\"b\": \"y\", \"a\": \"x\"}], [\"1\", {\"a\": \"m\", \"b\": \"n\"}]], \"passed\": false}, {\"check\": \"unknown\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"immutable\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate header\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong width\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": [[\"cell\", {\"a\": \"z\"}]], \"expected\": [[\"cell\", {\"a\": \"z\"}]], \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.163,"exit_code":1,"observations":[{"actual":[["1",{"a":"cell","b":"z"}],["2",{"a":"x","b":"y"}],["1",{"a":"n","b":"m"}]],"check":"versions","expected":[["1",{"a":"cell","b":"z"}],["2",{"a":"x","b":"y"}],["1",{"a":"m","b":"n"}]],"passed":false},{"actual":null,"check":"unknown","expected":null,"passed":true},{"actual":null,"check":"immutable","expected":null,"passed":true},{"actual":null,"check":"duplicate header","expected":null,"passed":true},{"actual":null,"check":"wrong width","expected":null,"passed":true},{"actual":[["cell",{"a":"z"}]],"check":"normal","expected":[["cell",{"a":"z"}]],"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"versions\", \"actual\": [[\"1\", {\"a\": \"cell\", \"b\": \"z\"}], [\"2\", {\"b\": \"y\", \"a\": \"x\"}], [\"1\", {\"b\": \"m\", \"a\": \"n\"}]], \"expected\": [[\"1\", {\"a\": \"cell\", \"b\": \"z\"}], [\"2\", {\"b\": \"y\", \"a\": \"x\"}], [\"1\", {\"a\": \"m\", \"b\": \"n\"}]], \"passed\": false}, {\"check\": \"unknown\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"immutable\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate header\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong width\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": [[\"cell\", {\"a\": \"z\"}]], \"expected\": [[\"cell\", {\"a\": \"z\"}]], \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.793,"exit_code":0,"observations":[{"actual":[["1",{"a":"cell","b":"z"}],["2",{"a":"x","b":"y"}],["1",{"a":"m","b":"n"}]],"check":"versions","expected":[["1",{"a":"cell","b":"z"}],["2",{"a":"x","b":"y"}],["1",{"a":"m","b":"n"}]],"passed":true},{"actual":null,"check":"unknown","expected":null,"passed":true},{"actual":null,"check":"immutable","expected":null,"passed":true},{"actual":null,"check":"duplicate header","expected":null,"passed":true},{"actual":null,"check":"wrong width","expected":null,"passed":true},{"actual":[["cell",{"a":"z"}]],"check":"normal","expected":[["cell",{"a":"z"}]],"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"versions\", \"actual\": [[\"1\", {\"a\": \"cell\", \"b\": \"z\"}], [\"2\", {\"b\": \"y\", \"a\": \"x\"}], [\"1\", {\"a\": \"m\", \"b\": \"n\"}]], \"expected\": [[\"1\", {\"a\": \"cell\", \"b\": \"z\"}], [\"2\", {\"b\": \"y\", \"a\": \"x\"}], [\"1\", {\"a\": \"m\", \"b\": \"n\"}]], \"passed\": true}, {\"check\": \"unknown\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"immutable\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate header\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong width\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal\", \"actual\": [[\"cell\", {\"a\": \"z\"}]], \"expected\": [[\"cell\", {\"a\": \"z\"}]], \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}