Skip to content

fix(deploy): signed-in env deploy prints the site's API: <site>/_api line, like env status - #2792

Open
reliant-01 wants to merge 1 commit into
fix/deploy-api-url-faviconfrom
fix/env-deploy-api-url-line
Open

reliant-01 wants to merge 1 commit into
fix/deploy-api-url-faviconfrom
fix/env-deploy-api-url-line

Conversation

@reliant-01

Copy link
Copy Markdown
Contributor

Stacked on #2786 (base branch fix/deploy-api-url-favicon). Retarget to main once it merges.

Problem

#2786 prints a site's same-origin API address (API: <site>/_api) in three places: claimable deploys, forge env status, and its --json output. The signed-in forge env deploy summary, which is the first place an author looks for where their app went, printed only url <name>: … lines.

Fix

The mapping is reachable at deploy time. The hosted deploy plan carries each static site's StaticSiteSpec.RuntimeConfig, and through it the API_URL WorkloadURL reference that the platform serves at /_api. It also carries the plan's workloads and each site's published URL.

  • deploytarget.planSiteAPIURLs(plan, published) maps a static site to <origin>/_api when its API_URL references a workload published in the same deploy. A literal API_URL is the author's own address and is not listed.
  • printHostedURLs (the "readiness: all N workload(s) ready" summary) now prints the API: line under the URL lines.
  • SiteAPIURL, FormatSiteAPIURLs and SiteAPIRuntimeKey moved from internal/cli into internal/deploytarget, so env deploy and env status share one spelling, as they already share FormatHostedURLs. internal/cli calls them. No behaviour change there.
  • The deploy/hosting skill now says env deploy prints the line too.

No --json shape changes. env deploy has no hosted --json document for this; env status's hosted_api_urls is unchanged.

Tests

  • internal/deploytarget:
    • TestHostedDeployURLsNameTheSiteAPI: the exact deploy summary text, for both value and pointer static specs.
    • TestPlanSiteAPIURLsOnlyForAPIsTheSiteServes: no line for a literal API_URL, a ref to no workload, a ref to a database, no API_URL, or a site with no URL yet.
    • TestSiteAPIURL and TestFormatSiteAPIURLs, moved from internal/cli.
  • task test:short -- ./internal/deploytarget/ ./internal/templates/ is green, and so is the internal/cli site-API/claim/status tests (-run 'SiteAPI|ClaimBlock|HostedStatus').

@reliant-labs reliant-labs Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

review:passed

Lane: MEDIUM (one pass on gpt-6-luna@codex).

MEDIUM: agent-instructions (internal/templates/project/skills/forge/deploy/hosting/SKILL.md); code (internal/cli/env_destination.go, internal/cli/site_api_url.go, …)

The change shares site API URL formatting between deploy and status without altering status JSON or deployment behavior. The plan mapping only reports a site's same-origin API when API_URL references a workload in the deploy plan; tests cover literals, missing/non-workload references, unavailable site URLs, and both static-spec representations. No RC-09 dependency-pin change or RC-10 fail-closed check is present.

Passed: entering the native merge queue at this exact head.

Reviewed ee0a2acd0e6bddfd258abc19b3e662014dc51539.

Posted by Reliant for PR pipeline · pr-review · opened, an automation of @reliant-01.

@reliant-labs reliant-labs Bot added merge:queue Ready: the merge steward batches, gates and lands it review:passed Automated review passed; exact-head merge-review SUCCESS also required and removed review:pending merge:queue Ready: the merge steward batches, gates and lands it labels Nov 25, 2026

This branch has not been deployed

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

Labels

review:passed Automated review passed; exact-head merge-review SUCCESS also required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant