fix(wrangler): v2 deleted_classes migration — remove SchedulerDO from landing-page worker#772
Merged
Merged
Conversation
The `landing-page` Cloudflare worker has migration v1 applied out-of-band (registered the `SchedulerDO` class during PR #743 experimentation on 2026-05-12). Main's bundle doesn't reference that class, but CF blocks any deploy or rollback that doesn't account for v1 — error code from the dashboard rollback attempt: "the version depends on Durable Object migration '', but the current deployment is using migration 'v1'" To restore production to a clean no-DO state, ship a forward migration that deletes the class. v1 has to stay declared so wrangler can see the full history; v2 does the actual deletion. Once this merges and CI's `wrangler deploy` runs, the worker applies v2, removes the SchedulerDO namespace + any orphan DO state, and aibtc.com runs main's code with no DO baggage. Keep both migrations declared after this lands — removing v1 would break the next deploy with a similar history mismatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
What
Adds a
v2Durable Object migration towrangler.jsonc(all three blocks: top-level,env.production,env.preview) that deletes theSchedulerDOclass:Why
During PR #743 experimentation on 2026-05-12, the non-production branch deploy command was temporarily flipped from
npx wrangler versions uploadtonpx wrangler deploy --env preview. Cloudflare Workers Builds overrode the--env previewworker name fromlanding-page-previewback tolanding-page(production), which meant the v1 SchedulerDO migration was applied to the production worker, not the intended preview worker.Production
aibtc.comis currently serving the experimental branch's bundle and has thelanding-page_SchedulerDOnamespace registered.Attempted dashboard rollback to a pre-experiment version failed with:
This is CF's safety net — rolling back to a version that doesn't know about an applied migration would orphan the DO data.
The fix is a forward migration (v2) that deletes the class, restoring the worker to a clean no-DO state. Once this merges, CI's
wrangler deployapplies v2, the SchedulerDO namespace is removed, andaibtc.comruns main's code with no DO baggage.Test plan
npm run buildpasseswrangler deployruns cleanlyaibtc.com/returns 200 from main's code (45e70f9+ this commit)aibtc.com/leaderboardshows main's pre-PR-feat(leaderboard): /leaderboard page ranked by MCP-submitted trade count + USD volume #743 leaderboard (browser-side Tenero, no SSR volume)landing-page→ Durable Objects:landing-page_SchedulerDOnamespace is gonelogs.aibtc.compost-deployNotes
SchedulerDOclass definition + binding never landed on main, so no source-tree cleanup needed here.🤖 Generated with Claude Code