fix: remove redundant double type assertion in validateMCPRequirements#30952
Merged
fix: remove redundant double type assertion in validateMCPRequirements#30952
Conversation
3 tasks
… validateMCPRequirements Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0635b2d9-5574-48a8-839e-1d9945151e30 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix redundant double type assertion in validateMCPRequirements
fix: remove redundant double type assertion in validateMCPRequirements
May 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies MCP config validation in Go by removing a redundant double type assertion when reading the type field, and also includes broad updates to generated workflow lock files (mostly adjusting actions/github-script version annotations / manifest metadata).
Changes:
- Collapse the two-step
mcpType.(string)check+extract into a single assertion assignment invalidateMCPRequirements. - Update multiple
.github/workflows/*.lock.ymlgenerated lock files, primarily changingactions/github-scriptversion annotation strings (e.g.,v9.0.0→v9) in the embedded manifest/headers and someuses:comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/mcp_property_validation.go | Removes redundant double type assertion when validating explicit MCP type. |
| .github/workflows/weekly-editors-health-check.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/video-analyzer.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/update-astro.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/test-workflow.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/test-project-url-default.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/test-dispatcher.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-workflow-call.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-workflow-call-with-inputs.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-temporary-id.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-service-ports.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-opencode.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-crush.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/smoke-ci.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/research.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/repo-tree-map.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/github-remote-mcp-auth-test.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/github-mcp-tools-report.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/functional-pragmatist.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/firewall.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/example-permissions-warning.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/docs-noob-tester.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/dependabot-repair.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/dependabot-go-checker.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/dependabot-burner.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-team-status.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-team-evolution-insights.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-sentrux-report.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-regulatory.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/daily-malicious-code-scan.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/code-simplifier.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/cli-consistency-checker.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/changeset.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/blog-auditor.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation. |
| .github/workflows/ace-editor.lock.yml | Updates generated lock header/manifest and actions/github-script version annotation (including a job step use). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 152/187 changed files
- Comments generated: 1
Comment on lines
1
to
3
| # gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"445a084c156b33cd81f31a85d1ea641e71936cc3ca336cad6297150c3813cf3f","strict":true,"agent_id":"copilot"} | ||
| # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41","digest":"sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41@sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41","digest":"sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41@sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41","digest":"sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41@sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} | ||
| # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41","digest":"sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.41@sha256:cb2b565d070116d4b67e355775340528b5a2c3cb18b2c9049638bcc2df681770"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41","digest":"sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.41@sha256:fadd0de387209f69a9a7a1b8722bb5e7fdfb80ba9749a5c60f0e4cd7582a74d0"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41","digest":"sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.41@sha256:1260445d25968dbf3ae70143964177a0e5914cf2ce07a6117f7d3caec6c3e3c4"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.6","digest":"sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.6@sha256:2bb8eef86006a4c5963c55616a9c51c32f27bfdecb023b8aa6f91f6718d9171c"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3","digest":"sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959","pinned_image":"ghcr.io/github/github-mcp-server:v1.0.3@sha256:2ac27ef03461ef2b877031b838a7d1fd7f12b12d4ace7796d8cad91446d55959"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} | ||
| # ___ _ _ |
This was referenced May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
validateMCPRequirementsperformed two type assertions on the same value: one to check, one to extract. The second assertion was safe but non-idiomatic and misleading.Change
Collapsed the two-step pattern into a single canonical Go assertion: