{"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.","evaluation_group":"s3-delimited-text-column-inference","failed_approach":"Ignoring only NULL still lets an unquoted empty cell contaminate the type.","family":"s3-delimited-text-column-inference-null-evidence","id":"FA-47761","implementations":{"attempt":{"sha256":"c063c210054bbd98e6713f09ec0bcf3c3d047ab6e6a6bb23c15a8304e459cfb8","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 == '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].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":"1afe7e931081c138495142cfdc27180903ce105ea2aef5ec03f9e2ae4c2ecf34","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 False: 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].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"},"fixed":{"sha256":"ff76d7e2cb78e5fc37c9122b58bf52c46aa8a0f466da8026d55e34fe1265ce64","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].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"}},"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-null-evidence","generated_at":"2026-09-29T14:44:44.467781+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 not quoted and value in ('', 'NULL'): continue","root_cause":"Missing tokens are classified as data during column inference.","sha256":"914b4dc5d45084729f593cf09726a60b2758107eba12d028976c58f376ebf50c","title":"Missing cells force otherwise numeric columns to text · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.43,"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","text"],"check":"null only","expected":["unknown","unknown"],"passed":false},{"actual":["text","text"],"check":"quoted empty","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"leading zero","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"mixed","expected":["text","text"],"passed":true},{"actual":["int","text"],"check":"null ignored","expected":["int","bool"],"passed":false},{"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\", \"text\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": false}, {\"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\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"null ignored\", \"actual\": [\"int\", \"text\"], \"expected\": [\"int\", \"bool\"], \"passed\": false}, {\"check\": \"empty table\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.396,"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":["text","text"],"check":"null only","expected":["unknown","unknown"],"passed":false},{"actual":["text","text"],"check":"quoted empty","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"leading zero","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"mixed","expected":["text","text"],"passed":true},{"actual":["text","text"],"check":"null ignored","expected":["int","bool"],"passed":false},{"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\": [\"text\", \"text\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": false}, {\"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\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"null ignored\", \"actual\": [\"text\", \"text\"], \"expected\": [\"int\", \"bool\"], \"passed\": false}, {\"check\": \"empty table\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.144,"exit_code":0,"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","text"],"check":"mixed","expected":["text","text"],"passed":true},{"actual":["int","bool"],"check":"null ignored","expected":["int","bool"],"passed":true},{"actual":["unknown","unknown"],"check":"empty table","expected":["unknown","unknown"],"passed":true}],"passed":true,"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\", \"text\"], \"expected\": [\"text\", \"text\"], \"passed\": true}, {\"check\": \"null ignored\", \"actual\": [\"int\", \"bool\"], \"expected\": [\"int\", \"bool\"], \"passed\": true}, {\"check\": \"empty table\", \"actual\": [\"unknown\", \"unknown\"], \"expected\": [\"unknown\", \"unknown\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}