Skip to content

fix: queryGateway 工具未返回明确的外部调用 URL,导致评测系统使用错误主机名触发 SSL 证书不匹配#685

Open
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mojgqzg4-otl94f-querygateway-url-ssl
Open

fix: queryGateway 工具未返回明确的外部调用 URL,导致评测系统使用错误主机名触发 SSL 证书不匹配#685
binggg wants to merge 1 commit intomainfrom
automation/attribution-issue-mojgqzg4-otl94f-querygateway-url-ssl

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Apr 29, 2026

Attribution issue

  • issueId: issue_mojgqzg4_otl94f
  • category: tool
  • canonicalTitle: queryGateway 工具未返回明确的外部调用 URL,导致评测系统使用错误主机名触发 SSL 证书不匹配
  • representativeRun: atomic-js-cloudbase-http-function-deploy/2026-04-29T02-50-37-pwc47p

Automation summary

  • root_cause: The queryGateway tool's getAccess action returned multiple domains and URLs without explicitly indicating which one is the "external" URL to use. This caused evaluation systems to potentially pick the wrong hostname (e.g., a custom domain without proper SSL certificate), leading to SSL certificate mismatch errors.
  • changes:
  1. Added defaultDomain field to listDomains, listCustomDomains, listRoutes, and getRoute actions to explicitly indicate the default domain.
  2. Added customDomains field to listDomains and getAccess actions to list only custom domains separately.
  3. Added defaultUrl field to getAccess action - this provides a clear, explicit external call URL using the default domain (DefaultDomain) which is guaranteed to have SSL configured by CloudBase.
  • validation:
  • All gateway tests pass (9/9)
  • All skill quality tests pass (9/9)
  • TypeScript compilation succeeds without errors
  • Build completes successfully
  • follow_up: The fix adds explicit defaultUrl field that returns a URL like ` using the CloudBase-provided default domain. This ensures evaluators and users can clea

Changed files

  • mcp/src/tools/gateway.test.ts
  • mcp/src/tools/gateway.ts

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07057c42e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread mcp/src/tools/gateway.ts
Comment on lines +299 to +300
const defaultUrl = (accessList.APISet || []).length > 0
? `https://${defaultDomain}${normalizeAccessPath(accessList.APISet[0].Path)}`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard defaultUrl when default domain is missing

In queryGateway(action=getAccess), defaultUrl is now built whenever APISet is non-empty, but it does not verify that DefaultDomain exists. If an environment has routes but the default domain is not initialized/returned, this produces an invalid URL like https://undefined/...; downstream callers that prioritize defaultUrl will then fail requests despite valid entries in urls. Build defaultUrl only when defaultDomain is truthy (or fall back to a known valid URL).

Useful? React with 👍 / 👎.

@binggg
Copy link
Copy Markdown
Member Author

binggg commented Apr 29, 2026

Attribution post-PR evaluation

  • visibility: internal identifiers, run ids, and private links are intentionally omitted
  • attempt: 1
  • eval_scope: primary_only
  • overall: FAILED
  • summary: at least one planned evaluation case failed
  • updated_at: 2026-04-29T04:18:16.878Z

Cases

  • [FAILED] — primary — evaluation failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant