Repository navigation
Conversation
Collaborator
|
👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push. Commits that are not verified: See GitHub’s guide on signing commits for setup instructions. I’ve added |
This branch has not been deployed
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.
The up-front missing-env preflight scans a toolset's
envvalues with rawos.Expand, while the runtime expands the same values throughenvironment.ExpandAll(which normalizes${env.X}toXfirst). For the canonical form — exactly whatexamples/mcp-definitions.yamluses — the preflight records the literal nameenv.GITHUB_PERSONAL_ACCESS_TOKEN:GatherEnvVarsForToolsthen returns["env.GITHUB_PERSONAL_ACCESS_TOKEN"], andCheckRequiredEnvVarsaborts the run even withGITHUB_PERSONAL_ACCESS_TOKENset:${env.X}is documented as the canonical syntax for every config field, including toolsetenvvalues (docs/configuration/overview/index.md), andenvironment.Refsis documented as the helper for exactly this kind of up-front check.Change
Use
environment.Refs(value)instead of rawos.Expand, so the preflight discovers the same names the runtime will expand.Test
pkg/config/gather_mcp_env_test.goserves a static MCP catalog and checks three forms (${env.X},${X},$X) with the variable set. Onmainthe canonical subtest fails with the error above; with the change all three pass and the reported name isGITHUB_PERSONAL_ACCESS_TOKEN.Validation
The full
go test ./...has unrelated baseline failures in this environment (pkg/hookshook commands exit 127 andpkg/runtime/TestDoCompactAfterHookFires); they reproduce without this change.