{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Read pipe records DEF|id|literal and ROW|comma-separated IDs. Definitions are immutable; rows may reference only preceding IDs, and preserve repeated references. Literal definition payloads may contain pipes. Return expanded text rows. An empty ROW payload is a zero-cell row.","contract_signature":"data","evaluation_group":"s3-delimited-text-dictionary-cells","failed_approach":"The alternate implementation still violates the same declared invariant: a dictionary cell definition is overwritten by a later record.","family":"s3-delimited-text-dictionary-cells-definition-immutable","id":"FA-48356","implementations":{"attempt":{"sha256":"d0d1124b6422af8e106fd77c136cfa5f1c86165a6e215ab496bff4d66dec2e81","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    dictionary,rows={},[]\n    for line in data:\n        parts=line.split('|',2)\n        if parts[0]=='DEF' and len(parts)==3:\n            if parts[1] in dictionary: continue\n            dictionary[parts[1]]=parts[2]\n        elif parts[0]=='ROW' and len(parts)==2:\n            ids=parts[1].split(',') if parts[1] else []\n            if any(key not in dictionary for key in ids): return None\n            rows.append([dictionary[key] for key in ids])\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('repeat refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b,a'])), _vary([['@', 'z', '@']]))\ncheck('ordered refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b'])), _vary([['@', 'z']]))\ncheck('literal pipes', solve(_vary(['DEF|a|x|y', 'ROW|a'])), _vary([['x|y']]))\ncheck('unknown', solve(_vary(['ROW|a', 'DEF|a|x'])), _vary(None))\ncheck('redefine', solve(_vary(['DEF|a|x', 'DEF|a|y'])), _vary(None))\ncheck('empty row', solve(_vary(['ROW|'])), _vary([[]]))\ncheck('empty literal', solve(_vary(['DEF|a|', 'ROW|a'])), _vary([['']]))\ncheck('zero', 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":"0a84f17f85c3542b70c281d32f6c7f6fbcc2dc8e76c1714c2592afde0f01870e","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    dictionary,rows={},[]\n    for line in data:\n        parts=line.split('|',2)\n        if parts[0]=='DEF' and len(parts)==3:\n            if False: return None\n            dictionary[parts[1]]=parts[2]\n        elif parts[0]=='ROW' and len(parts)==2:\n            ids=parts[1].split(',') if parts[1] else []\n            if any(key not in dictionary for key in ids): return None\n            rows.append([dictionary[key] for key in ids])\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('repeat refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b,a'])), _vary([['@', 'z', '@']]))\ncheck('ordered refs', solve(_vary(['DEF|a|@', 'DEF|b|z', 'ROW|a,b'])), _vary([['@', 'z']]))\ncheck('literal pipes', solve(_vary(['DEF|a|x|y', 'ROW|a'])), _vary([['x|y']]))\ncheck('unknown', solve(_vary(['ROW|a', 'DEF|a|x'])), _vary(None))\ncheck('redefine', solve(_vary(['DEF|a|x', 'DEF|a|y'])), _vary(None))\ncheck('empty row', solve(_vary(['ROW|'])), _vary([[]]))\ncheck('empty literal', solve(_vary(['DEF|a|', 'ROW|a'])), _vary([['']]))\ncheck('zero', 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-dictionary-cells-definition-immutable","generated_at":"2026-09-29T14:44:50.065186+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 dictionary cell definition is overwritten by a later record.","sha256":"addcd3fc1967b7537c7ce8464dbeb716c424b6b29a8199393bb41fd191cdb4bb","title":"A dictionary cell definition is overwritten by a later record · 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.978,"exit_code":1,"observations":[{"actual":[["cell","z","cell"]],"check":"repeat refs","expected":[["cell","z","cell"]],"passed":true},{"actual":[["cell","z"]],"check":"ordered refs","expected":[["cell","z"]],"passed":true},{"actual":[["x|y"]],"check":"literal pipes","expected":[["x|y"]],"passed":true},{"actual":null,"check":"unknown","expected":null,"passed":true},{"actual":[],"check":"redefine","expected":null,"passed":false},{"actual":[[]],"check":"empty row","expected":[[]],"passed":true},{"actual":[[""]],"check":"empty literal","expected":[[""]],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeat refs\", \"actual\": [[\"cell\", \"z\", \"cell\"]], \"expected\": [[\"cell\", \"z\", \"cell\"]], \"passed\": true}, {\"check\": \"ordered refs\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"literal pipes\", \"actual\": [[\"x|y\"]], \"expected\": [[\"x|y\"]], \"passed\": true}, {\"check\": \"unknown\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"redefine\", \"actual\": [], \"expected\": null, \"passed\": false}, {\"check\": \"empty row\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"empty literal\", \"actual\": [[\"\"]], \"expected\": [[\"\"]], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.024,"exit_code":1,"observations":[{"actual":[["cell","z","cell"]],"check":"repeat refs","expected":[["cell","z","cell"]],"passed":true},{"actual":[["cell","z"]],"check":"ordered refs","expected":[["cell","z"]],"passed":true},{"actual":[["x|y"]],"check":"literal pipes","expected":[["x|y"]],"passed":true},{"actual":null,"check":"unknown","expected":null,"passed":true},{"actual":[],"check":"redefine","expected":null,"passed":false},{"actual":[[]],"check":"empty row","expected":[[]],"passed":true},{"actual":[[""]],"check":"empty literal","expected":[[""]],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"repeat refs\", \"actual\": [[\"cell\", \"z\", \"cell\"]], \"expected\": [[\"cell\", \"z\", \"cell\"]], \"passed\": true}, {\"check\": \"ordered refs\", \"actual\": [[\"cell\", \"z\"]], \"expected\": [[\"cell\", \"z\"]], \"passed\": true}, {\"check\": \"literal pipes\", \"actual\": [[\"x|y\"]], \"expected\": [[\"x|y\"]], \"passed\": true}, {\"check\": \"unknown\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"redefine\", \"actual\": [], \"expected\": null, \"passed\": false}, {\"check\": \"empty row\", \"actual\": [[]], \"expected\": [[]], \"passed\": true}, {\"check\": \"empty literal\", \"actual\": [[\"\"]], \"expected\": [[\"\"]], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"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."}}