{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":9,"contract":"Read pipe rows: B|id opens an object, V|key|value adds a unique field, E|id closes and emits it. Nested begins, values outside an object, mismatched closes and EOF-open objects reject. Closed objects may reuse field keys. Preserve object order and text including empty values.","evaluation_group":"s3-delimited-text-grouped-records","failed_approach":"Copying the stale map still carries old fields into the new scope.","family":"s3-delimited-text-grouped-records-field-scope","id":"FA-48021","implementations":{"attempt":{"sha256":"34b185bc016ca689cb7ebca200942f32c7bea16ac5968200cc838719e427c90f","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, active, fields = [], None, {}\n    for line in data:\n        cells = line.split('|')\n        tag = cells[0]\n        if tag == 'B' and len(cells) == 2:\n            if active is not None: return None\n            active, fields = cells[1], dict(fields)\n        elif tag == 'V' and len(cells) == 3:\n            if active is None or cells[1] in fields: return None\n            fields[cells[1]] = cells[2]\n        elif tag == 'E' and len(cells) == 2:\n            if active is None or cells[1] != active: return None\n            out.append([active, fields])\n            active = None\n        else: return None\n    if active is not None: return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('groups', solve(_vary(['B|@', 'V|a|x', 'E|@', 'B|other', 'V|a|y', 'E|other'])), _vary([['@', {'a': 'x'}], ['other', {'a': 'y'}]]))\ncheck('nested', solve(_vary(['B|a', 'B|b', 'E|b'])), _vary(None))\ncheck('orphan', solve(_vary(['V|a|x'])), _vary(None))\ncheck('mismatch', solve(_vary(['B|a', 'E|b'])), _vary(None))\ncheck('unclosed', solve(_vary(['B|@', 'V|a|x'])), _vary(None))\ncheck('duplicate', solve(_vary(['B|a', 'V|x|1', 'V|x|2', 'E|a'])), _vary(None))\ncheck('empty object', solve(_vary(['B|a', 'E|a'])), _vary([['a', {}]]))\ncheck('empty value', solve(_vary(['B|a', 'V|x|', 'E|a'])), _vary([['a', {'x': ''}]]))\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":"d0befe4ad3d807a04a5812747dd5c2242057c55c9e43c67b0c55f93e57287157","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, active, fields = [], None, {}\n    for line in data:\n        cells = line.split('|')\n        tag = cells[0]\n        if tag == 'B' and len(cells) == 2:\n            if active is not None: return None\n            active = cells[1]\n        elif tag == 'V' and len(cells) == 3:\n            if active is None or cells[1] in fields: return None\n            fields[cells[1]] = cells[2]\n        elif tag == 'E' and len(cells) == 2:\n            if active is None or cells[1] != active: return None\n            out.append([active, fields])\n            active = None\n        else: return None\n    if active is not None: return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('groups', solve(_vary(['B|@', 'V|a|x', 'E|@', 'B|other', 'V|a|y', 'E|other'])), _vary([['@', {'a': 'x'}], ['other', {'a': 'y'}]]))\ncheck('nested', solve(_vary(['B|a', 'B|b', 'E|b'])), _vary(None))\ncheck('orphan', solve(_vary(['V|a|x'])), _vary(None))\ncheck('mismatch', solve(_vary(['B|a', 'E|b'])), _vary(None))\ncheck('unclosed', solve(_vary(['B|@', 'V|a|x'])), _vary(None))\ncheck('duplicate', solve(_vary(['B|a', 'V|x|1', 'V|x|2', 'E|a'])), _vary(None))\ncheck('empty object', solve(_vary(['B|a', 'E|a'])), _vary([['a', {}]]))\ncheck('empty value', solve(_vary(['B|a', 'V|x|', 'E|a'])), _vary([['a', {'x': ''}]]))\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"},"fixed":{"sha256":"a26c300d3511e4328896ad8713a0f7f784094aea0505e32417fcdcdb5a3d92e3","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, active, fields = [], None, {}\n    for line in data:\n        cells = line.split('|')\n        tag = cells[0]\n        if tag == 'B' and len(cells) == 2:\n            if active is not None: return None\n            active, fields = cells[1], {}\n        elif tag == 'V' and len(cells) == 3:\n            if active is None or cells[1] in fields: return None\n            fields[cells[1]] = cells[2]\n        elif tag == 'E' and len(cells) == 2:\n            if active is None or cells[1] != active: return None\n            out.append([active, fields])\n            active = None\n        else: return None\n    if active is not None: return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('groups', solve(_vary(['B|@', 'V|a|x', 'E|@', 'B|other', 'V|a|y', 'E|other'])), _vary([['@', {'a': 'x'}], ['other', {'a': 'y'}]]))\ncheck('nested', solve(_vary(['B|a', 'B|b', 'E|b'])), _vary(None))\ncheck('orphan', solve(_vary(['V|a|x'])), _vary(None))\ncheck('mismatch', solve(_vary(['B|a', 'E|b'])), _vary(None))\ncheck('unclosed', solve(_vary(['B|@', 'V|a|x'])), _vary(None))\ncheck('duplicate', solve(_vary(['B|a', 'V|x|1', 'V|x|2', 'E|a'])), _vary(None))\ncheck('empty object', solve(_vary(['B|a', 'E|a'])), _vary([['a', {}]]))\ncheck('empty value', solve(_vary(['B|a', 'V|x|', 'E|a'])), _vary([['a', {'x': ''}]]))\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-grouped-records-field-scope","generated_at":"2026-09-29T14:44:46.999034+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: active, fields = cells[1], {}","root_cause":"Opening an object reuses the preceding object field map.","sha256":"5ab3e272be3860baf4af090d1c5bb09ed909a08dde050816b31de142d7b6f86b","title":"Object fields leak across grouped record boundaries · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.752,"exit_code":1,"observations":[{"actual":null,"check":"groups","expected":[["cell",{"a":"x"}],["other",{"a":"y"}]],"passed":false},{"actual":null,"check":"nested","expected":null,"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"mismatch","expected":null,"passed":true},{"actual":null,"check":"unclosed","expected":null,"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":[["a",{}]],"check":"empty object","expected":[["a",{}]],"passed":true},{"actual":[["a",{"x":""}]],"check":"empty value","expected":[["a",{"x":""}]],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"groups\", \"actual\": null, \"expected\": [[\"cell\", {\"a\": \"x\"}], [\"other\", {\"a\": \"y\"}]], \"passed\": false}, {\"check\": \"nested\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"mismatch\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unclosed\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty object\", \"actual\": [[\"a\", {}]], \"expected\": [[\"a\", {}]], \"passed\": true}, {\"check\": \"empty value\", \"actual\": [[\"a\", {\"x\": \"\"}]], \"expected\": [[\"a\", {\"x\": \"\"}]], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.975,"exit_code":1,"observations":[{"actual":null,"check":"groups","expected":[["cell",{"a":"x"}],["other",{"a":"y"}]],"passed":false},{"actual":null,"check":"nested","expected":null,"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"mismatch","expected":null,"passed":true},{"actual":null,"check":"unclosed","expected":null,"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":[["a",{}]],"check":"empty object","expected":[["a",{}]],"passed":true},{"actual":[["a",{"x":""}]],"check":"empty value","expected":[["a",{"x":""}]],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"groups\", \"actual\": null, \"expected\": [[\"cell\", {\"a\": \"x\"}], [\"other\", {\"a\": \"y\"}]], \"passed\": false}, {\"check\": \"nested\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"mismatch\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unclosed\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty object\", \"actual\": [[\"a\", {}]], \"expected\": [[\"a\", {}]], \"passed\": true}, {\"check\": \"empty value\", \"actual\": [[\"a\", {\"x\": \"\"}]], \"expected\": [[\"a\", {\"x\": \"\"}]], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.809,"exit_code":0,"observations":[{"actual":[["cell",{"a":"x"}],["other",{"a":"y"}]],"check":"groups","expected":[["cell",{"a":"x"}],["other",{"a":"y"}]],"passed":true},{"actual":null,"check":"nested","expected":null,"passed":true},{"actual":null,"check":"orphan","expected":null,"passed":true},{"actual":null,"check":"mismatch","expected":null,"passed":true},{"actual":null,"check":"unclosed","expected":null,"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":[["a",{}]],"check":"empty object","expected":[["a",{}]],"passed":true},{"actual":[["a",{"x":""}]],"check":"empty value","expected":[["a",{"x":""}]],"passed":true},{"actual":[],"check":"zero","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"groups\", \"actual\": [[\"cell\", {\"a\": \"x\"}], [\"other\", {\"a\": \"y\"}]], \"expected\": [[\"cell\", {\"a\": \"x\"}], [\"other\", {\"a\": \"y\"}]], \"passed\": true}, {\"check\": \"nested\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"orphan\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"mismatch\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unclosed\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty object\", \"actual\": [[\"a\", {}]], \"expected\": [[\"a\", {}]], \"passed\": true}, {\"check\": \"empty value\", \"actual\": [[\"a\", {\"x\": \"\"}]], \"expected\": [[\"a\", {\"x\": \"\"}]], \"passed\": true}, {\"check\": \"zero\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}