fix: manageGateway 的 deleteRoute 操作在环境已绑定情况下返回"需要已绑定 envId"错误#649
Closed
binggg wants to merge 1 commit into
Closed
fix: manageGateway 的 deleteRoute 操作在环境已绑定情况下返回"需要已绑定 envId"错误#649binggg wants to merge 1 commit into
binggg wants to merge 1 commit into
Conversation
…Id"错误 (issue_moj0kqe7_al9299)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Member
Author
Attribution post-PR evaluation
Cases
|
Member
Author
|
代码冲突了 |
Member
Author
|
Closing stale automated attribution PR. The issue has been superseded by subsequent work or is no longer actionable. |
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.
Attribution issue
Automation summary
**
manageGatewayandqueryGatewaytools were using a customensureGatewayEnvIdfunction that only checked ifcloudBaseOptions.envIdwas explicitly provided. When the environment is bound via authentication (as shown in the trace withcurrent_env_id: "booker-eval-8g4tb1du9a5a0bf3"), thecloudBaseOptions.envIdmight not be set, but the envId is available through the login state or cached environment. Other tools likecloudrun.ts,permissions.tsusegetEnvIdfromcloudbase-manager.tswhich properly resolves from multiple sources, but the gateway tools were using a custom function that only checked one source.mcp/src/tools/gateway.ts: ChangedgetGatewayEnvIdto usegetEnvId(cloudBaseOptions)instead of the customensureGatewayEnvIdfunction, which resolves envId from cloudBaseOptions, cache, login state, or default env manager. Updated all 5 call sites to await the now-async function.mcp/src/tools/gateway.test.ts: Added mock forgetEnvIdto make tests pass.npx tsc --noEmit)npx vitest run src/tools/gateway.test.ts)Changed files
mcp/src/tools/gateway.test.tsmcp/src/tools/gateway.ts