{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":10,"contract":"Process already framed pipe records. Column-zero # starts a comment except ## encodes a literal leading # data record. A column-zero #!name=value directive sets a unique metadata name; malformed or duplicate directives reject. Other records, including leading-space # and empty records, are data. Return metadata and data rows.","contract_signature":"data","evaluation_group":"s3-delimited-text-comment-records","failed_approach":"Stripping every marker decodes more than the one escape layer.","family":"s3-delimited-text-comment-records-classification-order","id":"FA-47681","implementations":{"attempt":{"sha256":"a78aa9cc53036a8acf4fe6764cac757f6749f1f3c349ee5a7e5b89a98fff6c49","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    meta, rows = {}, []\n    for line in data:\n        if line.startswith('##'): rows.append(line.lstrip('#').split('|'))\n        elif line.startswith('#!'):\n            pair = line[2:].split('=', 1)\n            if len(pair) != 2 or not pair[0]: return None\n            key, value = pair\n            if key in meta: return None\n            meta[key] = value\n        elif line.startswith('#'): continue\n        else: rows.append(line.split('|'))\n    return [meta, rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('comments', solve(_vary(['# comment', '@|x'])), _vary([{}, [['@', 'x']]]))\ncheck('escaped marker', solve(_vary(['##literal|@'])), _vary([{}, [['#literal', '@']]]))\ncheck('space prefix', solve(_vary([' # data|@'])), _vary([{}, [[' # data', '@']]]))\ncheck('metadata', solve(_vary(['#!unit=a=b', '@|x'])), _vary([{'unit': 'a=b'}, [['@', 'x']]]))\ncheck('duplicate', solve(_vary(['#!x=1', '#!x=2'])), _vary(None))\ncheck('bad directive', solve(_vary(['#!x'])), _vary(None))\ncheck('empty name', solve(_vary(['#!=value'])), _vary(None))\ncheck('empty data', solve(_vary([''])), _vary([{}, [['']]]))\ncheck('marker chain', solve(_vary(['###data'])), _vary([{}, [['##data']]]))\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":"b7a11a8248b2ba8e3e081536494a3c5a09b8bc544a45142c0c0b5593c5fd24f8","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    meta, rows = {}, []\n    for line in data:\n        if line.startswith('##'): continue\n        elif line.startswith('#!'):\n            pair = line[2:].split('=', 1)\n            if len(pair) != 2 or not pair[0]: return None\n            key, value = pair\n            if key in meta: return None\n            meta[key] = value\n        elif line.startswith('#'): continue\n        else: rows.append(line.split('|'))\n    return [meta, rows]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('comments', solve(_vary(['# comment', '@|x'])), _vary([{}, [['@', 'x']]]))\ncheck('escaped marker', solve(_vary(['##literal|@'])), _vary([{}, [['#literal', '@']]]))\ncheck('space prefix', solve(_vary([' # data|@'])), _vary([{}, [[' # data', '@']]]))\ncheck('metadata', solve(_vary(['#!unit=a=b', '@|x'])), _vary([{'unit': 'a=b'}, [['@', 'x']]]))\ncheck('duplicate', solve(_vary(['#!x=1', '#!x=2'])), _vary(None))\ncheck('bad directive', solve(_vary(['#!x'])), _vary(None))\ncheck('empty name', solve(_vary(['#!=value'])), _vary(None))\ncheck('empty data', solve(_vary([''])), _vary([{}, [['']]]))\ncheck('marker chain', solve(_vary(['###data'])), _vary([{}, [['##data']]]))\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-comment-records-classification-order","generated_at":"2026-09-29T14:44:44.043441+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.","root_cause":"The escaped-comment path drops a data record.","sha256":"bfa1d7d4bb158d591e660a7110eeebd1f39937822ec1dd8c24e5eee20c3fedf8","title":"Literal doubled-comment records are filtered as comments · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.343,"exit_code":1,"observations":[{"actual":[{},[["cell","x"]]],"check":"comments","expected":[{},[["cell","x"]]],"passed":true},{"actual":[{},[["literal","cell"]]],"check":"escaped marker","expected":[{},[["#literal","cell"]]],"passed":false},{"actual":[{},[[" # data","cell"]]],"check":"space prefix","expected":[{},[[" # data","cell"]]],"passed":true},{"actual":[{"unit":"a=b"},[["cell","x"]]],"check":"metadata","expected":[{"unit":"a=b"},[["cell","x"]]],"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"bad directive","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":[{},[[""]]],"check":"empty data","expected":[{},[[""]]],"passed":true},{"actual":[{},[["data"]]],"check":"marker chain","expected":[{},[["##data"]]],"passed":false},{"actual":[{},[]],"check":"zero","expected":[{},[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"comments\", \"actual\": [{}, [[\"cell\", \"x\"]]], \"expected\": [{}, [[\"cell\", \"x\"]]], \"passed\": true}, {\"check\": \"escaped marker\", \"actual\": [{}, [[\"literal\", \"cell\"]]], \"expected\": [{}, [[\"#literal\", \"cell\"]]], \"passed\": false}, {\"check\": \"space prefix\", \"actual\": [{}, [[\" # data\", \"cell\"]]], \"expected\": [{}, [[\" # data\", \"cell\"]]], \"passed\": true}, {\"check\": \"metadata\", \"actual\": [{\"unit\": \"a=b\"}, [[\"cell\", \"x\"]]], \"expected\": [{\"unit\": \"a=b\"}, [[\"cell\", \"x\"]]], \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad directive\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty data\", \"actual\": [{}, [[\"\"]]], \"expected\": [{}, [[\"\"]]], \"passed\": true}, {\"check\": \"marker chain\", \"actual\": [{}, [[\"data\"]]], \"expected\": [{}, [[\"##data\"]]], \"passed\": false}, {\"check\": \"zero\", \"actual\": [{}, []], \"expected\": [{}, []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.285,"exit_code":1,"observations":[{"actual":[{},[["cell","x"]]],"check":"comments","expected":[{},[["cell","x"]]],"passed":true},{"actual":[{},[]],"check":"escaped marker","expected":[{},[["#literal","cell"]]],"passed":false},{"actual":[{},[[" # data","cell"]]],"check":"space prefix","expected":[{},[[" # data","cell"]]],"passed":true},{"actual":[{"unit":"a=b"},[["cell","x"]]],"check":"metadata","expected":[{"unit":"a=b"},[["cell","x"]]],"passed":true},{"actual":null,"check":"duplicate","expected":null,"passed":true},{"actual":null,"check":"bad directive","expected":null,"passed":true},{"actual":null,"check":"empty name","expected":null,"passed":true},{"actual":[{},[[""]]],"check":"empty data","expected":[{},[[""]]],"passed":true},{"actual":[{},[]],"check":"marker chain","expected":[{},[["##data"]]],"passed":false},{"actual":[{},[]],"check":"zero","expected":[{},[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"comments\", \"actual\": [{}, [[\"cell\", \"x\"]]], \"expected\": [{}, [[\"cell\", \"x\"]]], \"passed\": true}, {\"check\": \"escaped marker\", \"actual\": [{}, []], \"expected\": [{}, [[\"#literal\", \"cell\"]]], \"passed\": false}, {\"check\": \"space prefix\", \"actual\": [{}, [[\" # data\", \"cell\"]]], \"expected\": [{}, [[\" # data\", \"cell\"]]], \"passed\": true}, {\"check\": \"metadata\", \"actual\": [{\"unit\": \"a=b\"}, [[\"cell\", \"x\"]]], \"expected\": [{\"unit\": \"a=b\"}, [[\"cell\", \"x\"]]], \"passed\": true}, {\"check\": \"duplicate\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"bad directive\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty name\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty data\", \"actual\": [{}, [[\"\"]]], \"expected\": [{}, [[\"\"]]], \"passed\": true}, {\"check\": \"marker chain\", \"actual\": [{}, []], \"expected\": [{}, [[\"##data\"]]], \"passed\": false}, {\"check\": \"zero\", \"actual\": [{}, []], \"expected\": [{}, []], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}