{"abstract":"A structured table violates the declared record or column contract.","category":"Delimited text","checks":8,"contract":"Infer per-column wire types from already lexed two-column rows. Unquoted empty and NULL cells supply no evidence; quoted cells force text. Unquoted lowercase true/false are bool; canonical signed decimal integers without leading zeros are int; all other cells text. Mixed non-null kinds promote to text; a column with no evidence is unknown.","contract_signature":"data","evaluation_group":"s3-delimited-text-column-inference","failed_approach":"Clearing before adding is another form of the same last-value-only repair.","family":"s3-delimited-text-column-inference-evidence-history","id":"FA-47781","implementations":{"attempt":{"sha256":"e22781fa52f9f07f7680da1ae454035c17804a867499cfe15e468685f1d314ef","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    evidence = [set(), set()]\n    for row in data:\n        for i, (value, quoted) in enumerate(row):\n            if not quoted and value in ('', 'NULL'): continue\n            if quoted: kind = 'text'\n            elif value in ('true', 'false'): kind = 'bool'\n            elif value.lstrip('-').isascii() and value.lstrip('-').isdigit() and value == str(int(value)): kind = 'int'\n            else: kind = 'text'\n            evidence[i].clear(); evidence[i].add(kind)\n    return [next(iter(kinds)) if len(kinds) == 1 else 'text' if kinds else 'unknown' for kinds in evidence]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('typed', solve(_vary([[['12', False], ['true', False]], [['-2', False], ['false', False]]])), _vary(['int', 'bool']))\ncheck('quoted number', solve(_vary([[['12', True], ['@', False]]])), _vary(['text', 'text']))\ncheck('null only', solve(_vary([[['NULL', False], ['', False]]])), _vary(['unknown', 'unknown']))\ncheck('quoted empty', solve(_vary([[['', True], ['NULL', True]]])), _vary(['text', 'text']))\ncheck('leading zero', solve(_vary([[['01', False], ['-0', False]]])), _vary(['text', 'text']))\ncheck('mixed', solve(_vary([[['1', False], ['true', False]], [['@', False], ['2', False]]])), _vary(['text', 'text']))\ncheck('null ignored', solve(_vary([[['NULL', False], ['', False]], [['1', False], ['false', False]]])), _vary(['int', 'bool']))\ncheck('empty table', solve(_vary([])), _vary(['unknown', 'unknown']))\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":"9bcff8aaee5e6330988270d0ec8461766c819ce338f81400c334eec7ed64adac","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    evidence = [set(), set()]\n    for row in data:\n        for i, (value, quoted) in enumerate(row):\n            if not quoted and value in ('', 'NULL'): continue\n            if quoted: kind = 'text'\n            elif value in ('true', 'false'): kind = 'bool'\n            elif value.lstrip('-').isascii() and value.lstrip('-').isdigit() and value == str(int(value)): kind = 'int'\n            else: kind = 'text'\n            evidence[i] = {kind}\n    return [next(iter(kinds)) if len(kinds) == 1 else 'text' if kinds else 'unknown' for kinds in evidence]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('typed', solve(_vary([[['12', False], ['true', False]], [['-2', False], ['false', False]]])), _vary(['int', 'bool']))\ncheck('quoted number', solve(_vary([[['12', True], ['@', False]]])), _vary(['text', 'text']))\ncheck('null only', solve(_vary([[['NULL', False], ['', False]]])), _vary(['unknown', 'unknown']))\ncheck('quoted empty', solve(_vary([[['', True], ['NULL', True]]])), _vary(['text', 'text']))\ncheck('leading zero', solve(_vary([[['01', False], ['-0', False]]])), _vary(['text', 'text']))\ncheck('mixed', solve(_vary([[['1', False], ['true', False]], [['@', False], ['2', False]]])), _vary(['text', 'text']))\ncheck('null ignored', solve(_vary([[['NULL', False], ['', False]], [['1', False], ['false', False]]])), _vary(['int', 'bool']))\ncheck('empty table', solve(_vary([])), _vary(['unknown', 'unknown']))\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-column-inference-evidence-history","generated_at":"2026-09-29T14:44:44.814938+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":"Replacing the evidence set forgets earlier conflicting kinds.","sha256":"f6a765253c1993968b56cdeb61df26e02ffbd75cec715406cd930f9eb47f6753","title":"Column inference uses only the last non-null value · 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":39.546,"exit_code":1,"observations":[{"actual":["int","bool"],"check":"typed","expected":["int","bool"],"passed":true},{"actual":["text","text"],"check":"quoted number","expected":["text","text"],"passed":true},{"actual":["unknown","unknown"],"check":"null only","expected":["unknown","unknown"],"passed":true},{"actual":["text","text"],"check":"quoted empty","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"leading zero","expected":["text","text"],"passed":true},{"actual":["text","int"],"check":"mixed","expected":["text","text"],"passed":false},{"actual":["int","bool"],"check":"null ignored","expected":["int","bool"],"passed":true},{"actual":["unknown","unknown"],"check":"empty table","expected":["unknown","unknown"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"typed\", \"actual\": [\"int\", \"bool\"], \"expected\": [\"int\", \"bool\"], \"passed\": true}, {\"check\": \"quoted number\", \"actual\": [\"text\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"null only\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": true}, {\"check\": \"quoted empty\", \"actual\": [\"text\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"leading zero\", \"actual\": [\"text\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [\"text\", \"int\"], \"expected\": [\"text\", \"text\"], \"passed\": false}, {\"check\": \"null ignored\", \"actual\": [\"int\", \"bool\"], \"expected\": [\"int\", \"bool\"], \"passed\": true}, {\"check\": \"empty table\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.202,"exit_code":1,"observations":[{"actual":["int","bool"],"check":"typed","expected":["int","bool"],"passed":true},{"actual":["text","text"],"check":"quoted number","expected":["text","text"],"passed":true},{"actual":["unknown","unknown"],"check":"null only","expected":["unknown","unknown"],"passed":true},{"actual":["text","text"],"check":"quoted empty","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"leading zero","expected":["text","text"],"passed":true},{"actual":["text","int"],"check":"mixed","expected":["text","text"],"passed":false},{"actual":["int","bool"],"check":"null ignored","expected":["int","bool"],"passed":true},{"actual":["unknown","unknown"],"check":"empty table","expected":["unknown","unknown"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"typed\", \"actual\": [\"int\", \"bool\"], \"expected\": [\"int\", \"bool\"], \"passed\": true}, {\"check\": \"quoted number\", \"actual\": [\"text\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"null only\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": true}, {\"check\": \"quoted empty\", \"actual\": [\"text\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"leading zero\", \"actual\": [\"text\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [\"text\", \"int\"], \"expected\": [\"text\", \"text\"], \"passed\": false}, {\"check\": \"null ignored\", \"actual\": [\"int\", \"bool\"], \"expected\": [\"int\", \"bool\"], \"passed\": true}, {\"check\": \"empty table\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"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."}}