Skip to content

buildUrl silently drops the baseUrl path segment for absolute step paths #3546

Description

@eaarranz

Issue Summary

buildUrl in packages/integration-platform/src/runtime/check-context.ts composes request URLs with new URL(path, base || baseUrl). Per the WHATWG URL spec, an absolute path (/servers) replaces the entire path of the base — so a manifest with baseUrl: "https://api.hetzner.cloud/v1" and a step path /servers requests https://api.hetzner.cloud/servers (the /v1 is silently dropped), which returns the provider's 404 (api route not found).

The built-in code manifests avoid this by convention (version lives in the path, e.g. Vercel's /v9/projects), but nothing validates or documents it, and dynamic-integration authors hit it blind — the failure mode (provider 404) gives no hint that the base path was discarded.

Steps to Reproduce

  1. Create a dynamic integration with baseUrl: "https://api.hetzner.cloud/v1".
  2. Add a check step with "path": "/servers".
  3. Connect with a valid token and run the check.

Actual Results

  • HTTP 404: Not Found – {"error": {"message": "api route not found", "code": "not_found"}} — the request went to https://api.hetzner.cloud/servers.

Expected Results

Either of:

  • buildUrl joins base path + step path explicitly (e.g. concatenating pathnames) so baseUrl path segments survive; or
  • schema validation / docs state clearly that baseUrl must not contain a path and API versions belong in step paths.

Technical details

  • Self-hosted Comp, runtime as of a 2026-07-29 checkout of main.
  • One-line repro: new URL('/servers', 'https://api.hetzner.cloud/v1').toString()'https://api.hetzner.cloud/servers'.

Evidence

  • Hit in production while building a Hetzner dynamic integration; moving the version into the step paths (/v1/servers) fixed all requests immediately. Can attach failing run logs with the provider 404 body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions