{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":11,"contract":"Parse comma header cells with optional terminal [unit]. Return [name,unit-or-null]. Only one terminal bracket pair is allowed; name and unit must be nonempty. Bare header names are preserved including spaces; bracket text is not normalized. Duplicate full name/unit pairs reject, but one name with different units is allowed.","evaluation_group":"s3-delimited-text-unit-header","failed_approach":"The alternate implementation still violates the same declared invariant: different units under the same column name are treated as duplicate columns.","family":"s3-delimited-text-unit-header-unit-identity","id":"FA-48576","implementations":{"attempt":{"sha256":"1266079a0e5760baf9cc9c976e5e420b85b65ac96d221b99cbdeb0d37bde3aed","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 cell in data.split(','):\n        if '[' in cell:\n            opening=cell.find('[')\n            if not cell.endswith(']') or cell.count('[')!=1 or cell.count(']')!=1: return None\n            name,unit=cell[:opening],cell[opening+1:-1]\n            if not name or not unit: return None\n        else:\n            if not cell or ']' in cell: return None\n            name,unit=cell,None\n        pair=[name,unit]\n        if any(p[1]==unit for p in out): return None\n        out.append(pair)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('units', solve(_vary('@ [kg],time[s]')), _vary([['@ ', 'kg'], ['time', 's']]))\ncheck('bare', solve(_vary('@')), _vary([['@', None]]))\ncheck('two units', solve(_vary('mass[kg],mass[g]')), _vary([['mass', 'kg'], ['mass', 'g']]))\ncheck('duplicate', solve(_vary('a[x],a[x]')), _vary(None))\ncheck('empty unit', solve(_vary('a[]')), _vary(None))\ncheck('empty name', solve(_vary('[kg]')), _vary(None))\ncheck('suffix', solve(_vary('a[x]tail')), _vary(None))\ncheck('nested', solve(_vary('a[[x]]')), _vary(None))\ncheck('bare space', solve(_vary(' name ')), _vary([[' name ', None]]))\ncheck('unit exact spelling', solve(_vary('a[ Pa ],b[Pa]')), _vary([['a', ' Pa '], ['b', 'Pa']]))\ncheck('shared unit', solve(_vary('a[x],b[x]')), _vary([['a', 'x'], ['b', 'x']]))\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":"aad58b2b753fbb0c7ba838577b65e76f70cc95ad7267402adc2840721839ffe6","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 cell in data.split(','):\n        if '[' in cell:\n            opening=cell.find('[')\n            if not cell.endswith(']') or cell.count('[')!=1 or cell.count(']')!=1: return None\n            name,unit=cell[:opening],cell[opening+1:-1]\n            if not name or not unit: return None\n        else:\n            if not cell or ']' in cell: return None\n            name,unit=cell,None\n        pair=[name,unit]\n        if any(p[0]==name for p in out): return None\n        out.append(pair)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('units', solve(_vary('@ [kg],time[s]')), _vary([['@ ', 'kg'], ['time', 's']]))\ncheck('bare', solve(_vary('@')), _vary([['@', None]]))\ncheck('two units', solve(_vary('mass[kg],mass[g]')), _vary([['mass', 'kg'], ['mass', 'g']]))\ncheck('duplicate', solve(_vary('a[x],a[x]')), _vary(None))\ncheck('empty unit', solve(_vary('a[]')), _vary(None))\ncheck('empty name', solve(_vary('[kg]')), _vary(None))\ncheck('suffix', solve(_vary('a[x]tail')), _vary(None))\ncheck('nested', solve(_vary('a[[x]]')), _vary(None))\ncheck('bare space', solve(_vary(' name ')), _vary([[' name ', None]]))\ncheck('unit exact spelling', solve(_vary('a[ Pa ],b[Pa]')), _vary([['a', ' Pa '], ['b', 'Pa']]))\ncheck('shared unit', solve(_vary('a[x],b[x]')), _vary([['a', 'x'], ['b', 'x']]))\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":"786974f621723854f9ce4e3b3e0e2114cb0c656819f95836b3b08a9f68113f80","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 cell in data.split(','):\n        if '[' in cell:\n            opening=cell.find('[')\n            if not cell.endswith(']') or cell.count('[')!=1 or cell.count(']')!=1: return None\n            name,unit=cell[:opening],cell[opening+1:-1]\n            if not name or not unit: return None\n        else:\n            if not cell or ']' in cell: return None\n            name,unit=cell,None\n        pair=[name,unit]\n        if pair in out: return None\n        out.append(pair)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('units', solve(_vary('@ [kg],time[s]')), _vary([['@ ', 'kg'], ['time', 's']]))\ncheck('bare', solve(_vary('@')), _vary([['@', None]]))\ncheck('two units', solve(_vary('mass[kg],mass[g]')), _vary([['mass', 'kg'], ['mass', 'g']]))\ncheck('duplicate', solve(_vary('a[x],a[x]')), _vary(None))\ncheck('empty unit', solve(_vary('a[]')), _vary(None))\ncheck('empty name', solve(_vary('[kg]')), _vary(None))\ncheck('suffix', solve(_vary('a[x]tail')), _vary(None))\ncheck('nested', solve(_vary('a[[x]]')), _vary(None))\ncheck('bare space', solve(_vary(' name ')), _vary([[' name ', None]]))\ncheck('unit exact spelling', solve(_vary('a[ Pa ],b[Pa]')), _vary([['a', ' Pa '], ['b', 'Pa']]))\ncheck('shared unit', solve(_vary('a[x],b[x]')), _vary([['a', 'x'], ['b', 'x']]))\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-unit-header-unit-identity","generated_at":"2026-09-29T14:44:51.969269+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 pair in out: return None","root_cause":"Different units under the same column name are treated as duplicate columns.","sha256":"efdf0ac7f2ef4722a4a22d795958cfe9406239a45d8ff131841ebd4ca085d4b4","title":"Different units under the same column name are treated as duplicate columns · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.857,"exit_code":1,"observations":[{"actual":[["cell ","kg"],["time","s"]],"check":"units","expected":[["cell ","kg"],["time","s"]],"passed":true},{"actual":[["cell",null]],"check":"bare","expected":[["cell",null]],"passed":true},{"actual":[["mass","kg"],["mass","g"]],"check":"two units","expected":[["mass","kg"],["mass","g"]],"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty unit","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":null,"check":"suffix","expected":null,"passed":true},{"actual":null,"check":"nested","expected":null,"passed":true},{"actual":[[" name ",null]],"check":"bare space","expected":[[" name ",null]],"passed":true},{"actual":[["a"," Pa "],["b","Pa"]],"check":"unit exact spelling","expected":[["a"," Pa "],["b","Pa"]],"passed":true},{"actual":null,"check":"shared unit","expected":[["a","x"],["b","x"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"units\", \"actual\": [[\"cell \", \"kg\"], [\"time\", \"s\"]], \"expected\": [[\"cell \", \"kg\"], [\"time\", \"s\"]], \"passed\": true}, {\"check\": \"bare\", \"actual\": [[\"cell\", null]], \"expected\": [[\"cell\", null]], \"passed\": true}, {\"check\": \"two units\", \"actual\": [[\"mass\", \"kg\"], [\"mass\", \"g\"]], \"expected\": [[\"mass\", \"kg\"], [\"mass\", \"g\"]], \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty unit\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"suffix\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"nested\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bare space\", \"actual\": [[\" name \", null]], \"expected\": [[\" name \", null]], \"passed\": true}, {\"check\": \"unit exact spelling\", \"actual\": [[\"a\", \" Pa \"], [\"b\", \"Pa\"]], \"expected\": [[\"a\", \" Pa \"], [\"b\", \"Pa\"]], \"passed\": true}, {\"check\": \"shared unit\", \"actual\": null, \"expected\": [[\"a\", \"x\"], [\"b\", \"x\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.647,"exit_code":1,"observations":[{"actual":[["cell ","kg"],["time","s"]],"check":"units","expected":[["cell ","kg"],["time","s"]],"passed":true},{"actual":[["cell",null]],"check":"bare","expected":[["cell",null]],"passed":true},{"actual":null,"check":"two units","expected":[["mass","kg"],["mass","g"]],"passed":false},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty unit","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":null,"check":"suffix","expected":null,"passed":true},{"actual":null,"check":"nested","expected":null,"passed":true},{"actual":[[" name ",null]],"check":"bare space","expected":[[" name ",null]],"passed":true},{"actual":[["a"," Pa "],["b","Pa"]],"check":"unit exact spelling","expected":[["a"," Pa "],["b","Pa"]],"passed":true},{"actual":[["a","x"],["b","x"]],"check":"shared unit","expected":[["a","x"],["b","x"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"units\", \"actual\": [[\"cell \", \"kg\"], [\"time\", \"s\"]], \"expected\": [[\"cell \", \"kg\"], [\"time\", \"s\"]], \"passed\": true}, {\"check\": \"bare\", \"actual\": [[\"cell\", null]], \"expected\": [[\"cell\", null]], \"passed\": true}, {\"check\": \"two units\", \"actual\": null, \"expected\": [[\"mass\", \"kg\"], [\"mass\", \"g\"]], \"passed\": false}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty unit\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"suffix\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"nested\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bare space\", \"actual\": [[\" name \", null]], \"expected\": [[\" name \", null]], \"passed\": true}, {\"check\": \"unit exact spelling\", \"actual\": [[\"a\", \" Pa \"], [\"b\", \"Pa\"]], \"expected\": [[\"a\", \" Pa \"], [\"b\", \"Pa\"]], \"passed\": true}, {\"check\": \"shared unit\", \"actual\": [[\"a\", \"x\"], [\"b\", \"x\"]], \"expected\": [[\"a\", \"x\"], [\"b\", \"x\"]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.826,"exit_code":0,"observations":[{"actual":[["cell ","kg"],["time","s"]],"check":"units","expected":[["cell ","kg"],["time","s"]],"passed":true},{"actual":[["cell",null]],"check":"bare","expected":[["cell",null]],"passed":true},{"actual":[["mass","kg"],["mass","g"]],"check":"two units","expected":[["mass","kg"],["mass","g"]],"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"empty unit","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":null,"check":"suffix","expected":null,"passed":true},{"actual":null,"check":"nested","expected":null,"passed":true},{"actual":[[" name ",null]],"check":"bare space","expected":[[" name ",null]],"passed":true},{"actual":[["a"," Pa "],["b","Pa"]],"check":"unit exact spelling","expected":[["a"," Pa "],["b","Pa"]],"passed":true},{"actual":[["a","x"],["b","x"]],"check":"shared unit","expected":[["a","x"],["b","x"]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"units\", \"actual\": [[\"cell \", \"kg\"], [\"time\", \"s\"]], \"expected\": [[\"cell \", \"kg\"], [\"time\", \"s\"]], \"passed\": true}, {\"check\": \"bare\", \"actual\": [[\"cell\", null]], \"expected\": [[\"cell\", null]], \"passed\": true}, {\"check\": \"two units\", \"actual\": [[\"mass\", \"kg\"], [\"mass\", \"g\"]], \"expected\": [[\"mass\", \"kg\"], [\"mass\", \"g\"]], \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty unit\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"suffix\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"nested\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bare space\", \"actual\": [[\" name \", null]], \"expected\": [[\" name \", null]], \"passed\": true}, {\"check\": \"unit exact spelling\", \"actual\": [[\"a\", \" Pa \"], [\"b\", \"Pa\"]], \"expected\": [[\"a\", \" Pa \"], [\"b\", \"Pa\"]], \"passed\": true}, {\"check\": \"shared unit\", \"actual\": [[\"a\", \"x\"], [\"b\", \"x\"]], \"expected\": [[\"a\", \"x\"], [\"b\", \"x\"]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}