Repository navigation
fix(deploy): signed-in env deploy prints the site's API: <site>/_api line, like env status - #2792
reliant-01 wants to merge 1 commit into
Conversation
…line, like env status
There was a problem hiding this comment.
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.
Stacked on #2786 (base branch
fix/deploy-api-url-favicon). Retarget tomainonce 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--jsonoutput. The signed-inforge env deploysummary, which is the first place an author looks for where their app went, printed onlyurl <name>: …lines.Fix
The mapping is reachable at deploy time. The hosted deploy plan carries each static site's
StaticSiteSpec.RuntimeConfig, and through it theAPI_URLWorkloadURLreference 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>/_apiwhen itsAPI_URLreferences a workload published in the same deploy. A literalAPI_URLis the author's own address and is not listed.printHostedURLs(the "readiness: all N workload(s) ready" summary) now prints theAPI:line under the URL lines.SiteAPIURL,FormatSiteAPIURLsandSiteAPIRuntimeKeymoved frominternal/cliintointernal/deploytarget, soenv deployandenv statusshare one spelling, as they already shareFormatHostedURLs.internal/clicalls them. No behaviour change there.deploy/hostingskill now saysenv deployprints the line too.No
--jsonshape changes.env deployhas no hosted--jsondocument for this;env status'shosted_api_urlsis 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.TestSiteAPIURLandTestFormatSiteAPIURLs, moved frominternal/cli.task test:short -- ./internal/deploytarget/ ./internal/templates/is green, and so is theinternal/clisite-API/claim/status tests (-run 'SiteAPI|ClaimBlock|HostedStatus').