Only kinds below their target share are generated and run; one-controller flock guard
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,3 +77,11 @@ def accepted_task_counts(logs_dir=None):
|
||||
if k:
|
||||
out[k] = out.get(k, 0) + 1
|
||||
return out
|
||||
|
||||
|
||||
def below_target(counts, share=TYPE_SHARE):
|
||||
"""Kinds whose share of `counts` is below the target for the next item (deficit > 0).
|
||||
Since 2026-10-05 (Kral + Opus): only these kinds are generated and run; CLAS and FUNC wait until they are at or
|
||||
below their target share."""
|
||||
total, ss = sum(counts.values()) + 1, sum(share.values())
|
||||
return {k for k, v in share.items() if total * v / ss - counts.get(k, 0) > 0}
|
||||
|
||||
Reference in New Issue
Block a user