← Back to Pull requests

Remove CountsAndLists feature gate from controllers, allocation, auto… #4760

Closed
unknown closed this pull request without merging on Oct 10, 2026 21:05 UTC
View on GitHub
unknown unknown commented on Sep 29, 2026 09:23 UTC
Author

What type of PR is this?

/kind cleanup

What this PR does / Why we need it:

Part of graduating CountsAndLists to Stable. This follows the API validation PR (#4733) and removes the FeatureCountsAndLists gate checks from the controller and allocation code paths, so Counters, Lists and Priorities are always processed:

  • pkg/allocation/converters: always convert Priorities, Counters and Lists between the allocation API and the CRD types.

  • pkg/gameserverallocations:

  • - Always tie-break with Counter/List Priorities in the allocation cache and in find.
    - Always batch requests by SortKey in the allocator.
    - The nil-GSA guard in ListSortedGameServers stays; only the gate check is removed.
  • pkg/fleetautoscalers: remove the "feature flag not enabled" error for CounterPolicy/ListPolicy.

  • pkg/fleets: always sync Priorities to the active GameServerSet and aggregate Counter/List status.

  • pkg/gameserversets: always aggregate Counter/List status, and always use Priorities when sorting for Packed and Distributed.

  • pkg/metrics: always record Fleet Counter and List metrics.
  • Tests:

  • Removed test cases that only covered the gate-disabled path.

  • Removed ParseFeatures calls and the FeatureTestMutex locks that guarded them where a test no longer changes feature flags.
  • Which issue(s) this PR fixes:

    Works On #4590

    Did you use AI tools in preparing this PR?:

    Y

    Special notes for your reviewer:

  • Out of scope: the FeatureCountsAndLists checks in pkg/sdkserver (sdkserver.go, sdk.go, localsdk.go) are left for the follow-up PR. The gate definition in pkg/util/runtime/features.go stays until those checks are removed too.

  • Behaviour change: these controllers now ignore CountsAndLists=false. They no longer clear Counter/List status on Fleets and GameServerSets, and the autoscaler no longer rejects Counter/List policies when the gate is off.

  • Testing: unit tests pass with go test -race over pkg/..., sdks/go/... and cmd/....
  • Diff: 254 lines (+190 / -64) across 3 files Reviewer: markmandel Review duration: 16542m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 254 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.332
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4760"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.1% (MEDIUM) · Higher = larger blast radius
    39.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.4% · Safe to merge
    15.4%