Skip to content

Add a closed preview migration executor Worker - #339

Merged
aRustyDev merged 6 commits into
mainfrom
codex/preview-executor-worker
Nov 19, 2026
Merged

aRustyDev merged 6 commits into
mainfrom
codex/preview-executor-worker

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

Add a closed-by-default migration Worker bound to one configured PR, commit, database and Hyperdrive user. It bounds and validates the request artifact, opens an exclusive connection and calls the transaction-scoped preview identity gate. It rejects stale ledgers and returns generic failures without logging SQL or credentials.

The template disables workers.dev and Preview URLs, contains no route and defaults to disabled. It is not an authentication or artifact-provenance boundary. Do not expose it until a trusted caller verifies the current PR and source commit, live Hyperdrive origin and database grants, and Cloudflare Access protects the route. Assess a preview login's ability to change its own role or password before accepting untrusted SQL. Live Hyperdrive remains untested.

Local validation: generated configuration and binding tests, wasm clippy, layout/dependency and CI planner checks, and the pinned Wrangler/worker-build runtime test. The runtime test covers disabled mode, a mismatched binding, malformed and empty artifacts, and an unavailable test database. Disabling the binding check made its mismatch control fail (expected 503, received 400). The runtime test is wired into the required PostgreSQL job, and the planner selects that job for executor changes.

@aRustyDev
aRustyDev temporarily deployed to preview-control-plane November 19, 2026 06:52 — with GitHub Actions Inactive
@aRustyDev
aRustyDev temporarily deployed to preview-control-plane November 19, 2026 07:32 — with GitHub Actions Inactive
@aRustyDev
aRustyDev marked this pull request as ready for review November 19, 2026 07:39
@aRustyDev
aRustyDev merged commit 02ad078 into main Nov 19, 2026
48 checks passed
@aRustyDev
aRustyDev deleted the codex/preview-executor-worker branch November 19, 2026 19:24

This branch was previously deployed

1 inactive deployment
preview-control-plane — f9a54163 Deployed Nov 19, 2026 by aRustyDev via reconcile #251
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