{"abstract":"A banned token remains in normalized output.","category":"Token sampling filters","checks":6,"contract":"Return softmax probabilities for tokens not in banned; renormalize over survivors, returning empty if none survive.","contract_signature":"logits, banned","evaluation_group":"w3-tsf-ban-filter-before-normalize","failed_approach":"The attempted version emits zero-probability keys when every candidate is banned.","family":"w3-token-sampling-filters-ban-filter-before-normalize","id":"FA-98391","implementations":{"attempt":{"sha256":"f3cf0bff46328c980e3595973782dae61ba0b3a898a21ee27025fefb7a8fd001","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(logits, banned):\n    import math\n    m=max(logits.values(),default=0); ex={t:math.exp(v-m) for t,v in logits.items()}; z=sum(ex.values())\n    return {t:p/z for t,p in ex.items() if t not in banned}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ban high score',solve({'x':10.0,'a':0.0,'b':0.0},['x']),{'a':.5,'b':.5})\ncheck('all banned',solve({'a':N},['a']),{})\ncheck('nothing banned',solve({'a':0.0,'b':0.0},[]),{'a':.5,'b':.5})\ncheck('single survivor',solve({'a':4.0,'b':2.0},['b']),{'a':1.0})\ncheck('empty logits',solve({},[]),{})\ncheck('unknown banned id',solve({'a':N},['z']),{'a':1.0})\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":"231740e309554b36d90ef0ccbeb846b529bb37caec549831469c12f523c3c74e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(logits, banned):\n    import math\n    m=max(logits.values(),default=0); ex={t:math.exp(v-m) for t,v in logits.items()}; z=sum(ex.values())\n    return {t:p/z for t,p in ex.items()}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('ban high score',solve({'x':10.0,'a':0.0,'b':0.0},['x']),{'a':.5,'b':.5})\ncheck('all banned',solve({'a':N},['a']),{})\ncheck('nothing banned',solve({'a':0.0,'b':0.0},[]),{'a':.5,'b':.5})\ncheck('single survivor',solve({'a':4.0,'b':2.0},['b']),{'a':1.0})\ncheck('empty logits',solve({},[]),{})\ncheck('unknown banned id',solve({'a':N},['z']),{'a':1.0})\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":"These are toy finite-vocabulary contracts with supplied scores, histories, and draws; they do not claim production model quality or compatibility. 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":"w3-token-sampling-filters-ban-filter-before-normalize","generated_at":"2026-09-30T16:48:12.370957+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A finite, deterministic token-selection contract isolates one decoding operation from model inference and runtime behavior.","root_cause":"The ban list is ignored, so a forbidden token receives mass and suppresses survivors.","sha256":"bd1571a184f2bcf22ed6b86cf733f8e39e63bdc5878d958b8c8ca7179552e373","title":"Token sampling: A banned token remains in normalized output · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.111,"exit_code":1,"observations":[{"actual":{"a":4.5395807829510914e-05,"b":4.5395807829510914e-05},"check":"ban high score","expected":{"a":0.5,"b":0.5},"passed":false},{"actual":{},"check":"all banned","expected":{},"passed":true},{"actual":{"a":0.5,"b":0.5},"check":"nothing banned","expected":{"a":0.5,"b":0.5},"passed":true},{"actual":{"a":0.8807970779778823},"check":"single survivor","expected":{"a":1.0},"passed":false},{"actual":{},"check":"empty logits","expected":{},"passed":true},{"actual":{"a":1.0},"check":"unknown banned id","expected":{"a":1.0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ban high score\", \"actual\": {\"a\": 4.5395807829510914e-05, \"b\": 4.5395807829510914e-05}, \"expected\": {\"a\": 0.5, \"b\": 0.5}, \"passed\": false}, {\"check\": \"all banned\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"nothing banned\", \"actual\": {\"a\": 0.5, \"b\": 0.5}, \"expected\": {\"a\": 0.5, \"b\": 0.5}, \"passed\": true}, {\"check\": \"single survivor\", \"actual\": {\"a\": 0.8807970779778823}, \"expected\": {\"a\": 1.0}, \"passed\": false}, {\"check\": \"empty logits\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"unknown banned id\", \"actual\": {\"a\": 1.0}, \"expected\": {\"a\": 1.0}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.933,"exit_code":1,"observations":[{"actual":{"a":4.5395807829510914e-05,"b":4.5395807829510914e-05,"x":0.9999092083843409},"check":"ban high score","expected":{"a":0.5,"b":0.5},"passed":false},{"actual":{"a":1.0},"check":"all banned","expected":{},"passed":false},{"actual":{"a":0.5,"b":0.5},"check":"nothing banned","expected":{"a":0.5,"b":0.5},"passed":true},{"actual":{"a":0.8807970779778823,"b":0.11920292202211755},"check":"single survivor","expected":{"a":1.0},"passed":false},{"actual":{},"check":"empty logits","expected":{},"passed":true},{"actual":{"a":1.0},"check":"unknown banned id","expected":{"a":1.0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ban high score\", \"actual\": {\"x\": 0.9999092083843409, \"a\": 4.5395807829510914e-05, \"b\": 4.5395807829510914e-05}, \"expected\": {\"a\": 0.5, \"b\": 0.5}, \"passed\": false}, {\"check\": \"all banned\", \"actual\": {\"a\": 1.0}, \"expected\": {}, \"passed\": false}, {\"check\": \"nothing banned\", \"actual\": {\"a\": 0.5, \"b\": 0.5}, \"expected\": {\"a\": 0.5, \"b\": 0.5}, \"passed\": true}, {\"check\": \"single survivor\", \"actual\": {\"a\": 0.8807970779778823, \"b\": 0.11920292202211755}, \"expected\": {\"a\": 1.0}, \"passed\": false}, {\"check\": \"empty logits\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"unknown banned id\", \"actual\": {\"a\": 1.0}, \"expected\": {\"a\": 1.0}, \"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."}}