Repository navigation
Conversation
Carries the Prisma parts of alchemy-run#2698 and alchemy-run#2701 onto main: Prisma.DomainOwnership, the internal DomainVerification and AuthoritativeDns helpers, Prisma.CustomDomain on distilled with an optional ownership, and the Website domain proving its hostname. Prisma now saves a domain ownership as unverified and returns it, so a successful create no longer proves anything. Proving creates the domain ownership, waits for the TXT record at the authoritative nameservers, then calls the verify route until Prisma reports verified. If it never does, the deploy fails with PrismaDomainOwnershipRequired and a domain ownership the deploy created is removed. Attributes add status and expiresAt; verifiedAt is null unless verified. The distilled pin is temporary: 51020e295 on the bot fork wmadden-electric/distilled (branch feat/prisma-routing-urls-on-alchemy-pin), which is Distilled's feature commits on top of 63ab82684, the commit Alchemy pins upstream. They expose httpStatus on createServiceDomain and createWorkspaceDomainOwnership and drop DomainOwnershipRequired from createWorkspaceDomainOwnership. Replace the pin with a Distilled main commit before the pull request opens. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Proving reads the record from the verification route and waits until every authoritative nameserver returns it. Only then does it create and verify. A record that is not visible fails with PrismaDomainOwnershipRequired and creates nothing, and no failure deletes anything. When the stored id no longer resolves, the domain ownership is looked up by domain before creating. An unverified one found by domain is taken over without --adopt; a verified or expiring one stays Unowned. A create that answers 200 with a row that is not unverified fails instead of taking it over. Prisma.CustomDomain again refuses a create that answers 200, using the httpStatus distilled now exposes. verifiedAt is removed. The docs say status is what Prisma reported at the last proof, and that a Website whose hostname was proved by hand needs one deploy with --adopt. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…vers defer to Prisma reconcile now accepts a domain ownership it did not record only while it is unverified, or with --adopt, the same rule read applies. A create that answers 200 follows the same rule. The authoritative check reports seen, absent or unknown. Only absent stops the deploy before anything is created; when no nameserver can be found or reached, the deploy creates and verifies and Prisma's own lookup decides. The check is a Context reference, so tests replace it, and the success path, both 200 cases and the bounded verify loop now have fake tests. The two idempotent creates retry only throttled requests: a retried create whose response was lost answers 200 for its own row. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
A hostname that serves a Prisma app, saved before its DNS exists. The deploy creates the platform row at once and reports in its attributes what is still to publish: the TXT record that proves ownership and the CNAME to the regional switchboard. Prisma makes the row active once both resolve. The RoutingUrl is identified on its Branch by logicalId, which defaults to the resource name. A row Prisma made for the same service and hostname with no logicalId is taken over by writing its logicalId. Another row on the Branch with the hostname fails the deploy and is named. A hostname change on an active row is refused before any PATCH until the new hostname has a verified domain ownership and its CNAME at every authoritative nameserver. Destroy deletes only the row, never the domain ownership. Prisma answers quota and logicalId conflicts with 409 and invalid hostnames or services on another Branch with 422. Distilled maps both to its generic Conflict and UnprocessableEntity, which carry only the message, so the resource tells the cases apart by message and raises a typed error for each. The switchboard target moves to internal/Switchboard.ts, and the authoritative CNAME check can compare the target. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…ocuments its limits A hostname change on an active RoutingUrl is still refused when the CNAME could not be checked, but the error now says it could not be checked from this machine and leaves the CNAME out of records. The JSDoc and the Compute guide say a change to an apex hostname is refused (Prisma needs a direct CNAME), that a RoutingUrl in another workspace holding the new hostname is not seen, and that a Prisma.CustomDomain being replaced by a RoutingUrl for the same hostname must be retained or removed in an earlier deploy. New fake tests: the unchecked CNAME, a covering wildcard domain ownership, and a pending row whose hostname changes with no check. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
When the new hostname has no CNAME to the switchboard, the check now accepts A or AAAA answers at every authoritative nameserver that include an address of switchboard.<region>, as CNAME flattening, ALIAS and ANAME give. A refused apex is told to publish an ALIAS, ANAME or flattened CNAME. The authoritative nameserver lookup now starts at the hostname itself, so an apex finds its own zone. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…n, and says when it could not check it The hostname-change check now waits once for the platform condition: each authoritative nameserver passes when it answers a CNAME to the switchboard, or A or AAAA records that include a switchboard address. The CNAME, A and AAAA queries run concurrently with their own timeouts, so a matching A answer counts when the AAAA query fails, and a refusal takes about a minute again instead of two. RoutingUrlHostnameChangeRefused gets switchboardDns (seen, absent or unknown), so a consumer can tell "not published" from "could not be checked from this machine" without reading the message. records uses only TXT and CNAME; the message says a hostname that cannot have a CNAME can use an ALIAS, ANAME or flattened CNAME. A CNAME every nameserver answered without stays in records even when the address lookup was inconclusive. The two-label apex guess is gone. Prisma.DomainOwnership and Prisma.CustomDomain find nameservers exactly as before, starting at the parent of the record name. Only the RoutingUrl check starts at the hostname itself, so an apex finds its own zone, and it skips that step when the hostname has a CNAME, because the recursive NS lookup would follow it into the target's zone. Each caller now names its starting point. DNS queries go through a replaceable DnsLookups service, and a unit suite over in-memory DNS covers the module. The RoutingUrl JSDoc and the Compute guide say the address form is accepted for any hostname, and give the condition for the CustomDomain migration warning. A skipped live test moves a serving hostname to one whose A records hold the switchboard's addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
… nameserver lookup stays unknown A nameserver that answers a CNAME for the new hostname that is not the switchboard now counts as absent, whatever its A or AAAA answers hold: Prisma uses addresses only for a hostname with no CNAME, and an authoritative server answers A queries through an in-zone CNAME. Correction to the previous commit, which said Prisma.DomainOwnership and Prisma.CustomDomain find nameservers exactly as before: it also put a 3-second limit on their local-resolver lookups. That limit is gone; their search is again the one from the first release, where a failed lookup moves one label up. On the RoutingUrl search, a failed or timed-out CNAME, NS or nameserver-address lookup now gives unknown instead of moving up, and a failed switchboard address lookup gives unknown unless an answer already matched. When the domain ownership is not verified, the RoutingUrl check asks once and refuses without waiting a minute; records and switchboardDns still come from that check. Prisma.CustomDomain now waits through the replaceable AuthoritativeRecordCheck, and its test pins the parent search. The live case waits for the moved hostname to become active. Doc comments say what the name search caches and that the address comparison assumes Prisma resolves the switchboard as this machine does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
`Prisma.RoutingUrl` takes an optional `dns` (a DNS adapter config). With it, the deploy publishes the TXT `_prisma-verification.<hostname>` and the CNAME `<hostname>` to the regional switchboard, derived from the workspace verification value and the app endpoint so the set is the same on every deploy. The RoutingUrl depends on the records, so a hostname change on an active row publishes the new records before the serving check runs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…a change is saved Each hostname now has its own record set, so a hostname change creates the new records first and Alchemy removes the old ones only after the RoutingUrl update succeeds; a refused change leaves them published. The record set is read by a new read-only Prisma.RoutingUrlDnsRecords resource from the service and the workspace verification value, so an app id from another resource needs no App.lookup, and an app with no endpoint is refused before anything is published, as is a wildcard hostname. The hostname-change check counts the workspace as owning an exact hostname when its TXT record is seen at every authoritative nameserver, not only when a domain ownership is verified, so publishing the records the refusal names and redeploying lets the change through. The refusal now says which, in ownershipDns. Under alchemy dev, dns publishes nothing. RoutingUrlResources lists the resources Prisma.RoutingUrl declares, for a provider collection built by hand. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Prisma.RoutingUrl tells the resource, through an internal prop, whether this deploy publishes the hostname's records. Only then does the hostname-change check wait for the ownership TXT; otherwise it checks once, so a refusal for missing ownership without dns fails at once. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…gUrl A site with domain declares one Prisma.RoutingUrl for the hostname and passes domain.dns through; it declares no Prisma.CustomDomain and no Prisma.DomainOwnership. site.domain is the RoutingUrl, so a site whose DNS is not ready deploys and reports pending with the records to publish. A site deployed by the released Alchemy keeps serving through the upgrade. The RoutingUrl takes over the row Prisma recorded for the custom domain, and Prisma.CustomDomain's delete now skips a row a RoutingUrl on the same service has taken over. With dns, the site keeps the alias record under its released id, ordered after the RoutingUrl, so the released CNAME is updated in place and never deleted as an orphan. Prisma.CustomDomain is deprecated: Prisma removes the custom domain routes about 2026-12-21. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…l names and checks tightened The Website keeps its released DomainAlias with adopt(true), because Cloudflare reports the CNAME the RoutingUrl's record set has just published as not owned by the stack, and with RemovalPolicy.retain(), so the record set alone removes the CNAME and the alias can be dropped once released sites have redeployed. Its target comes from the same required records as the record set. Record resources are keyed by the hostname itself, so two hostnames never share them. The ownership TXT is searched from the new hostname's nameservers, so a failed lookup is unknown, not absent; the error field is now ownership. The internal prop is waitForRecords, the read-only resource is Prisma.RoutingUrlRequiredRecords, and RoutingUrlProps is the public parameter type. CustomDomain and RoutingUrl share one rule for a row a RoutingUrl manages. websiteDomain moved to an internal module. DomainOwnership docs now teach a wildcard for RoutingUrls. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Prisma.RoutingUrl now tells Prisma's refusals apart by the typed errors Distilled generates from their error codes, never by message text. A refusal for a service on no Branch becomes the new RoutingUrlServiceNotOnABranch. Any other Conflict or UnprocessableEntity still becomes RoutingUrlOperationFailed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…ing, and the final review's tests and wording With dns, a hostname that is not dot-separated labels of letters, digits and hyphens is refused before anything is published, and RoutingUrlRequiredRecords refuses a service on no Branch before the records are published. A hostname that is not a plain string with dns raises the new RoutingUrlInvalidProps. Reading a RoutingUrl for a service on no Branch finds nothing instead of failing. RoutingUrl's general error and helpers move to internal/RoutingUrl.ts, hostname normalization lives once in internal/Hostname.ts, and the row rule is named for what it checks: the row has a logicalId. The DNS check options are CheckOptions. The Compute guide shows DomainOwnership proving a wildcard for RoutingUrls, and the deprecated CustomDomain section and JSDoc keep only what a user needs until the routes go. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Contributor
|
Install the packages built from this commit: alchemypnpm install https://pkg.alchemy.run/alchemy/pr:3529:0bfa1bd@alchemy.run (35)pnpm install https://pkg.alchemy.run/@alchemy.run/better-auth/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/git/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/drizzle/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/acme/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/archil/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/boat/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/axiom/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/doppler/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/infisical/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/1password/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/turso/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/e2b/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/daytona/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/modal/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/planetscale/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/neon/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/prisma/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/hetzner/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/digitalocean/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/railway/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/fly/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/github/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/stripe/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/gcp/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/aws/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/domain/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/kubernetes/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/docker/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/redis/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/sql/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/cloudflare-runtime/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/frontend-frameworks/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/node-utils/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/pkg/pr:3529:0bfa1bdTransitive Dependencies (29)pnpm install https://pkg.alchemy.run/@distilled.cloud/aws/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/acme/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/archil/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/core/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/boat-dev/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/axiom/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/doppler/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/infisical/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/turso/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/e2b/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/daytona/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/modal/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/planetscale/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/neon/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/s3/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/prisma/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/hetzner/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/digitalocean/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/railway/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/fly-io/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/github/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/stripe/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/aws4signer/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/cloudflare/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/iceberg/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/gcp/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/effect-cluster/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@alchemy.run/rivet/pr:3529:0bfa1bdpnpm install https://pkg.alchemy.run/@distilled.cloud/rivet/pr:3529:0bfa1bdPublished |
… --adopt Without stored state, a RoutingUrl now takes a row only when it is on its own service and has its logicalId, or has no logicalId and its hostname (a row Prisma made for a custom domain or the Console). A row with its logicalId on another service is reported as not owned, as Prisma.App does, because another stage or stack sharing the Branch can declare the same path. The lookup by logicalId uses the API's filter. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
wmadden-electric
force-pushed
the
feat/prisma-domain-ownership-status
branch
from
November 20, 2026 07:54
1d01576 to
e39ed32
Compare
…Prisma may have processed Both creates replace the deploy retry policy with one that retries only throttled requests. The tests install the deploy policy, answer a create with 503 after making the row, and check that the create is sent once; DomainOwnership's next deploy then finds the row. A throttled create is resent and owns the row it makes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
wmadden-electric
force-pushed
the
feat/prisma-domain-ownership-status
branch
from
November 20, 2026 10:12
e39ed32 to
6c7c31f
Compare
Live cases, unconditional and tagged live like the other Prisma resource suites, check through Prisma's API: a RoutingUrl with no DNS is saved pending with both records, an unchanged redeploy sends no update, it moves to a second App and destroy deletes it, leaving the unverified domain ownership Prisma made; a pending RoutingUrl's hostname changes in place; a RoutingUrl finds its own row after losing its state and refuses another App's row with the same logicalId without --adopt; Prisma's real refusals map to the typed errors; and DomainOwnership fails with the record to publish while the TXT is absent, creating nothing. The fake cases these cover are removed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…usals Temporary. The Distilled pull request gets this change regenerated from the spec mirror once the mirror has the new error codes; this pin moves to a Distilled main commit when that merges. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
wmadden-electric
force-pushed
the
feat/prisma-domain-ownership-status
branch
from
November 20, 2026 10:24
6c7c31f to
3dcb62b
Compare
With dns, the deploy waits up to about a minute for the published records to appear at the authoritative nameservers before Prisma checks a new hostname, then reads the RoutingUrl every 10 seconds, for up to 6 minutes, until it is active. It never calls POST /v1/urls/{id}/check: a check on a failed certificate orders a new one, and a workspace may order 10 an hour.
- RoutingUrlNotActive: the wait ran out, or another RoutingUrl holds the hostname. Names the first unmet condition and quotes customDomainSyncError.
- RoutingUrlCertificateLimitReached: Prisma reports the hourly certificate limit; fails at once with the reset time.
- The internal prop waitForRecords is now recordsPublished.
- The fake cloud serves a row once its records are published, answers 429 with Retry-After, and the RoutingUrl tests run under the deploy retry policy. New tests: the wait succeeding, timing out on the test clock, the hourly limit, a held hostname, Retry-After on the create and on a poll, and a redeploy after a failed wait finding the same row.
- Live tests read active from the deploy; a test that publishes records by hand checks once, then polls with GET.
- Docs say the deploy waits with dns, and that a workspace can add about 10 custom hostnames an hour.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…, and checks once when Prisma missed DNS - Before the create or a pending row's hostname change, the TXT and CNAME checks run together; a record still absent fails with RoutingUrlRecordsNotSeen before anything is saved. - After the save, when the row holds no custom domain and stops on ownershipVerified or dnsPointsAtSwitchboard, the resource calls /check once. With no custom domain, a check cannot retry a certificate. - A failed certificate fails at once with RoutingUrlNotActive, quoting the reason and pointing to setupUrl; a redeploy does not retry it. - RoutingUrlNotActive carries heldBy and certificateFailure, and its message depends on the cause. - The wait runs only with no stored output, a changed hostname, or a stored status that was not active. - A create refused as logicalId-taken after a lost reply continues with the row the own-row rule finds. - The internal prop is now publishesRecords. - The fake looks DNS up only on a write or a check; the certificate moves on reads. New tests: missed DNS, records not seen, failed certificate, lost create reply, pending hostname change, a served row read pending later, destroy after a failed wait. The failure tests run on the test clock. - The live helpers call /check once, then poll, from one shared file. - Docs: Prisma counts certificate orders, the total wait is about 7 minutes, and the held-hostname and failed-certificate cases. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…eld hostname and the single check - The resource exposes `state` next to `status`. - A held hostname ends the wait when `state` is `in_use_elsewhere`; a `heldBy` whose holder is being deleted no longer fails the deploy. - The single `/check` is made when the row holds no custom domain and `state` is `not_verified` or `waiting_for_dns`, so a row waiting for the hourly limit (`updating`) is not checked. - A failed certificate is still read from `customDomain.status`: `state` shows `certificate_failed` only after `not_verified`, `no_service`, `no_live_deployment` and `update_failed`. - The hourly limit is still read from `customDomainSyncError`: `state` shows it as `updating`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…s, and never resends its one check
- The wait runs when the RoutingUrl is created, its hostname changes, or `dns` is added: decided from the previous props, which a failed wait does not commit. A row that served and later reads pending no longer fails any later deploy.
- The one `/check` is sent with no retry policy; when it fails, the wait reads the row instead.
- Before that check on an existing row, both published records must be seen at the nameservers; otherwise `RoutingUrlRecordsNotSeen` says the RoutingUrl is saved and what was not seen.
- The record wait lasts up to 3 minutes, and the error says the domain must be delegated to this DNS host.
- `RoutingUrlNotActive` has `reason` (`held`, `certificateFailed`, `timedOut`); `heldBy` is set only when held; `certificateFailure` is now `certificateFailureReason`, null when Prisma gave none.
- A timeout while Prisma has not seen a record names the record and says a redeploy asks Prisma to check once.
- The failed-certificate message names the Console and `POST /v1/urls/{id}/check`.
- A resent create refused as logicalId-taken or quota-exceeded continues only with the row that has the same service, logicalId and hostname.
- Docs: `status` and `state` described apart, about 9 minutes in all, the record-wait cases, and certificate orders.
- Live helpers: check only when the resource would, after waiting for the CNAME.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…usals Distilled 6adb15da9 has the same typed RoutingUrl errors as the draft pin, generated from the real spec mirror, and adds `state` to every RoutingUrl output. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…usals Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
… changed its hostname in Prisma - With `dns`, the wait also runs when this deploy created the row or sent a hostname change, not only when the previous props differ. This covers reverting a hostname change whose wait failed, and a RoutingUrl deleted outside Alchemy. - A timeout on a row that holds a custom domain no longer promises that a redeploy checks; it says to check from the Console. - The live helper sends its single `/check` with no retry and ignores its failure. - `apps.mdx`: which failures save the RoutingUrl, and what `RoutingUrlRecordsNotSeen` leaves unchanged. - The twelve framework pages say the deploy does not wait only without `dns`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…icate limit The resource matched the English sentence Prisma writes in `customDomainSyncError`. Prisma will answer 429 with `Retry-After` instead, which the SDK already obeys, so the match and `RoutingUrlCertificateLimitReached` are removed. A row at the limit waits like any pending row and, if it does not serve, fails with `RoutingUrlNotActive` and `reason: "timedOut"`, whose message quotes Prisma's sentence with the reset time. It still gets no `/check`. The docs keep the 10 certificates an hour and what counts, and say that at the limit the hostname stays pending until it resets and a later deploy picks it up. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
wmadden
marked this pull request as ready for review
November 21, 2026 22:58
…in's pin Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
…h the wildcard as an example Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
This was referenced Nov 21, 2026
…in's pin Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prisma.RoutingUrlgives a Prisma app a hostname. Withdnsit publishes the records and waits until the hostname serves; withoutdnsit deploys before the hostname's DNS exists.Prisma.Websitenow uses it fordomain.Without
dnsthe deploy succeeds at once withstatus: "pending", andurl.recordslists the records to publish by hand.Why now: Prisma has deprecated its custom domain routes (
/v1/services/{id}/domains,/v1/domains/{id}) and deletes them about 2026-12-21. A RoutingUrl is their replacement in Prisma's API.Prisma.CustomDomainand everyPrisma.Websitewith adomaincall the old routes today.How a RoutingUrl works
The deploy saves the hostname first. Prisma stores it as
pendingand makes itactivewhen the TXT record and the CNAME resolve.Prisma.CustomDomainfailed the deploy until both existed.Each hostname proves itself. Prisma creates the domain ownership for that exact hostname when it saves the RoutingUrl. The resource never creates or deletes one, so no stack can remove a proof another stack relies on.
dnspublishes the two records and nothing else. They come from the workspace's verification endpoint and the app's switchboard address, which are the same on every deploy. Nothing is published underalchemy dev.With
dns, the deploy waits for the hostname to serve when it creates the RoutingUrl, changes its hostname or addsdns, and again after a deploy whose wait failed. Other deploys do not wait, so a hostname that served and later readspendingdoes not fail them. Before Prisma first looks at the hostname, the deploy waits up to 3 minutes for both records at the authoritative nameservers. After saving, it reads the RoutingUrl every 10 seconds for up to 6 minutes. It fails with:RoutingUrlRecordsNotSeenwhen a published record is still missing after 3 minutes. Prisma was not asked to look, so no certificate was ordered: a create or hostname change was not sent, and a RoutingUrl an earlier deploy saved stays as it was.RoutingUrlNotActive, whosereasonisheld(another RoutingUrl holds the hostname;heldBynames it),certificateFailed(certificateFailureReasonhas Prisma's reason; a redeploy does not retry it) ortimedOut(names the first unmet condition). The first two fail at once.After
RoutingUrlNotActivethe RoutingUrl is saved, and the next deploy finds it instead of creating a second one.A workspace can order about 10 certificates an hour. Prisma orders one for each new hostname once its records are published, for each hostname change, and again when an order fails or is stuck, so tests count their RoutingUrls, CI reruns and parallel jobs. At the limit the hostname stays
pendinguntil the limit resets, so a deploy withdnstimes out, andcustomDomainSyncErrorholds Prisma's sentence with the reset time. The resource asks Prisma to check a hostname at most once per deploy, never resends that check, and never sends it when Prisma already holds a custom domain for the hostname, because a check on a failed certificate orders another.It finds its own record in Prisma by
logicalId, which defaults to the resource's fully qualified name with.in place of/(Site.Urlfor a RoutingUrlUrlinside a WebsiteSite), because Prisma allows only letters, digits,.,-and_in alogicalId. With no saved state it takes a record without--adoptonly when that record is on its own app: one with itslogicalId, or one with nologicalIdand its hostname. That second case is how it takes over the record Prisma keeps for an existing custom domain. A matchinglogicalIdon another app needs--adopt, asPrisma.Apprequires.Changing the hostname of a serving RoutingUrl is checked first. Prisma would accept the change and stop serving the old hostname at once. So the resource sends it only when the new hostname's TXT record is proved (a
verifieddomain ownership covers it, or every authoritative nameserver answers the record) and the hostname points at the switchboard. Otherwise it fails withRoutingUrlHostnameChangeRefusedand changes nothing. Withdns, the new records are published before the check and the old ones are removed after the change is saved.Prisma's refusals are typed errors, caught by the tags feat(core,prisma)!: read a REST response's HTTP status, and type Prisma's RoutingUrl refusals distilled#1348 generates:
RoutingUrlQuotaExceeded,RoutingUrlLogicalIdTaken,RoutingUrlInvalidHostname,RoutingUrlServiceNotOnABranch,RoutingUrlServiceOnAnotherBranch.Prisma.Websitedomaindeploys before its DNS is ready and reportspending. It used to fail. Withdnsit waits until the hostname serves.Breaking:
site.domainis a RoutingUrl.Upgrade with the same
domainfirst, and change the hostname in a later deploy.Prisma.CustomDomainandPrisma.DomainOwnershipPrisma.CustomDomainis deprecated. Replace it with a RoutingUrl for the same hostname in one deploy:Until the routes go it keeps working: it now fails with
PrismaDomainOwnershipRequired, which names the TXT record, when Prisma refuses a hostname for want of proof.Prisma.DomainOwnershipis the resource for a domain ownership: Prisma's record that a workspace has proved it owns a domain, which is an exact hostname or a wildcard. A hostname serves only once a verified domain ownership covers it. Prisma creates the one for a RoutingUrl's exact hostname itself; this resource declares one directly, for example a wildcard that covers every hostname under it:It counts as proved only when Prisma reports it
verified. One it did not create needs--adoptonce it isverified, and destroying it removes the domain ownership and its TXT record.This replaces #2698 and #2701 and keeps their design. Both were written when Prisma refused to create a domain ownership until its TXT record resolved, so they treat a successful create as proof. Prisma now creates it as
unverifiedat once.Depends on alchemy-run/distilled#1348.
submodules/distilledpoints at that branch rebuilt on the commit Alchemy pins today, and moves to a Distilledmaincommit when it merges.Alternatives considered
url.records. That list holds only the records Prisma still wants, so a record would leave it once found and the adapter would delete it.Prisma.Website. A hostname for a plainPrisma.Appwould then need its records published by hand.Agent: prospero-20
🤖 Generated with Claude Code