• erio's avatar
    feat: shuffle accounts within same sort group to prevent thundering herd · 1af06aed
    erio authored
    Add post-sort shuffle for accounts with identical (priority, loadRate,
    lastUsedAt) to break deterministic ordering when concurrent requests
    read the same scheduler snapshot. Applies to both Antigravity and
    OpenAI scheduling paths, plus the sortAccountsByPriorityAndLastUsed
    helper.
    
    Keeps upstream CallCount/ModelLoadInfo scheduling intact; shuffle is
    additive and only randomises within equivalent-rank groups.
    1af06aed
scheduler_shuffle_test.go 11.1 KB