Skip to content

api: production forwards NEXT Cloud to cmux-platform-production - #32347

Closed
teamleaderleo wants to merge 1 commit into
feat-cmux-nextfrom
cloud-demo/api-prod-platform-forward
Closed

teamleaderleo wants to merge 1 commit into
feat-cmux-nextfrom
cloud-demo/api-prod-platform-forward

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

HOLD: lands once cmux-platform-production serves Cloud: manaflow-ai/cmux-platform#542 merged and deployed, and both JWT_PRIVATE_JWK and CLOUD_LINK_SIGNING_KEYS set on cmux-platform-production. Until then a forwarded request would get a 503 owner.unreachable.

Leo, 2026-11-02: "why should it still point at old stuff if we are already doing this in platform" and "cmux-platform is blue water."

What changes

backend/apps/api/wrangler.jsonc, the production block only:

CloudDO stays this Worker's class. cmux-platform-production binds it, along with UserDO, TeamDO and DomainDO, by script_name: "cmux-api" (cmux-platform#542), so forwarded requests meet the same objects and data and no class moves. This is the same shape staging has in #29488, not development's (#30401), where the platform owns CloudDO.

test/platform-cloud-development.test.ts pins production's var and binding, and checks that CloudDO stays local.

How it reaches production

Through feat-cmux-next's hold-gated promote (CMUX_NEXT_PRODUCTION_HOLD, promote-gates), never on merge. It adds no DO tag and no guarded var. Rollback: drop the var. With the binding absent, the forwarder serves locally.

Still needed before NEXT nightly can use this

  • CLOUD_LINK_SIGNING_KEYS on cmux-api production itself (GET https://cloud-api.cmux.dev/v1/cloud/keyset answers 503 today), with the same value on cmux-platform-production.
  • JWT_PRIVATE_JWK on cmux-platform-production, the same value as cmux-api's.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Forwards cmux-api's production NEXT Cloud traffic to cmux-platform-production through the platform forwarder, matching the staging setup. CloudDO stays cmux-api's own class — the platform binds this Worker's DOs by script name, so no objects or data move.

  • Adds PLATFORM_SURFACES: "cloud" and the PLATFORM binding to the production block only; the test pins both. Reach production requires the hold-gated promote, never merge. Rollback is dropping the var.

Still required before promoting

  • CLOUD_LINK_SIGNING_KEYS on cmux-api production, same value on cmux-platform-production (currently 503s).
  • JWT_PRIVATE_JWK on cmux-platform-production, same value as cmux-api's.

Written for commit 301712c. Summary will update on new commits.

View guided diff Turn on auto-fix

PLATFORM_SURFACES=cloud and the PLATFORM binding on cmux-api's
production block, as development has. cmux-platform-production binds
this Worker's own CloudDO/UserDO/TeamDO/DomainDO by script_name, so no
class or data moves. Reaches production only through the promote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 301712c: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32347 -f ref=cloud-demo/api-prod-platform-forward -f platform=macos -f backend_mode=local

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 301712c

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward.

SHIP at 301712c

Visual verdict: no images; Leo tries the build

The JSONC parses, and the production binding and DO assertions match the forwarder configuration. Vitest was unavailable in the review box.

Follow-ups:

  • [P2] [follow-up] No after screenshots were supplied for visual review.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 13 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in backend/apps/api/wrangler.jsonc. Listed for a lane to resolve.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Superseded: #32467 (merged 2026-11-02T22:24:41Z) already routes production NEXT Cloud to cmux-platform-production (PLATFORM_SURFACES + PLATFORM binding in backend/apps/api/wrangler.jsonc), and production /v1/cloud/keyset answers 200. Closing instead of rebasing a duplicate.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 301712c0 Deployed Nov 2, 2026 by teamleaderleo via wait for same-key tree publisher #101479
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant