Skip to content

fix(cloudflare/workers): converge plans for unmanaged custom domains - #975

Merged
sam-goodwin merged 1 commit into
mainfrom
claude/issue-942-453906
Jul 28, 2026
Merged

sam-goodwin merged 1 commit into
mainfrom
claude/issue-942-453906

Conversation

@sam-goodwin

@sam-goodwin sam-goodwin commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Closes #942

#932 stopped an omitted domain from deleting out-of-band custom-domain attachments, but the diff still compared the empty desired set against custom domains carried forward in state — so an unmanaged Worker with previously-observed domains re-planned an update on every deploy, forever.

  const domainsChanged =
+   news.domain !== undefined &&
-   newDomains.length !== oldDomains.length ||
-   newDomains.some((d, i) => d !== oldDomains[i]);
+   (newDomains.length !== oldDomains.length ||
+     newDomains.some((d, i) => d !== oldDomains[i]));
  • newUrl in diff now mirrors reconcile's carry-forward: with domain omitted, persisted custom domains stay first in domains, so url stays stable across unmanaged updates.
  • Extends the Cloudflare Worker: omitted domain deletes out-of-band custom domains #942 live regression test: after the unmanaged update (out-of-band hostname attached, domain omitted), an identical program must plan as a noop.

fixes #942

🤖 Generated with Claude Code

The destructive path from #942 (omitted `domain` deleting out-of-band
attachments) was closed by #932's declared-intent gate, but the diff
still compared the empty desired set against custom domains carried
forward in state, so an unmanaged Worker with previously-observed
domains re-planned an update on every deploy, forever. Gate
`domainsChanged` on `domain !== undefined` and mirror reconcile's
carry-forward in the `newUrl` computation.

fixes #942

Co-Authored-By: Claude Fable 5 <[email protected]>
@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

alchemy

bun add alchemy@https://pkg.ing/alchemy/3b767ad

@alchemy.run/better-auth

bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/3b767ad

@alchemy.run/pr-package

bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/3b767ad

@sam-goodwin
sam-goodwin merged commit f414e00 into main Jul 28, 2026
9 checks passed
@sam-goodwin
sam-goodwin deleted the claude/issue-942-453906 branch July 28, 2026 21:59
sam-goodwin added a commit that referenced this pull request Jul 28, 2026
…edesign

Adopts #975's urlStable carry-forward for unmanaged domains against the
new domain-config shape, and its plan-noop regression assertion in
WorkerDomain.test.ts.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare Worker: omitted domain deletes out-of-band custom domains

1 participant