Repository navigation
mcpx: bind authz-stdio-use-environment (server) with an end-to-end env test (#1950) - #12869
Merged
Merged
Conversation
…v test (#1950) The last server-side authorization gap on #1950 was authz-stdio-use-environment: the spec says stdio implementations retrieve credentials from the environment instead of following the OAuth flow, and mcpauth's `env` auth type does that retrieval, but no test traced it into a stdio child end to end. pool.TestStdioChildReceivesEnvCredential is that trace: the credential exists only in the daemon's environment, the server's `env` auth block expands ${VAR} from it, the pool carries the resolved value into the spawned child, and the child itself reports what it received under a name set nowhere but the auth block (so plain environment inheritance cannot produce it). A second subtest pins that an unset variable fails the call before any child spawns. coverage_authz.go now binds the row to that test instead of registering it as a gap; the override's why records the binding. The regenerated matrix moves the server side of the row to "tested" in all four revisions (server SHOULD NOT per revision: 3 tested / 1 gap -> 4 tested / 0 gap). The client side keeps the #1950 gap per the recorded client-OAuth deferral. Verified: go test ./internal/pool -count=1 (full package, incl. the new test); go test ./internal/conformance -run TestMatrix|TestAuthSplit|TestCatalogue|TestCoverage; the covering tool now selects the new test in its pool pattern.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
What
Binds the last server-side authorization gap on #1950 —
authz-stdio-use-environment— with the end-to-end test the gap text named as missing.The spec row: "Implementations using an STDIO transport SHOULD NOT follow this specification, and instead retrieve credentials from the environment." mcpauth's
envauth type performs that retrieval, but no test traced it into a stdio child.The test
pool.TestStdioChildReceivesEnvCredential(ininternal/pool/auth_test.go, next to the #240 HTTP companionTestAuthReachesTheUpstream):envauth block expands${VAR}from it; the pool carries the resolved value into the spawned stdio child; the child itself reports the value back through anechocall, under a variable name set nowhere but the auth block — so plain environment inheritance cannot produce it.Matrix move
coverage_authz.gobinds the row instead of registering a gap; the override'swhyrecords the binding. Regenerated matrix: server side of the row is tested in all four revisions — per-revision server SHOULD NOT goes 3 tested / 1 gap → 4 tested / 0 gap. The client side keeps the #1950 gap per the recorded client-OAuth deferral (2026-10-30 decision on #1950), untouched.Verification
go test ./internal/pool/ -count=1— full package passes, including both new subtests.go test ./internal/conformance/ -run 'TestMatrix|TestAuthSplit|TestCatalogue|TestCoverage' -count=1— passes (split counts unchanged: the split already carried this side's permissive verdict).go run ./internal/conformance/cmd/covering -nnow selectsTestStdioChildReceivesEnvCredentialin the pool pattern.go build ./...,gofmt,go vetclean.#1950 stays open: its remaining scope is the client-side OAuth rows, deferred by the recorded decision.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.