← Back to Pull requests

build: lint nested Go modules, and fix their findings #4809

Closed
unknown closed this pull request without merging on Nov 05, 2026 23:38 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 16:17 UTC
Author

<!-- Thanks for sending a pull request! Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://github.com/agones-dev/agones/blob/main/CONTRIBUTING.md and developer guide https://github.com/agones-dev/agones/blob/main/build/README.md
2. Please label this pull request according to what type of issue you are addressing.
3. Ensure you have added or ran the appropriate tests for your PR: https://github.com/agones-dev/agones/blob/main/build/README.md#testing-and-building
-->

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

> /kind breaking

/kind bug

/kind cleanup

/kind documentation

/kind feature

/kind hotfix

/kind release

What this PR does / Why we need it:

golangci-lint run ./... stops at module boundaries, so the 16 nested Go modules (examples, build tooling, site, test/upgrade) were never linted. make lint now discovers every tracked nested go.mod and lints each module from its own directory against the root config, with NESTED_LINT_EXCLUDE as an explicit opt-out, so new modules are linted by default. examples/autoscaler-wasm is linted for wasip1/wasm. The redundant golangci-lint run ./examples/... pass is dropped, since ./... already covers the examples in the root module.

Fixes the findings in each module. Real bugs among them:

  • examples/autoscaler-webhook: missing return after http.Error led to a nil dereference on a bad request.

  • test/upgrade: five fmt.Errorf calls dropped the wrapped error.

  • build/scripts/k8s-export-openapi: the readiness probe leaked response bodies, and close errors on written files were ignored.

  • autoscaler-wasm buffer_size and autoscaler-webhook fixedReplicas silently overflowed int32; both now parse with a 32-bit limit.
  • Rebuilds examples/autoscaler-wasm/plugin.wasm, and bumps the versions of the examples whose source changed, along with the image references to them: allocation-endpoint 0.19, autoscaler-webhook 0.24, crd-client 0.27, custom-controller 0.15, simple-game-server 0.45, supertuxkart 0.26 and xonotic 2.9.

    Which issue(s) this PR fixes:
    <!--
    *Automatically closes linked issue when PR is merged.
    Usage: Closes #<issue number>, or Closes (paste link of issue).
    Use "Work on #<issue number>" if you wish to reference the issue without closing it.
    -->
    Work on #4421

    Did you use AI tools in preparing this PR?:
    <!--
    If you used AI tools in preparing your PR, you must disclose this in the description of your PR.
    --->
    Y

    Special notes for your reviewer:

    Sorry about the large PR, couldn't think of another way to do it.

    Diff: 339 lines (+254 / -85) across 4 files Reviewer: markmandel Review duration: 11960m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 339 lines diff across 4 files
    0.42
    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.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4809"
    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: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    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: 16.7% · Safe to merge
    16.7%