Skip to content

fix(gateway): prevent silent Event fallback when exposing HTTP functions #583

@binggg

Description

@binggg

Signal

  • Attribution: issue_moa6g6yz_1082jp
  • Run: atomic-js-cloudbase-http-function-deploy/2026-04-22T14-55-11-eb2d66
  • Score / failure: 0.58; deployed httpDemo returns FUNCTION_PARAM_INVALID on all gateway requests

Why this is actionable

  • Relevant module: mcp/src/tools/gateway.ts and mcp/src/tools/functions.ts
  • Current behavior: createFunction(type="HTTP") succeeds, but follow-up manageGateway(action="createAccess") can omit type and silently default to Event, producing a broken access path for HTTP functions
  • Evidence: trace shows createAccess was called without type immediately after HTTP function creation; gateway requests then failed with FUNCTION_PARAM_INVALID

Proposed direction

  • Reject missing createAccess type for function targets or otherwise prevent the silent Event fallback
  • Strengthen the HTTP-function follow-up guidance returned by manageFunctions so the next call explicitly carries type="HTTP"

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fixAI automation created a fix PR for this issueai-processedAI automation already processed this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions