Skip to content

[CI Failure Doctor] Golden outputs and lint fail after removing MCP gateway payloadSizeThreshold #18841

@github-actions

Description

@github-actions

CI Failure Investigation - Run #38196

Summary

Several pkg/workflow golden tests and the Go linter failed because the recent MCP gateway configuration change removed the payloadSizeThreshold field but the golden fixtures and helper declarations were not kept in sync.

Failure Details

Root Cause Analysis

  • Golden test shards and the test-wasm-golden target still expect MCP gateway configs to include payloadSizeThreshold, but the compiler output now omits that field, so the comparison between generated JSON and the recorded fixtures fails.
  • golangci-lint now sees two helpers with no callers because recent refactors removed the code paths that used them, resulting in an unused linter failure for assertEnvVarsInSteps and validationHelpersLog.

Failed Jobs and Errors

  • build-wasmmake test-wasm-golden fails because TestWasmGolden_AllEngines detects that the generated JSON is missing the "payloadSizeThreshold": 524288 line that the golden files still expect.
  • testTestWasmGolden_CompileFixtures/{basic-copilot,smoke-copilot} fail for the same reason, with the failure report showing that payloadSizeThreshold was dropped from the MCP gateway env.entries block.
  • lint-gogolangci-lint exits with unused errors at pkg/workflow/safe_outputs_env_helpers_test.go:12:6 (unused assertEnvVarsInSteps) and pkg/workflow/validation_helpers.go:33:5 (unused validationHelpersLog).
Investigation Findings
  • The failure report for the golden fixtures highlights this diff:
@@ -339,4 +339,3 @@@ Keep the MCP gateway payload block in sync
               "apiKey": "\$\{MCP_GATEWAY_API_KEY}",
-              "payloadDir": "\$\{MCP_GATEWAY_PAYLOAD_DIR}",
-              "payloadSizeThreshold": 524288
+              "payloadDir": "\$\{MCP_GATEWAY_PAYLOAD_DIR}"
             }
  • golangci-lint raised the unused errors shown in the log because the helpers no longer exercise assert or logging paths that reference them.

Recommended Actions

  • Regenerate the golden fixtures used by TestWasmGolden_AllEngines and TestWasmGolden_CompileFixtures so that they match the compiler’s new output (the payload gateway block should only include payloadDir).
  • Clean up or reintroduce the logic that references assertEnvVarsInSteps and validationHelpersLog so that the helpers are either used or removed, allowing golangci-lint to finish.
  • After updating the fixtures and helper usage, rerun make test-wasm-golden, go test ./pkg/workflow -run TestWasmGolden, and golangci-lint locally before pushing.

Prevention Strategies

  • When removing or renaming configuration fields, immediately regenerate any golden outputs that encode those fields so the tests serve as an early warning for out-of-sync fixtures.
  • Whenever helper functions become unused due to refactors, either delete them in the same change or update their call sites and rerun the linter to guard against unused failures.

AI Team Self-Improvement

Before landing MCP gateway payload changes, rerun the golden fixture suites and golangci-lint locally and update the expectations they encode so the CI jobs stay green.

Historical Context
  • Issue #17678 documented the MCP gateway v0.1.5 update that introduced several breaking config validation changes, including adjustments to the payload configuration. The current failure is the first time the golden fixtures and linter have been caught out by the removal of payloadSizeThreshold.

🩺 Diagnosis provided by CI Failure Doctor

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d
  • expires on Mar 1, 2026, 1:39 PM UTC

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions