{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":7,"contract":"Bind comma values to comma headers whose dots denote object paths. Empty path components, duplicate complete paths, or a path that is both leaf and parent reject. Scalar leaves remain text. Header and value counts must match. Return nested dictionaries.","evaluation_group":"s3-delimited-text-nested-header-binding","failed_approach":"The alternate implementation still violates the same declared invariant: a leaf assignment overwrites an existing nested object.","family":"s3-delimited-text-nested-header-binding-leaf-collision","id":"FA-48561","implementations":{"attempt":{"sha256":"4a9f62b4addb1315fd241cff2b11d4b569dca70d2010019650b16b5c3211232a","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    headers=data['header'].split(','); values=data['row'].split(',')\n    if len(headers)!=len(values): return None\n    out={}\n    for header,value in zip(headers,values):\n        path=header.split('.')\n        if any(not part for part in path): return None\n        node=out\n        for part in path[:-1]:\n            if part not in node: node[part]={}\n            if not isinstance(node[part],dict): return None\n            node=node[part]\n        if path[-1] in node and isinstance(node[path[-1]],dict): node.pop(path[-1])\n        node[path[-1]]=value\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nested', solve(_vary({'header': 'user.name,user.city', 'row': '@,x'})), _vary({'user': {'name': '@', 'city': 'x'}}))\ncheck('two roots', solve(_vary({'header': 'a.x,b.x', 'row': '@,z'})), _vary({'a': {'x': '@'}, 'b': {'x': 'z'}}))\ncheck('scalar conflict', solve(_vary({'header': 'a,a.b', 'row': '@,z'})), _vary(None))\ncheck('parent conflict', solve(_vary({'header': 'a.b,a', 'row': '@,z'})), _vary(None))\ncheck('duplicate', solve(_vary({'header': 'a.b,a.b', 'row': '@,z'})), _vary(None))\ncheck('empty component', solve(_vary({'header': 'a..b', 'row': '@'})), _vary(None))\ncheck('deep', solve(_vary({'header': 'a.b.c', 'row': '@'})), _vary({'a': {'b': {'c': '@'}}}))\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":"62d0c13ffff6e743af4e42cec8acf3b884fccf8a13805ae799ed44c61d98ced9","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    headers=data['header'].split(','); values=data['row'].split(',')\n    if len(headers)!=len(values): return None\n    out={}\n    for header,value in zip(headers,values):\n        path=header.split('.')\n        if any(not part for part in path): return None\n        node=out\n        for part in path[:-1]:\n            if part not in node: node[part]={}\n            if not isinstance(node[part],dict): return None\n            node=node[part]\n        if path[-1] in node and not isinstance(node[path[-1]],dict): return None\n        node[path[-1]]=value\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nested', solve(_vary({'header': 'user.name,user.city', 'row': '@,x'})), _vary({'user': {'name': '@', 'city': 'x'}}))\ncheck('two roots', solve(_vary({'header': 'a.x,b.x', 'row': '@,z'})), _vary({'a': {'x': '@'}, 'b': {'x': 'z'}}))\ncheck('scalar conflict', solve(_vary({'header': 'a,a.b', 'row': '@,z'})), _vary(None))\ncheck('parent conflict', solve(_vary({'header': 'a.b,a', 'row': '@,z'})), _vary(None))\ncheck('duplicate', solve(_vary({'header': 'a.b,a.b', 'row': '@,z'})), _vary(None))\ncheck('empty component', solve(_vary({'header': 'a..b', 'row': '@'})), _vary(None))\ncheck('deep', solve(_vary({'header': 'a.b.c', 'row': '@'})), _vary({'a': {'b': {'c': '@'}}}))\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":"1b72868517f36b228412356ab318231643c392854e8373ccc7153fdb2fa32d9d","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    headers=data['header'].split(','); values=data['row'].split(',')\n    if len(headers)!=len(values): return None\n    out={}\n    for header,value in zip(headers,values):\n        path=header.split('.')\n        if any(not part for part in path): return None\n        node=out\n        for part in path[:-1]:\n            if part not in node: node[part]={}\n            if not isinstance(node[part],dict): return None\n            node=node[part]\n        if path[-1] in node: return None\n        node[path[-1]]=value\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nested', solve(_vary({'header': 'user.name,user.city', 'row': '@,x'})), _vary({'user': {'name': '@', 'city': 'x'}}))\ncheck('two roots', solve(_vary({'header': 'a.x,b.x', 'row': '@,z'})), _vary({'a': {'x': '@'}, 'b': {'x': 'z'}}))\ncheck('scalar conflict', solve(_vary({'header': 'a,a.b', 'row': '@,z'})), _vary(None))\ncheck('parent conflict', solve(_vary({'header': 'a.b,a', 'row': '@,z'})), _vary(None))\ncheck('duplicate', solve(_vary({'header': 'a.b,a.b', 'row': '@,z'})), _vary(None))\ncheck('empty component', solve(_vary({'header': 'a..b', 'row': '@'})), _vary(None))\ncheck('deep', solve(_vary({'header': 'a.b.c', 'row': '@'})), _vary({'a': {'b': {'c': '@'}}}))\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-nested-header-binding-leaf-collision","generated_at":"2026-09-29T14:44:51.894414+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: if path[-1] in node: return None","root_cause":"A leaf assignment overwrites an existing nested object.","sha256":"260566a7e0859c46675e3fc3d529aa20fefb96f9b5cef3274c0d57b077c00875","title":"A leaf assignment overwrites an existing nested object · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.913,"exit_code":1,"observations":[{"actual":{"user":{"city":"x","name":"cell"}},"check":"nested","expected":{"user":{"city":"x","name":"cell"}},"passed":true},{"actual":{"a":{"x":"cell"},"b":{"x":"z"}},"check":"two roots","expected":{"a":{"x":"cell"},"b":{"x":"z"}},"passed":true},{"actual":null,"check":"scalar conflict","expected":null,"passed":true},{"actual":{"a":"z"},"check":"parent conflict","expected":null,"passed":false},{"actual":{"a":{"b":"z"}},"check":"duplicate","expected":null,"passed":false},{"actual":null,"check":"empty component","expected":null,"passed":true},{"actual":{"a":{"b":{"c":"cell"}}},"check":"deep","expected":{"a":{"b":{"c":"cell"}}},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nested\", \"actual\": {\"user\": {\"name\": \"cell\", \"city\": \"x\"}}, \"expected\": {\"user\": {\"name\": \"cell\", \"city\": \"x\"}}, \"passed\": true}, {\"check\": \"two roots\", \"actual\": {\"a\": {\"x\": \"cell\"}, \"b\": {\"x\": \"z\"}}, \"expected\": {\"a\": {\"x\": \"cell\"}, \"b\": {\"x\": \"z\"}}, \"passed\": true}, {\"check\": \"scalar conflict\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"parent conflict\", \"actual\": {\"a\": \"z\"}, \"expected\": null, \"passed\": false}, {\"check\": \"duplicate\", \"actual\": {\"a\": {\"b\": \"z\"}}, \"expected\": null, \"passed\": false}, {\"check\": \"empty component\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"deep\", \"actual\": {\"a\": {\"b\": {\"c\": \"cell\"}}}, \"expected\": {\"a\": {\"b\": {\"c\": \"cell\"}}}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.911,"exit_code":1,"observations":[{"actual":{"user":{"city":"x","name":"cell"}},"check":"nested","expected":{"user":{"city":"x","name":"cell"}},"passed":true},{"actual":{"a":{"x":"cell"},"b":{"x":"z"}},"check":"two roots","expected":{"a":{"x":"cell"},"b":{"x":"z"}},"passed":true},{"actual":null,"check":"scalar conflict","expected":null,"passed":true},{"actual":{"a":"z"},"check":"parent conflict","expected":null,"passed":false},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty component","expected":null,"passed":true},{"actual":{"a":{"b":{"c":"cell"}}},"check":"deep","expected":{"a":{"b":{"c":"cell"}}},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nested\", \"actual\": {\"user\": {\"name\": \"cell\", \"city\": \"x\"}}, \"expected\": {\"user\": {\"name\": \"cell\", \"city\": \"x\"}}, \"passed\": true}, {\"check\": \"two roots\", \"actual\": {\"a\": {\"x\": \"cell\"}, \"b\": {\"x\": \"z\"}}, \"expected\": {\"a\": {\"x\": \"cell\"}, \"b\": {\"x\": \"z\"}}, \"passed\": true}, {\"check\": \"scalar conflict\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"parent conflict\", \"actual\": {\"a\": \"z\"}, \"expected\": null, \"passed\": false}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty component\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"deep\", \"actual\": {\"a\": {\"b\": {\"c\": \"cell\"}}}, \"expected\": {\"a\": {\"b\": {\"c\": \"cell\"}}}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.201,"exit_code":0,"observations":[{"actual":{"user":{"city":"x","name":"cell"}},"check":"nested","expected":{"user":{"city":"x","name":"cell"}},"passed":true},{"actual":{"a":{"x":"cell"},"b":{"x":"z"}},"check":"two roots","expected":{"a":{"x":"cell"},"b":{"x":"z"}},"passed":true},{"actual":null,"check":"scalar conflict","expected":null,"passed":true},{"actual":null,"check":"parent conflict","expected":null,"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty component","expected":null,"passed":true},{"actual":{"a":{"b":{"c":"cell"}}},"check":"deep","expected":{"a":{"b":{"c":"cell"}}},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nested\", \"actual\": {\"user\": {\"name\": \"cell\", \"city\": \"x\"}}, \"expected\": {\"user\": {\"name\": \"cell\", \"city\": \"x\"}}, \"passed\": true}, {\"check\": \"two roots\", \"actual\": {\"a\": {\"x\": \"cell\"}, \"b\": {\"x\": \"z\"}}, \"expected\": {\"a\": {\"x\": \"cell\"}, \"b\": {\"x\": \"z\"}}, \"passed\": true}, {\"check\": \"scalar conflict\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"parent conflict\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty component\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"deep\", \"actual\": {\"a\": {\"b\": {\"c\": \"cell\"}}}, \"expected\": {\"a\": {\"b\": {\"c\": \"cell\"}}}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}