{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Decode tagged comma rows. P,name,age represents a person with canonical unsigned ASCII integer age; M,from,to,text represents a message with text that may be empty. Unknown tags and wrong arities reject. Return tagged dictionaries in source order.","evaluation_group":"s3-delimited-text-tagged-row-types","failed_approach":"The alternate implementation still violates the same declared invariant: message row decoding swaps sender and recipient.","family":"s3-delimited-text-tagged-row-types-message-direction","id":"FA-48696","implementations":{"attempt":{"sha256":"d4a8e1b0d78388b490379e327bb6b58c647bcd09d3b33e5b02b40dded240adda","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    out=[]\n    for line in data:\n        cells=line.split(',')\n        if cells[0]=='P':\n            if len(cells)!=3: return None\n            if not cells[2].isascii() or not cells[2].isdecimal() or str(int(cells[2]))!=cells[2]: return None\n            out.append({'kind':'person','name':cells[1],'age':int(cells[2])})\n        elif cells[0]=='M':\n            if len(cells)!=4: return None\n            out.append({'kind':'message','from':cells[1],'to':cells[1],'text':cells[3]})\n        else: return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed', solve(_vary(['P,@,12', 'M,a,b,hello'])), _vary([{'kind': 'person', 'name': '@', 'age': 12}, {'kind': 'message', 'from': 'a', 'to': 'b', 'text': 'hello'}]))\ncheck('empty text', solve(_vary(['M,a,b,'])), _vary([{'kind': 'message', 'from': 'a', 'to': 'b', 'text': ''}]))\ncheck('zero age', solve(_vary(['P,@,0'])), _vary([{'kind': 'person', 'name': '@', 'age': 0}]))\ncheck('bad tag', solve(_vary(['X,a,b'])), _vary(None))\ncheck('wrong person', solve(_vary(['P,a,12,x'])), _vary(None))\ncheck('wrong message', solve(_vary(['M,a,b'])), _vary(None))\ncheck('leading zero', solve(_vary(['P,@,01'])), _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":"0d15d1b07212d4000b302e1457a7e072204765d1334d5298b59e16dd894a299e","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    out=[]\n    for line in data:\n        cells=line.split(',')\n        if cells[0]=='P':\n            if len(cells)!=3: return None\n            if not cells[2].isascii() or not cells[2].isdecimal() or str(int(cells[2]))!=cells[2]: return None\n            out.append({'kind':'person','name':cells[1],'age':int(cells[2])})\n        elif cells[0]=='M':\n            if len(cells)!=4: return None\n            out.append({'kind':'message','from':cells[2],'to':cells[1],'text':cells[3]})\n        else: return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed', solve(_vary(['P,@,12', 'M,a,b,hello'])), _vary([{'kind': 'person', 'name': '@', 'age': 12}, {'kind': 'message', 'from': 'a', 'to': 'b', 'text': 'hello'}]))\ncheck('empty text', solve(_vary(['M,a,b,'])), _vary([{'kind': 'message', 'from': 'a', 'to': 'b', 'text': ''}]))\ncheck('zero age', solve(_vary(['P,@,0'])), _vary([{'kind': 'person', 'name': '@', 'age': 0}]))\ncheck('bad tag', solve(_vary(['X,a,b'])), _vary(None))\ncheck('wrong person', solve(_vary(['P,a,12,x'])), _vary(None))\ncheck('wrong message', solve(_vary(['M,a,b'])), _vary(None))\ncheck('leading zero', solve(_vary(['P,@,01'])), _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":"d62b2209ed5e60b6b25b7ee1edd34e1ddd582a9ddbe5ee76b17a91ffdae93fe8","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    out=[]\n    for line in data:\n        cells=line.split(',')\n        if cells[0]=='P':\n            if len(cells)!=3: return None\n            if not cells[2].isascii() or not cells[2].isdecimal() or str(int(cells[2]))!=cells[2]: return None\n            out.append({'kind':'person','name':cells[1],'age':int(cells[2])})\n        elif cells[0]=='M':\n            if len(cells)!=4: return None\n            out.append({'kind':'message','from':cells[1],'to':cells[2],'text':cells[3]})\n        else: return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('mixed', solve(_vary(['P,@,12', 'M,a,b,hello'])), _vary([{'kind': 'person', 'name': '@', 'age': 12}, {'kind': 'message', 'from': 'a', 'to': 'b', 'text': 'hello'}]))\ncheck('empty text', solve(_vary(['M,a,b,'])), _vary([{'kind': 'message', 'from': 'a', 'to': 'b', 'text': ''}]))\ncheck('zero age', solve(_vary(['P,@,0'])), _vary([{'kind': 'person', 'name': '@', 'age': 0}]))\ncheck('bad tag', solve(_vary(['X,a,b'])), _vary(None))\ncheck('wrong person', solve(_vary(['P,a,12,x'])), _vary(None))\ncheck('wrong message', solve(_vary(['M,a,b'])), _vary(None))\ncheck('leading zero', solve(_vary(['P,@,01'])), _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-tagged-row-types-message-direction","generated_at":"2026-09-29T14:44:53.178198+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: 'from':cells[1],'to':cells[2]","root_cause":"Message row decoding swaps sender and recipient.","sha256":"73f9fd431a26030e5484ea504d409e86b39349b7bc5cf411e692a4c7892862cf","title":"Message row decoding swaps sender and recipient · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.845,"exit_code":1,"observations":[{"actual":[{"age":12,"kind":"person","name":"cell"},{"from":"a","kind":"message","text":"hello","to":"a"}],"check":"mixed","expected":[{"age":12,"kind":"person","name":"cell"},{"from":"a","kind":"message","text":"hello","to":"b"}],"passed":false},{"actual":[{"from":"a","kind":"message","text":"","to":"a"}],"check":"empty text","expected":[{"from":"a","kind":"message","text":"","to":"b"}],"passed":false},{"actual":[{"age":0,"kind":"person","name":"cell"}],"check":"zero age","expected":[{"age":0,"kind":"person","name":"cell"}],"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":null,"check":"wrong person","expected":null,"passed":true},{"actual":null,"check":"wrong message","expected":null,"passed":true},{"actual":null,"check":"leading zero","expected":null,"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed\", \"actual\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 12}, {\"kind\": \"message\", \"from\": \"a\", \"to\": \"a\", \"text\": \"hello\"}], \"expected\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 12}, {\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"hello\"}], \"passed\": false}, {\"check\": \"empty text\", \"actual\": [{\"kind\": \"message\", \"from\": \"a\", \"to\": \"a\", \"text\": \"\"}], \"expected\": [{\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"\"}], \"passed\": false}, {\"check\": \"zero age\", \"actual\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 0}], \"expected\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 0}], \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong person\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong message\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"leading zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.535,"exit_code":1,"observations":[{"actual":[{"age":12,"kind":"person","name":"cell"},{"from":"b","kind":"message","text":"hello","to":"a"}],"check":"mixed","expected":[{"age":12,"kind":"person","name":"cell"},{"from":"a","kind":"message","text":"hello","to":"b"}],"passed":false},{"actual":[{"from":"b","kind":"message","text":"","to":"a"}],"check":"empty text","expected":[{"from":"a","kind":"message","text":"","to":"b"}],"passed":false},{"actual":[{"age":0,"kind":"person","name":"cell"}],"check":"zero age","expected":[{"age":0,"kind":"person","name":"cell"}],"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":null,"check":"wrong person","expected":null,"passed":true},{"actual":null,"check":"wrong message","expected":null,"passed":true},{"actual":null,"check":"leading zero","expected":null,"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed\", \"actual\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 12}, {\"kind\": \"message\", \"from\": \"b\", \"to\": \"a\", \"text\": \"hello\"}], \"expected\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 12}, {\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"hello\"}], \"passed\": false}, {\"check\": \"empty text\", \"actual\": [{\"kind\": \"message\", \"from\": \"b\", \"to\": \"a\", \"text\": \"\"}], \"expected\": [{\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"\"}], \"passed\": false}, {\"check\": \"zero age\", \"actual\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 0}], \"expected\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 0}], \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong person\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong message\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"leading zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.019,"exit_code":0,"observations":[{"actual":[{"age":12,"kind":"person","name":"cell"},{"from":"a","kind":"message","text":"hello","to":"b"}],"check":"mixed","expected":[{"age":12,"kind":"person","name":"cell"},{"from":"a","kind":"message","text":"hello","to":"b"}],"passed":true},{"actual":[{"from":"a","kind":"message","text":"","to":"b"}],"check":"empty text","expected":[{"from":"a","kind":"message","text":"","to":"b"}],"passed":true},{"actual":[{"age":0,"kind":"person","name":"cell"}],"check":"zero age","expected":[{"age":0,"kind":"person","name":"cell"}],"passed":true},{"actual":null,"check":"bad tag","expected":null,"passed":true},{"actual":null,"check":"wrong person","expected":null,"passed":true},{"actual":null,"check":"wrong message","expected":null,"passed":true},{"actual":null,"check":"leading zero","expected":null,"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mixed\", \"actual\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 12}, {\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"hello\"}], \"expected\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 12}, {\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"hello\"}], \"passed\": true}, {\"check\": \"empty text\", \"actual\": [{\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"\"}], \"expected\": [{\"kind\": \"message\", \"from\": \"a\", \"to\": \"b\", \"text\": \"\"}], \"passed\": true}, {\"check\": \"zero age\", \"actual\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 0}], \"expected\": [{\"kind\": \"person\", \"name\": \"cell\", \"age\": 0}], \"passed\": true}, {\"check\": \"bad tag\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong person\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"wrong message\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"leading zero\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}