{"abstract":"A single unknown exclusion value removes unrelated candidates from an anti-join result.","category":"Storage and queries","checks":7,"contract":"For each candidate in input order, retain it unless an excluded non-NULL value is SQL-equal to it. NULL never equals any value, including NULL. Duplicates on the left remain duplicates. Inputs are integers or None.","contract_signature":"candidates, excluded","evaluation_group":"xs-anti-join","failed_approach":"Removing NULL from the exclusion set still drops a NULL candidate whenever the filtered set is nonempty.","family":"store-nullable-anti-join","id":"FA-111","implementations":{"attempt":{"sha256":"8e58083175b40fdb0eefd1c4aec1b217300e70e9982f74e46bdf062b97c133fe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport sqlite3\nN = 1\nobservations = []\ndef solve(candidates, excluded):\n    db = sqlite3.connect(':memory:')\n    try:\n        db.execute('CREATE TABLE candidates (v INTEGER)')\n        db.execute('CREATE TABLE excluded (v INTEGER)')\n        db.executemany('INSERT INTO candidates VALUES (?)', [(v,) for v in candidates])\n        db.executemany('INSERT INTO excluded VALUES (?)', [(v,) for v in excluded])\n        return [row[0] for row in db.execute('SELECT c.v FROM candidates AS c WHERE c.v NOT IN (SELECT v FROM excluded WHERE v IS NOT NULL) ORDER BY c.rowid')]\n    finally:\n        db.close()\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unknown exclusion does not poison other values', solve([N, N+1], [None, N]), [N+1])\ncheck('unknown candidate is not equal to a known exclusion', solve([None, N+1], [N]), [None, N+1])\ncheck('NULL is not equal to NULL', solve([None, N], [None]), [None, N])\ncheck('empty exclusion retains every occurrence', solve([N, N, None], []), [N, N, None])\ncheck('exact known matches are excluded', solve([N, N+1, N+2], [N+2, N]), [N+1])\ncheck('left multiplicity survives unrelated right duplicates', solve([N, N, N+1], [N+1, N+1]), [N, N])\ncheck('empty candidates', solve([], [None, N]), [])\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":"c3b67db39110c3fbd51a27871ef64ddc120636b5816c6eefc43d8baafb87b44b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport sqlite3\nN = 1\nobservations = []\ndef solve(candidates, excluded):\n    db = sqlite3.connect(':memory:')\n    try:\n        db.execute('CREATE TABLE candidates (v INTEGER)')\n        db.execute('CREATE TABLE excluded (v INTEGER)')\n        db.executemany('INSERT INTO candidates VALUES (?)', [(v,) for v in candidates])\n        db.executemany('INSERT INTO excluded VALUES (?)', [(v,) for v in excluded])\n        return [row[0] for row in db.execute('SELECT c.v FROM candidates AS c WHERE c.v NOT IN (SELECT v FROM excluded) ORDER BY c.rowid')]\n    finally:\n        db.close()\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unknown exclusion does not poison other values', solve([N, N+1], [None, N]), [N+1])\ncheck('unknown candidate is not equal to a known exclusion', solve([None, N+1], [N]), [None, N+1])\ncheck('NULL is not equal to NULL', solve([None, N], [None]), [None, N])\ncheck('empty exclusion retains every occurrence', solve([N, N, None], []), [N, N, None])\ncheck('exact known matches are excluded', solve([N, N+1, N+2], [N+2, N]), [N+1])\ncheck('left multiplicity survives unrelated right duplicates', solve([N, N, N+1], [N+1, N+1]), [N, N])\ncheck('empty candidates', solve([], [None, N]), [])\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":" 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":"store-nullable-anti-join","generated_at":"2026-09-29T14:36:50.479592+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Executes real in-memory SQLite three-valued logic to isolate nullable exclusion behavior; this does not simulate a complete database optimizer, concurrent workload, or production query plan.","root_cause":"SQL NOT IN propagates UNKNOWN from NULL, whereas the requested operation is absence of an equal row.","sha256":"300b4c440aed55969c6c7175ff4c7c705bb6b03caf2800b8a81f7daad3f08975","title":"An exclusion query loses candidates when its subquery contains NULL · 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.652,"exit_code":1,"observations":[{"actual":[2],"check":"unknown exclusion does not poison other values","expected":[2],"passed":true},{"actual":[2],"check":"unknown candidate is not equal to a known exclusion","expected":[null,2],"passed":false},{"actual":[null,1],"check":"NULL is not equal to NULL","expected":[null,1],"passed":true},{"actual":[1,1,null],"check":"empty exclusion retains every occurrence","expected":[1,1,null],"passed":true},{"actual":[2],"check":"exact known matches are excluded","expected":[2],"passed":true},{"actual":[1,1],"check":"left multiplicity survives unrelated right duplicates","expected":[1,1],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unknown exclusion does not poison other values\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"unknown candidate is not equal to a known exclusion\", \"actual\": [2], \"expected\": [null, 2], \"passed\": false}, {\"check\": \"NULL is not equal to NULL\", \"actual\": [null, 1], \"expected\": [null, 1], \"passed\": true}, {\"check\": \"empty exclusion retains every occurrence\", \"actual\": [1, 1, null], \"expected\": [1, 1, null], \"passed\": true}, {\"check\": \"exact known matches are excluded\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"left multiplicity survives unrelated right duplicates\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"empty candidates\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.529,"exit_code":1,"observations":[{"actual":[],"check":"unknown exclusion does not poison other values","expected":[2],"passed":false},{"actual":[2],"check":"unknown candidate is not equal to a known exclusion","expected":[null,2],"passed":false},{"actual":[],"check":"NULL is not equal to NULL","expected":[null,1],"passed":false},{"actual":[1,1,null],"check":"empty exclusion retains every occurrence","expected":[1,1,null],"passed":true},{"actual":[2],"check":"exact known matches are excluded","expected":[2],"passed":true},{"actual":[1,1],"check":"left multiplicity survives unrelated right duplicates","expected":[1,1],"passed":true},{"actual":[],"check":"empty candidates","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unknown exclusion does not poison other values\", \"actual\": [], \"expected\": [2], \"passed\": false}, {\"check\": \"unknown candidate is not equal to a known exclusion\", \"actual\": [2], \"expected\": [null, 2], \"passed\": false}, {\"check\": \"NULL is not equal to NULL\", \"actual\": [], \"expected\": [null, 1], \"passed\": false}, {\"check\": \"empty exclusion retains every occurrence\", \"actual\": [1, 1, null], \"expected\": [1, 1, null], \"passed\": true}, {\"check\": \"exact known matches are excluded\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"left multiplicity survives unrelated right duplicates\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"empty candidates\", \"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."}}