Skip to content

fix: pre-release audit findings since v1.10.0 - #874

Merged
Brooooooklyn merged 18 commits into
mainfrom
fix/release-audit-findings
Nov 18, 2026
Merged

Brooooooklyn merged 18 commits into
mainfrom
fix/release-audit-findings

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fixes the problems found in a pre-release audit of v1.10.0..main. Each one was checked against the real control flow and reproduced before it was fixed. Each fix was then reviewed by a separate agent.

What changed

Area Problem Fix
D1 read replication database.readReplication was silently ignored (and false undone) on a platform that predates it (self-hosted 1.10.0, or hosted before prod deploy) Platform /capabilities now advertises d1ReadReplication. The CLI checks it before uploading anything, and only when the app sets the option
Cloudflare deps cf / @cloudflare/vite-plugin pinned to rc.0, but @cloudflare/config / build-output-utils stayed ^, so fresh installs got two copies Pin both to 1.0.0-rc.0. Add them to the AGENTS.md pin rule and the deps skill. packed-consumer.mjs now asserts a single copy
db execute --remote --file (direct D1) A failed import printed Unknown import error. Show D1's errors[] / messages[] like wrangler (sanitized)
Every --file ran as a bulk import: no rows, and the DB paused with no warning Files ≤ 100 KB (D1's max statement size) use the query path again and print rows. Larger files import, after a warning and a TTY confirm. New --yes skips the prompt; CI never prompts
Small files now on the query path could fail with CRLF line endings (SQLITE_ERROR 7500, e.g. triggers) CRLF becomes LF outside quoted values before cf d1 query, as in wrangler #15044
One 10-minute deadline covered the whole import A 2-minute timeout per D1 request, plus an upload deadline sized to the file (2 min + time at 1 Mbit/s). A failure once D1 may have started (after ingest, or an init that resumes a cached upload) says the import may still be running and shows the bookmark
(maintainer case) 25 MB --remote --file in CI failed with E2BIG on 1.10.0 End-to-end test: real CLI + operation process, fake D1 API, no TTY. No prompt, nothing size-proportional in argv/env
Email (sending-only apps) Free-plan apps holding a saved SEND_EMAIL binding were asked "Set up email?" and retried onboarding on every deploy. Errors didn't name the paid plan A saved sending-only setup still waiting for onboarding is no longer prompted or retried during deploys (void email setup owns the retry). Deploy, email status and email setup print one message that names Email Sending + Workers Paid, links the plan page, and lists the token permissions
(maintainer case) Onboarded sending-only app in CI printed "enable Email Routing" / "not fully set up" Test pins the exact CI output for that setup: the email step prints nothing
The documented token (Zone Read + Email Sending Edit) could not pass: cf read Email Routing settings (Zone Settings Read) before Email Sending Sending-only apps read and onboard Email Sending on the zone preflight already resolved, with the same bearer. Inbound apps are unchanged
Email docs 4 places still promised Free-plan sending and listed the old token permissions Updated domains.md, cli/email.md, integrations/cloudflare.md
void init The Vite+ npx bootstrap threw when vite-plus used catalog:default or a Yarn catalog Read catalog / catalogs.default and .yarnrc.yml. When nothing is found, fall back to the CLI's version (1.10.0 behavior)
The starter summary hid edits outside the new app (e.g. root pnpm-workspace.yaml) Show files outside the app and later edits under the starter line
AI Cancelling a streaming ai.provider().fetch() ended with a fake void:error event The stream now fails with the caller's abort reason. ai.stream() / ai.run({ stream: true }) are unchanged

Decisions

  • Sending-only email stays strict. It is ready only once Email Sending is onboarded. Cloudflare only lets a non-onboarded binding send from a routing domain, and Void no longer enables Email Routing for apps without email/ handlers (that protects MX). So it can't confirm that "verified destinations only" works. --require-email still fails for these apps, now with a clear Workers Paid message. Deploys without the flag still ship the saved binding.
  • The replication check uses /capabilities, not the platform version. Hosted reports version: 'hosted', which skips the version check, so raising MIN_PLATFORM_VERSION alone would not cover it.

Not fixed (checked and dropped)

  • #868 retry window looked short: refuted. Each re-read spawns a subprocess, so the real window is several seconds, and the issue asked for exactly this short backoff.
  • MySQL index key length for plugin tables: real arithmetic, but no installed plugin hits it, and each possible fix changes column sizes, which would cause schema drift for existing MySQL apps.
  • Small gap: a sending-only app that also has a DNS conflict (_dmarc/bounce record) still sees the prompt on each deploy. The checklist names the conflict the user must fix.

Release notes for the next version

  • D1 replicas are opt-in (database.readReplication). Existing databases keep replicas until set to false and redeployed. Self-hosted platforms must be upgraded before apps set this option.
  • Release order: deploy hosted prod, then publish npm. Raise MIN_PLATFORM_VERSION in the release commit as usual.
  • #863 can be closed after this ships.

Verification

  • vp check: clean (after vp run build:all and nuxi prepare to regenerate playground types).
  • The 12 changed test files pass: 1087 in packages, 197 in the platform API. The new tests fail on main.
  • Follow-up for review feedback: the 11 touched test files pass (929 tests), and vp run test --base 29bf2b7c1 passes 591/591 affected files, browser tests included.
  • Full vp test run: 791/828 files passed on the first run. All 36 failures were browser tests missing the new Playwright chromium build (1255). After installing it, 35 of the 36 passed. The last one (http-errors-playground dev history navigation) timed out under load and then passed 4 of 4 runs alone. This PR doesn't touch Pages or navigation code.

🤖 Generated with Claude Code

Brooooooklyn and others added 10 commits November 18, 2026 13:12
…ation

A platform from v1.10.0 accepts the manifest's `database` field but ignores
it and keeps D1 read replication on, so `readReplication: false` was dropped
without notice. The platform now advertises `d1ReadReplication` in
`/capabilities`, and `void deploy` asks for it before any upload, only when
the manifest carries the setting. Without it the deploy stops and tells the
user to upgrade the platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cf 1.0.0-rc.0 and @cloudflare/vite-plugin 2.0.0-rc.0 depend on exactly
1.0.0-rc.0 of both packages, but void used a caret range. A fresh install
resolved 1.0.0-rc.1 for void and nested rc.0 copies for cf and the plugin,
so void read plugin build output with a different copy than the one that
wrote it. Pin both to 1.0.0-rc.0, add them to the pin rule, and make the
packed consumer check assert one copy of each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed D1 ingest replies with status 'error' and puts the SQL error in
errors[] and progress in messages[]. The import read only 'error', so the
user saw 'Unknown import error.'. Show error, errors and messages, as
wrangler does, with terminal escape sequences removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One 10-minute signal covered the upload, ingest and every poll, so a large
file failed with a bare timeout while D1 could still be ingesting it.
Like wrangler, the import now has no overall deadline; each D1 API request
gets its own 2-minute limit. Once ingest has been requested, a failure that
D1 did not report (network error, request timeout, bad reply) says the
import may still be running and names the bookmark, so the user checks the
database before running the file again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #863 every direct D1 `db execute --remote --file` ran as a D1
import, so a read-only file printed no rows (1.10.0 and the hosted path
do) and the database stopped serving queries with no warning or prompt.

Files up to 100,000 bytes, D1's maximum statement length, now go through
the query path again; it already sends large SQL in a file, not argv.
Larger files still run as an import, after a warning that the database
cannot serve queries until it finishes, and a TTY always asks first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ding

A sending-only app (no email/ handlers) that already carries the SEND_EMAIL
binding, on an account that cannot onboard Email Sending (Workers Free), was
asked "Set up email?" on every interactive deploy, and each yes retried
`email sending enable`. CI told it to run `void email setup`, which fails the
same way.

Readiness stays strict: a sending-only app is ready only once its domain is
onboarded for Email Sending, since Void never enables Email Routing for it and
Cloudflare allows verified-destination sends only from routing domains.

- Deploy treats that saved state like a ready one: no prompt and no account
  call, the sender var is still kept current, the existing binding ships, and
  the step returns not satisfied, so --require-email still exits 1.
- Deploy, `void email status` and `void email setup` print the same Workers
  Paid message: the product, the plan link and the token permissions
  (Zone Read + Email Sending Edit). `setup` asks a specific onboarding question.
- The checklist and address map no longer promise verified-destination sends
  to sending-only apps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sending-only apps need Email Sending, which requires Workers Paid; only apps
with email/ handlers keep inbound mail and verified-recipient sends on Workers
Free. Deploys don't retry onboarding once setup is saved. The CI token needs
Zone Read and Email Sending Edit, plus Email Routing Edit with email/ handlers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`void init` bootstraps `vp install` through npx when Vite+ is neither
installed nor on PATH. A `catalog:default` spec only looked at
`catalogs.default`, a `catalog:` spec only at the top-level `catalog`, and
Yarn's `.yarnrc.yml` catalogs were never read, so init stopped with
"Could not resolve the project's Vite+ version".

Treat `catalog:` and `catalog:default` as the same catalog, read
`.yarnrc.yml` in the same walk, and fall back to the CLI's own Vite+
version (the 1.10.0 behavior) instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The starter summary printed only its one-line description, so an edit
to the workspace root's pnpm-workspace.yaml (approved builds) was never
shown. 1.10.0 logged it.

Keep hiding the starter's own files, but list files outside the new app
and later changes to files that existed before init under the starter
line, both in the summary and when setup stops early.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`ai.provider().fetch()` now forwards the caller's signal. When that
signal aborted a `text/event-stream` response, the stream wrapper caught
the read error, added a "Generation was interrupted" `void:error` event
and closed normally, so `response.text()` resolved instead of rejecting.

When the caller's signal has aborted, error the stream with its reason.
Other mid-stream failures keep the `void:error` / `void:limit` event, and
`ai.stream()` / `ai.run({ stream: true })` are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Brooooooklyn
Brooooooklyn requested a review from a team as a code owner November 18, 2026 05:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T05:27:37.597919Z 29bf2b7 PR opened
ℹ️ 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 Nov 18, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-release-audit-findings-void-cloud.voidzero-docs.workers.dev (commit 0c631b5)

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://94d996de-void-cloud.voidzero-docs.workers.dev 0c631b5 2026-11-18T06:41:08.450Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://692266f3-void-cloud.voidzero-docs.workers.dev 29bf2b7 2026-11-18T05:26:27.237Z Visit the dashboard ↗

@cpojer

cpojer commented Nov 18, 2026 •

Copy link
Copy Markdown
Member
  • For the SQL db execute with files, the specific issue I ran into is a 25 MB file that needs to be synced into the db on deploy and it used to fail with Void before and I had to switch to wrangler. You can find it in this repo: https://github.com/nkzw-tech/pocket-folio – It failed on GitHub Actions, you can probably find the previous run. Does the new solution have a flag that avoids asking on CI?
  • For E-Mail sending, I ran into this in the same repo as above. My agent set up email for sending only, but on CI Void kept printing warnings about how email wasn't set up correctly. The aim of my change was to not print confusing stuff on CI when you are using E-Mail only for sending.

Can you make sure those two things work correctly?

Additional Slop Review:

  • P2 — Small D1 SQL files with Windows line endings can fail. I verified that the base sends a CRLF trigger script through /import, while the PR sends the same bytes through /query. Cloudflare reproduced that input failing with SQLITE_ERROR 7500. Normalize structural CRLF before querying, while preserving line endings inside quoted values. Void change · Cloudflare’s fix
  • P2 — The new sending-only token instructions omit a required permission. The installed cf path reads Email Routing settings before checking Email Sending. A token scoped as documented fails that read, so --require-email can block deployment even for an onboarded Workers Paid domain. Reuse the zone already verified by preflight, or document the additional Zone Settings Read permission. The routing lookup predates this PR. Void instructions · Cloudflare permissions
  • P2 — Bulk uploads lose Void’s timeout. With a stalled presigned PUT, the base hit its configured deadline and the PR kept waiting. Give the upload its own deadline. The new unknown-outcome warning should also cover cached uploads, where init can start ingestion before its response arrives. Void import code · Wrangler import behavior

Brooooooklyn and others added 8 commits November 18, 2026 14:32
Runs `void db execute --remote --file` without a TTY through the real
operation process against a fake D1 import API. It checks that no prompt
appears and that no child process gets the SQL in argv or env. On the
1.10.0 code path it fails with the same spawnSync E2BIG error as
nkzw-tech/pocket-folio run 44115320833.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skips the remote confirmation prompt in a TTY, like `db reset`, `db
seed` and `db restore` (and wrangler's `d1 execute --yes`). CI never
prompts, so the flag is optional there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Direct D1 files up to 100 KB now go through `cf d1 query`, which sends
the SQL as is. The query API fails on CRLF inside a trigger body with
SQLITE_ERROR 7500, while the import API took the same bytes. A small
scanner turns structural CRLF into LF and keeps line endings inside
quoted values and identifiers, like wrangler's fix in
cloudflare/workers-sdk#15044.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The presigned upload PUT had no deadline, so a stalled upload hung. It
now gets the 2-minute request bound plus time to send the file at
1 Mbit/s (5 minutes 20 seconds for 25 MB), and a timeout says so.

When D1 already has a file with the same etag, init itself starts the
import. So an init that fails without an answer from D1 (timeout, lost
connection, 5xx, non-JSON), or a reply with no upload URL and no
bookmark, now says the import may still be running. An init that D1
refused (4xx), a reported import error, and upload failures stay plain
failures, since D1 did not start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drives runCloudflareEmailStep for a sending-only app in CI with an API
token (email.from on a subdomain of the zone, Email Sending onboarded,
Email Routing off, SEND_EMAIL and __VOID_EMAIL_FROM committed). The step
prints nothing, never touches Email Routing, and the post-deploy map is
one neutral outbound line. On v1.10.0 the same input read Email Routing
and warned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed zone

The cf `email.sending.settings` / `email.sending.enable` operations first
locate the zone with `email-routing settings get`, which needs Zone
Settings Read. A token scoped as documented for sending-only apps (Zone
Read + Email Sending Edit) fails that read, so preflight marked sending
unknown: CI printed the checklist and the "not fully set up" warning, and
--require-email refused an onboarded Workers Paid domain.

Sending-only apps already resolve the zone with the session bearer
(GET /zones?name=). Preflight now reads
GET /zones/{zone}/email/sending/subdomains with the same bearer, and
`void email setup` onboards with POST to the same path, so the
documented token is enough. OAuth sessions use the same bearer. Inbound
apps keep the provider operations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also list --yes on the inline remote usage line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When sending-only onboarding cannot borrow the session bearer, nothing reached
Cloudflare, so the plan hint was misleading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Brooooooklyn

Copy link
Copy Markdown
Member Author

Thanks, I checked both against pocket-folio's CI logs (runs 44115320833 and 44223850886) and pushed fixes in 29bf2b7..0c631b5.

25 MB db execute --file in CI. This works, and you don't need a flag in CI. Files over 100 KB go through D1's import API: the SQL goes to a temp file and the upload streams over fetch, so nothing size-proportional ends up in argv or env. Without a TTY there is no prompt. a60a000 adds an end-to-end test of your exact case: real CLI and operation process, a fake D1 API, a 25 MB file, CI=true, no TTY. On the 1.10.0 code path the same test fails with your spawnSync … E2BIG. I also added --yes (d9fbe92, same as db reset/seed/restore and wrangler's --yes) to skip the prompt in a terminal. So void db execute --remote --file .void/catalog.sql can replace the wrangler call in catalog:sync.

Sending-only email in CI. With your setup (no email/ handlers, mail.pkmn.nakazawa.tech under nakazawa.tech, Email Sending onboarded, SEND_EMAIL saved, routing off, API token), the email step now prints nothing. The only email line in the deploy is the closing outbound sendEmail() from …. ef8cb2c pins that exact output in a test.

The pasted review notes

  • CRLF on the query path: fixed in cef189b. Installed cf posts --body unchanged, so Void now turns CRLF into LF outside quoted strings/identifiers before cf d1 query, as in workers-sdk#15044.
  • Token permission: confirmed. cf's sending command first reads Email Routing settings, which needs Zone Settings Read. So a token with only Zone Read + Email Sending Edit got the "not fully set up" warning, and --require-email blocked even on an onboarded domain. a547b44 makes sending-only apps read and onboard Email Sending on the zone Void already resolved, with the same token. The documented permissions are now enough, and void cloudflare login still works.
  • Upload timeout / cached uploads: fixed in f5a258a. The upload PUT now has a deadline sized to the file (2 min plus the time at 1 Mbit/s, about 5 min for 25 MB). If init fails without a reply, or asks for no upload, Void says the import may still be running, since D1 may already be ingesting a cached upload. A 4xx refusal (even a non-JSON one from a proxy, 54433bd) stays a plain failure.

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you for doing this pass.

@Brooooooklyn
Brooooooklyn merged commit 7c2af8e into main Nov 18, 2026
20 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/release-audit-findings branch November 18, 2026 10:05
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.

2 participants