Skip to content

fix(platform): make fresh self-hosted installs complete - #353

Merged
Brooooooklyn merged 4 commits into
mainfrom
fix/platform-fresh-install
Oct 1, 2026
Merged

Brooooooklyn merged 4 commits into
mainfrom
fix/platform-fresh-install

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Summary

A live self-hosted install into a new Cloudflare account (Workers for Platforms, adopted zone, PlanetScale Postgres) failed at four points. All four are on main.

paste provider URL ──► claim DB ──► create resources ──► deploy Workers ──► enable Workers ──► installed
                   (C) pg ENOENT  (A) Hyperdrive 400   (B) proxy blocks    (D) cutover check
                                                           asset upload        fails
Symptom Cause Fix
A Invalid Hyperdrive config: mtls: (ca_certificate_id: cannot be blank when 'sslmode' is 'verify-full') The URL's sslmode was forwarded to Hyperdrive. Hyperdrive's verify modes need an uploaded CA id, which a URL cannot carry. The DB was already claimed, so resume could not recover. A Void-created Hyperdrive uses require (TLS, public CA validation; the same as wrangler hyperdrive create --connection-string). Void's own connection still verifies with verify-full. The URL is checked before the claim. A private sslrootcert path is rejected before the claim, with guidance to use a separately managed Hyperdrive.
B attempted unexpected mutation POST .../assets-upload-session while conditionally creating new Worker The guarded-create proxy allowed only reads before the If-None-Match: * create, but the uploader starts the asset session and uploads assets before the script PUT. Allow exactly this Worker's session POST and the account asset upload endpoints (after that session) before the create. Everything else stays blocked.
C ENOENT: no such file or directory, open 'system' node-postgres reads sslrootcert as a path; libpq's system means "system trust store". platformDatabaseClientUrl maps sslrootcert=system to verify-full with Node's default CAs.
D Worker cutover generation 2 is missing a complete immutable-version checkpoint Version reuse (9caa321) returned before writing the staged checkpoint. The tail Worker is identical in the staging and enabled sets, so every fresh install had 4 of 5 checkpoints. The enabling pass always uploads a new version. The pre-traffic check is unchanged and still needs all Workers.

The live install finished after these fixes (resume from the failed state, no manual Cloudflare edits).

Decisions

  • verify-ca/verify-full → Hyperdrive require instead of rejecting those URLs: rejecting would make every PlanetScale/Neon URL fail as pasted. Operators who need CA pinning can adopt a separately managed Hyperdrive; Void never changes its TLS settings.

Not in this PR (already on main)

  • A repeated sslmode (?sslmode=require&sslmode=disable) is read first-wins by the Hyperdrive parser and last-wins by node-postgres.
  • The routing gate opens after the pre-traffic version check without an atomic compare against the checked versions.
  • platform/packages/api has its own copy of the Hyperdrive URL parser with defect A (project database connect). Mapping there can reset a hand-configured CA mode on update, so it needs a product decision.

Test plan

  • New regression tests fail before and pass after: Hyperdrive TLS mapping and pre-claim checks, resume after a rejected URL, sslrootcert=system, the real uploader request sequence through the proxy, and a real installPlatform run for a fresh install, a resume after a blocked first create, and a retry after a failed enabling pass
  • vp test run platform unit tests: 42 files, 660 tests pass
  • vp run --filter ./packages/void typecheck
  • Live install into a fresh Cloudflare account completed

🤖 Generated with Claude Code

A live install into a new Cloudflare account failed at four points:

- Hyperdrive rejected verify-ca/verify-full URLs because those modes
  need an uploaded CA id that a connection URL cannot carry. Void-created
  Hyperdrives now use require (TLS with public CA validation) while
  Void's own connection keeps full verification. The URL is checked
  before the database claim, and a private sslrootcert is rejected there
  with guidance to use a separately managed Hyperdrive.
- The conditional Worker create proxy blocked the asset upload session
  and uploads that precede the guarded create for Workers with assets.
- node-postgres read sslrootcert=system as a file path.
- The enabling pass reused the unchanged tail Worker version without a
  staged checkpoint, so every fresh install failed the pre-traffic
  cutover check. The enabling pass now always uploads a new version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T04:48:06.735521Z 46cbef5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-platform-fresh-install-void-cloud.voidzero-docs.workers.dev (commit e118f9a)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://185b7cfc-void-cloud.voidzero-docs.workers.dev e118f9a 2026-10-01T04:52:16.353Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://df104cd2-void-cloud.voidzero-docs.workers.dev 46cbef5 2026-10-01T04:45:39.888Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://693022f8-void-cloud.voidzero-docs.workers.dev 85fb780 2026-10-01T04:06:40.270Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://515a0d9e-void-cloud.voidzero-docs.workers.dev ea8ffa8 2026-10-01T04:03:45.555Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://91227bfe-void-cloud.voidzero-docs.workers.dev 868cb84 2026-10-01T03:28:59.663Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d2ed28e1-void-cloud.voidzero-docs.workers.dev 1ce3797 2026-09-30T18:05:39.113Z Visit the dashboard ↗

Brooooooklyn and others added 2 commits October 1, 2026 12:44
Uninstall retains the platform Workers but still deleted the Queues they
bind, which Cloudflare refuses, so every uninstall of a deployed
installation failed after platform traffic was already disabled.
Uninstall now keeps the Queues while one of the installation's Workers
exists, and a rerun finishes an uninstall that stopped this way.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cloudflare refuses to delete a Worker that consumes a Queue, a Queue or
dispatch namespace that a Worker still binds. List the retained
resources in an order that succeeds.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Brooooooklyn
Brooooooklyn force-pushed the fix/platform-fresh-install branch from 85fb780 to 46cbef5 Compare October 1, 2026 04:44
@Brooooooklyn
Brooooooklyn merged commit 1fae6b6 into main Oct 1, 2026
17 of 18 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/platform-fresh-install branch October 1, 2026 04:57
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.

1 participant