{"abstract":"Top-k routing follows expert names instead of gate scores.","category":"Mixture of experts dispatch","checks":6,"contract":"Select up to k unique (expert,score) pairs by descending score then ascending expert name.","contract_signature":"scores,k","evaluation_group":"moe-topk-ranking","failed_approach":"Score-only sorting leaves ties dependent on input order.","family":"w3-mixture-of-experts-dispatch-topk-score","id":"FA-100541","implementations":{"attempt":{"sha256":"4d135c74a491192707b1044bdcf4c3be60eedb32f0c319c276dcd2ae3d85aa91","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(scores,k):\n    return sorted(scores,key=lambda x:-x[1])[:k]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nrows=[('a',N),('b',N+1),('c',N-1)]\ncheck('score wins',solve(rows,1),['b'])\ncheck('tie name',solve([('z',N),('a',N)],1),['a'])\ncheck('all ranked',solve(rows,8),['b','a','c'])\ncheck('zero k',solve(rows,0),[])\ncheck('empty',solve([],N),[])\ncheck('negative scores',solve([('x',-N),('y',-N-1)],1),['x'])\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":"dec8e5a337d21008de54954bb4cd94cf9a2ac6f8b25a7de894b53355ce845864","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(scores,k):\n    return sorted(e for e,s in scores)[:k]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nrows=[('a',N),('b',N+1),('c',N-1)]\ncheck('score wins',solve(rows,1),['b'])\ncheck('tie name',solve([('z',N),('a',N)],1),['a'])\ncheck('all ranked',solve(rows,8),['b','a','c'])\ncheck('zero k',solve(rows,0),[])\ncheck('empty',solve([],N),[])\ncheck('negative scores',solve([('x',-N),('y',-N-1)],1),['x'])\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":"Inputs are finite toy scores and routes; the contract does not model a production model, accelerator, or learned routing quality. 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-mixture-of-experts-dispatch-topk-score","generated_at":"2026-09-30T16:48:36.730442+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic toy router makes this dispatch decision independently inspectable.","root_cause":"Candidates are sorted by identifier, not gate value.","sha256":"bbf8b9a4ac7fe1b97fac450ff781759e7683e78aec8afc95d077dcf8620b296d","title":"Top-k routing follows expert names instead of gate scores · 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":27.813,"exit_code":1,"observations":[{"actual":[["b",2]],"check":"score wins","expected":["b"],"passed":false},{"actual":[["z",1]],"check":"tie name","expected":["a"],"passed":false},{"actual":[["b",2],["a",1],["c",0]],"check":"all ranked","expected":["b","a","c"],"passed":false},{"actual":[],"check":"zero k","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["x",-1]],"check":"negative scores","expected":["x"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"score wins\", \"actual\": [[\"b\", 2]], \"expected\": [\"b\"], \"passed\": false}, {\"check\": \"tie name\", \"actual\": [[\"z\", 1]], \"expected\": [\"a\"], \"passed\": false}, {\"check\": \"all ranked\", \"actual\": [[\"b\", 2], [\"a\", 1], [\"c\", 0]], \"expected\": [\"b\", \"a\", \"c\"], \"passed\": false}, {\"check\": \"zero k\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"negative scores\", \"actual\": [[\"x\", -1]], \"expected\": [\"x\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.696,"exit_code":1,"observations":[{"actual":["a"],"check":"score wins","expected":["b"],"passed":false},{"actual":["a"],"check":"tie name","expected":["a"],"passed":true},{"actual":["a","b","c"],"check":"all ranked","expected":["b","a","c"],"passed":false},{"actual":[],"check":"zero k","expected":[],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":["x"],"check":"negative scores","expected":["x"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"score wins\", \"actual\": [\"a\"], \"expected\": [\"b\"], \"passed\": false}, {\"check\": \"tie name\", \"actual\": [\"a\"], \"expected\": [\"a\"], \"passed\": true}, {\"check\": \"all ranked\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"b\", \"a\", \"c\"], \"passed\": false}, {\"check\": \"zero k\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"negative scores\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"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."}}