{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Combine two tab-delimited header rows. Blank upper cells inherit the nearest upper label to their left; an initial blank upper label rejects. Lower labels never inherit and must be nonempty. Return unique dotted paths, preserving order. Widths must match.","evaluation_group":"s3-delimited-text-header-hierarchy","failed_approach":"Reversal likewise changes the positional binding.","family":"s3-delimited-text-header-hierarchy-path-order","id":"FA-47581","implementations":{"attempt":{"sha256":"f928379d10bb820bbef265aac608bd598cd5771da2ae0eec2aaa9f7cd343aa4c","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    upper, lower = [x.split('\\t') for x in data]\n    if len(upper) != len(lower): return None\n    paths, parent = [], None\n    for top, leaf in zip(upper, lower):\n        if top: parent = top\n        if parent is None: return None\n        if not leaf: return None\n        path = parent + '.' + leaf\n        if path in paths: return None\n        paths.append(path)\n    return list(reversed(paths))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('inherit', solve(_vary(['group\\t\\tother', '@\\tb\\tc'])), _vary(['group.@', 'group.b', 'other.c']))\ncheck('initial blank', solve(_vary(['\\tgroup', 'a\\tb'])), _vary(None))\ncheck('empty leaf', solve(_vary(['group\\t', 'a\\t'])), _vary(None))\ncheck('duplicate path', solve(_vary(['group\\t', 'a\\ta'])), _vary(None))\ncheck('unequal', solve(_vary(['group', 'a\\tb'])), _vary(None))\ncheck('same leaf new parent', solve(_vary(['x\\ty', 'a\\ta'])), _vary(['x.a', 'y.a']))\ncheck('normal', solve(_vary(['@', 'a'])), _vary(['@.a']))\ncheck('replace parent', solve(_vary(['x\\ty\\t', 'a\\tb\\tc'])), _vary(['x.a', 'y.b', 'y.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":"de1265a10dcd7d43a031e9c36dfd4bc58db6a8ca8325f0d5a4239d9cb8d8b91c","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    upper, lower = [x.split('\\t') for x in data]\n    if len(upper) != len(lower): return None\n    paths, parent = [], None\n    for top, leaf in zip(upper, lower):\n        if top: parent = top\n        if parent is None: return None\n        if not leaf: return None\n        path = parent + '.' + leaf\n        if path in paths: return None\n        paths.append(path)\n    return sorted(paths)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('inherit', solve(_vary(['group\\t\\tother', '@\\tb\\tc'])), _vary(['group.@', 'group.b', 'other.c']))\ncheck('initial blank', solve(_vary(['\\tgroup', 'a\\tb'])), _vary(None))\ncheck('empty leaf', solve(_vary(['group\\t', 'a\\t'])), _vary(None))\ncheck('duplicate path', solve(_vary(['group\\t', 'a\\ta'])), _vary(None))\ncheck('unequal', solve(_vary(['group', 'a\\tb'])), _vary(None))\ncheck('same leaf new parent', solve(_vary(['x\\ty', 'a\\ta'])), _vary(['x.a', 'y.a']))\ncheck('normal', solve(_vary(['@', 'a'])), _vary(['@.a']))\ncheck('replace parent', solve(_vary(['x\\ty\\t', 'a\\tb\\tc'])), _vary(['x.a', 'y.b', 'y.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":"3e33918230925a1fdfa5cc3dfd690dac6b73bbe187db4611c042ce5ac892956c","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    upper, lower = [x.split('\\t') for x in data]\n    if len(upper) != len(lower): return None\n    paths, parent = [], None\n    for top, leaf in zip(upper, lower):\n        if top: parent = top\n        if parent is None: return None\n        if not leaf: return None\n        path = parent + '.' + leaf\n        if path in paths: return None\n        paths.append(path)\n    return paths\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('inherit', solve(_vary(['group\\t\\tother', '@\\tb\\tc'])), _vary(['group.@', 'group.b', 'other.c']))\ncheck('initial blank', solve(_vary(['\\tgroup', 'a\\tb'])), _vary(None))\ncheck('empty leaf', solve(_vary(['group\\t', 'a\\t'])), _vary(None))\ncheck('duplicate path', solve(_vary(['group\\t', 'a\\ta'])), _vary(None))\ncheck('unequal', solve(_vary(['group', 'a\\tb'])), _vary(None))\ncheck('same leaf new parent', solve(_vary(['x\\ty', 'a\\ta'])), _vary(['x.a', 'y.a']))\ncheck('normal', solve(_vary(['@', 'a'])), _vary(['@.a']))\ncheck('replace parent', solve(_vary(['x\\ty\\t', 'a\\tb\\tc'])), _vary(['x.a', 'y.b', 'y.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-header-hierarchy-path-order","generated_at":"2026-09-29T14:44:42.875918+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: return paths","root_cause":"Sorting schema names disconnects them from physical column positions.","sha256":"3d42524a0b629003b04352e3ec3ef1b4603bbe096ff73a57311d2450b25dfd7c","title":"Header group paths are emitted in lexical order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.309,"exit_code":1,"observations":[{"actual":["other.c","group.b","group.cell"],"check":"inherit","expected":["group.cell","group.b","other.c"],"passed":false},{"actual":null,"check":"initial blank","expected":null,"passed":true},{"actual":null,"check":"empty leaf","expected":null,"passed":true},{"actual":null,"check":"duplicate path","expected":null,"passed":true},{"actual":null,"check":"unequal","expected":null,"passed":true},{"actual":["y.a","x.a"],"check":"same leaf new parent","expected":["x.a","y.a"],"passed":false},{"actual":["cell.a"],"check":"normal","expected":["cell.a"],"passed":true},{"actual":["y.c","y.b","x.a"],"check":"replace parent","expected":["x.a","y.b","y.c"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inherit\", \"actual\": [\"other.c\", \"group.b\", \"group.cell\"], \"expected\": [\"group.cell\", \"group.b\", \"other.c\"], \"passed\": false}, {\"check\": \"initial blank\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty leaf\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate path\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unequal\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"same leaf new parent\", \"actual\": [\"y.a\", \"x.a\"], \"expected\": [\"x.a\", \"y.a\"], \"passed\": false}, {\"check\": \"normal\", \"actual\": [\"cell.a\"], \"expected\": [\"cell.a\"], \"passed\": true}, {\"check\": \"replace parent\", \"actual\": [\"y.c\", \"y.b\", \"x.a\"], \"expected\": [\"x.a\", \"y.b\", \"y.c\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.624,"exit_code":1,"observations":[{"actual":["group.b","group.cell","other.c"],"check":"inherit","expected":["group.cell","group.b","other.c"],"passed":false},{"actual":null,"check":"initial blank","expected":null,"passed":true},{"actual":null,"check":"empty leaf","expected":null,"passed":true},{"actual":null,"check":"duplicate path","expected":null,"passed":true},{"actual":null,"check":"unequal","expected":null,"passed":true},{"actual":["x.a","y.a"],"check":"same leaf new parent","expected":["x.a","y.a"],"passed":true},{"actual":["cell.a"],"check":"normal","expected":["cell.a"],"passed":true},{"actual":["x.a","y.b","y.c"],"check":"replace parent","expected":["x.a","y.b","y.c"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inherit\", \"actual\": [\"group.b\", \"group.cell\", \"other.c\"], \"expected\": [\"group.cell\", \"group.b\", \"other.c\"], \"passed\": false}, {\"check\": \"initial blank\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty leaf\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate path\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unequal\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"same leaf new parent\", \"actual\": [\"x.a\", \"y.a\"], \"expected\": [\"x.a\", \"y.a\"], \"passed\": true}, {\"check\": \"normal\", \"actual\": [\"cell.a\"], \"expected\": [\"cell.a\"], \"passed\": true}, {\"check\": \"replace parent\", \"actual\": [\"x.a\", \"y.b\", \"y.c\"], \"expected\": [\"x.a\", \"y.b\", \"y.c\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.244,"exit_code":0,"observations":[{"actual":["group.cell","group.b","other.c"],"check":"inherit","expected":["group.cell","group.b","other.c"],"passed":true},{"actual":null,"check":"initial blank","expected":null,"passed":true},{"actual":null,"check":"empty leaf","expected":null,"passed":true},{"actual":null,"check":"duplicate path","expected":null,"passed":true},{"actual":null,"check":"unequal","expected":null,"passed":true},{"actual":["x.a","y.a"],"check":"same leaf new parent","expected":["x.a","y.a"],"passed":true},{"actual":["cell.a"],"check":"normal","expected":["cell.a"],"passed":true},{"actual":["x.a","y.b","y.c"],"check":"replace parent","expected":["x.a","y.b","y.c"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"inherit\", \"actual\": [\"group.cell\", \"group.b\", \"other.c\"], \"expected\": [\"group.cell\", \"group.b\", \"other.c\"], \"passed\": true}, {\"check\": \"initial blank\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty leaf\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"duplicate path\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unequal\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"same leaf new parent\", \"actual\": [\"x.a\", \"y.a\"], \"expected\": [\"x.a\", \"y.a\"], \"passed\": true}, {\"check\": \"normal\", \"actual\": [\"cell.a\"], \"expected\": [\"cell.a\"], \"passed\": true}, {\"check\": \"replace parent\", \"actual\": [\"x.a\", \"y.b\", \"y.c\"], \"expected\": [\"x.a\", \"y.b\", \"y.c\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}