FAILURE MAP
← Case archive

FA-100586 / Mixture of experts dispatch / Open access

Top-k selection crosses a group boundary · case 01

Top-k selection crosses a group boundary.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Global ranking is used when each router group has its own quota.

THE FAILURE

Global ranking is used when each router group has its own quota.

Unsuccessful approach: Taking k candidates globally still underfills a group with weaker scores.

Case contract

Input (group,expert,score) rows; return up to k per group by score descending and expert ID, preserving group lexical order then rank.

Why this case matters

A deterministic toy router makes this dispatch decision independently inspectable.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows,k):
    return sorted(rows,key=lambda r:(-r[2],r[1]))[:k]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
rows=[('g2','b',N+2),('g1','z',N+1),('g1','a',N),('g2','c',N-1)]
check('per group',solve(rows,1),[['g1','z',N+1],['g2','b',N+2]])
check('two per group',solve(rows,2),[['g1','z',N+1],['g1','a',N],['g2','b',N+2],['g2','c',N-1]])
check('zero',solve(rows,0),[])
check('empty',solve([],N),[])
check('one group',solve([('g','b',N),('g','a',N+1)],1),[['g','a',N+1]])
check('tie expert',solve([('g','z',N),('g','a',N)],2),[['g','a',N],['g','z',N]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
per group[['g2', 'b', 3]][['g1', 'z', 2], ['g2', 'b', 3]]Failed
two per group[['g2', 'b', 3], ['g1', 'z', 2]][['g1', 'z', 2], ['g1', 'a', 1], ['g2', 'b', 3], ['g2', 'c', 0]]Failed
zero[][]Passed
empty[][]Passed
one group[['g', 'a', 2]][['g', 'a', 2]]Failed
tie expert[['g', 'a', 1], ['g', 'z', 1]][['g', 'a', 1], ['g', 'z', 1]]Failed

SHA-256 / d8be8206f1f0b6d558fbd3a1df73575e236cc9bd371fab7266a5119abf9427b3

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows,k):
    return sorted(rows,key=lambda r:(r[0],-r[2],r[1]))[:k]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
rows=[('g2','b',N+2),('g1','z',N+1),('g1','a',N),('g2','c',N-1)]
check('per group',solve(rows,1),[['g1','z',N+1],['g2','b',N+2]])
check('two per group',solve(rows,2),[['g1','z',N+1],['g1','a',N],['g2','b',N+2],['g2','c',N-1]])
check('zero',solve(rows,0),[])
check('empty',solve([],N),[])
check('one group',solve([('g','b',N),('g','a',N+1)],1),[['g','a',N+1]])
check('tie expert',solve([('g','z',N),('g','a',N)],2),[['g','a',N],['g','z',N]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
per group[['g1', 'z', 2]][['g1', 'z', 2], ['g2', 'b', 3]]Failed
two per group[['g1', 'z', 2], ['g1', 'a', 1]][['g1', 'z', 2], ['g1', 'a', 1], ['g2', 'b', 3], ['g2', 'c', 0]]Failed
zero[][]Passed
empty[][]Passed
one group[['g', 'a', 2]][['g', 'a', 2]]Failed
tie expert[['g', 'a', 1], ['g', 'z', 1]][['g', 'a', 1], ['g', 'z', 1]]Failed

SHA-256 / 91806274cba7b988b7e30b789c1d988318adc0b21726dace1c42cc84a85f5e9a

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:37.193948+00:00.

Case digest / d11eaf3473a15adf7fc2674c7677d4b6e18510132aab7b41fd29b8ab73e9c6dd