{"abstract":"Round-robin ignores weights, while contiguous weighted blocks create avoidable short-prefix imbalance.","category":"Runtime and resources","checks":7,"contract":"Weights are nonnegative integers. Starting all credits at zero, perform the stated smooth weighted round-robin update for each requested slot; lowest index wins ties. Zero-weight lanes are ineligible. Return chosen lane indices, or [] if all weights are zero or there are no slots.","evaluation_group":"model-ec09f9b39bd63f95","failed_approach":"Expanding each weight into a contiguous block matches a long-run ratio but not the required smooth schedule.","family":"runtime-smooth-weighted-scheduling","id":"FA-241","implementations":{"attempt":{"sha256":"1b337fc54a01976a02c43936c478425f131ba9e19167f49b31d311d5368f15dd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(weights, slots):\n    cycle = [i for i, weight in enumerate(weights) for unused in range(weight)]\n    return [cycle[i%len(cycle)] for i in range(slots)] if cycle else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two to one remains smooth', solve([2*N, N], 3*N), [0, 1, 0]*N)\ncheck('one to three remains smooth', solve([N, 3*N], 4*N), [1, 0, 1, 1]*N)\ncheck('zero-weight lane is excluded', solve([N, 0, N], 2*N), [0, 2]*N)\ncheck('equal weights deterministic', solve([N, N, N], 3*N), [0, 1, 2]*N)\ncheck('one worker', solve([N], N), [0]*N)\ncheck('no capacity', solve([0, 0], N), [])\ncheck('no scheduling slots', solve([N, N+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":"c9fcf8ac1e8a772e80c361c9a03caf742219fe1ebd8a6bcb7652f933a06bd885","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(weights, slots):\n    eligible = [i for i, w in enumerate(weights) if w > 0]\n    return [eligible[i%len(eligible)] for i in range(slots)] if eligible else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two to one remains smooth', solve([2*N, N], 3*N), [0, 1, 0]*N)\ncheck('one to three remains smooth', solve([N, 3*N], 4*N), [1, 0, 1, 1]*N)\ncheck('zero-weight lane is excluded', solve([N, 0, N], 2*N), [0, 2]*N)\ncheck('equal weights deterministic', solve([N, N, N], 3*N), [0, 1, 2]*N)\ncheck('one worker', solve([N], N), [0]*N)\ncheck('no capacity', solve([0, 0], N), [])\ncheck('no scheduling slots', solve([N, N+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"},"fixed":{"sha256":"cf2a0e8e12491ef44dcc0d12f436c872c308f9730c4591517aaa36765a3bacf9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(weights, slots):\n    total, credits, chosen = sum(weights), [0]*len(weights), []\n    eligible = [i for i, weight in enumerate(weights) if weight > 0]\n    if not total:\n        return []\n    for unused in range(slots):\n        credits = [credit+weight for credit, weight in zip(credits, weights)]\n        winner = max(eligible, key=lambda i: (credits[i], -i))\n        credits[winner] -= total\n        chosen.append(winner)\n    return chosen\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('two to one remains smooth', solve([2*N, N], 3*N), [0, 1, 0]*N)\ncheck('one to three remains smooth', solve([N, 3*N], 4*N), [1, 0, 1, 1]*N)\ncheck('zero-weight lane is excluded', solve([N, 0, N], 2*N), [0, 2]*N)\ncheck('equal weights deterministic', solve([N, N, N], 3*N), [0, 1, 2]*N)\ncheck('one worker', solve([N], N), [0]*N)\ncheck('no capacity', solve([0, 0], N), [])\ncheck('no scheduling slots', solve([N, N+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":" 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":"runtime-smooth-weighted-scheduling","generated_at":"2026-09-29T14:36:51.528382+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Models dispatch fairness for unequal-capacity workers with an explicit deterministic scheduling policy; it does not model variable job duration or claim universal latency optimality.","repair":"Use smooth weighted round-robin: add each weight, serve the largest credit, then subtract total weight from that credit.","root_cause":"The scheduler tracks neither accumulated scheduling debt nor deterministic tie behavior.","sha256":"b5527c1f61abb7328a87464247ef6155f281513c631287ee9308abe48aa9b581","title":"A weighted scheduler releases traffic in unfair bursts · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":33.065,"exit_code":1,"observations":[{"actual":[0,0,1],"check":"two to one remains smooth","expected":[0,1,0],"passed":false},{"actual":[0,1,1,1],"check":"one to three remains smooth","expected":[1,0,1,1],"passed":false},{"actual":[0,2],"check":"zero-weight lane is excluded","expected":[0,2],"passed":true},{"actual":[0,1,2],"check":"equal weights deterministic","expected":[0,1,2],"passed":true},{"actual":[0],"check":"one worker","expected":[0],"passed":true},{"actual":[],"check":"no capacity","expected":[],"passed":true},{"actual":[],"check":"no scheduling slots","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two to one remains smooth\", \"actual\": [0, 0, 1], \"expected\": [0, 1, 0], \"passed\": false}, {\"check\": \"one to three remains smooth\", \"actual\": [0, 1, 1, 1], \"expected\": [1, 0, 1, 1], \"passed\": false}, {\"check\": \"zero-weight lane is excluded\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"equal weights deterministic\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"one worker\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"no capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no scheduling slots\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":32.461,"exit_code":1,"observations":[{"actual":[0,1,0],"check":"two to one remains smooth","expected":[0,1,0],"passed":true},{"actual":[0,1,0,1],"check":"one to three remains smooth","expected":[1,0,1,1],"passed":false},{"actual":[0,2],"check":"zero-weight lane is excluded","expected":[0,2],"passed":true},{"actual":[0,1,2],"check":"equal weights deterministic","expected":[0,1,2],"passed":true},{"actual":[0],"check":"one worker","expected":[0],"passed":true},{"actual":[],"check":"no capacity","expected":[],"passed":true},{"actual":[],"check":"no scheduling slots","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two to one remains smooth\", \"actual\": [0, 1, 0], \"expected\": [0, 1, 0], \"passed\": true}, {\"check\": \"one to three remains smooth\", \"actual\": [0, 1, 0, 1], \"expected\": [1, 0, 1, 1], \"passed\": false}, {\"check\": \"zero-weight lane is excluded\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"equal weights deterministic\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"one worker\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"no capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no scheduling slots\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":35.69,"exit_code":0,"observations":[{"actual":[0,1,0],"check":"two to one remains smooth","expected":[0,1,0],"passed":true},{"actual":[1,0,1,1],"check":"one to three remains smooth","expected":[1,0,1,1],"passed":true},{"actual":[0,2],"check":"zero-weight lane is excluded","expected":[0,2],"passed":true},{"actual":[0,1,2],"check":"equal weights deterministic","expected":[0,1,2],"passed":true},{"actual":[0],"check":"one worker","expected":[0],"passed":true},{"actual":[],"check":"no capacity","expected":[],"passed":true},{"actual":[],"check":"no scheduling slots","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"two to one remains smooth\", \"actual\": [0, 1, 0], \"expected\": [0, 1, 0], \"passed\": true}, {\"check\": \"one to three remains smooth\", \"actual\": [1, 0, 1, 1], \"expected\": [1, 0, 1, 1], \"passed\": true}, {\"check\": \"zero-weight lane is excluded\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"equal weights deterministic\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"one worker\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"no capacity\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"no scheduling slots\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}