Conversation
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
🔎 Preview deployed: https://epicflare-pr-27.kentcdodds.workers.dev Worker: Mocks:
|
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
Bugbot Autofix prepared fixes for 2 of the 2 bugs found in the latest run.
|
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
| args.push(secretsFilePath) | ||
| if (options.env !== undefined) { | ||
| args.push('--env', options.env) | ||
| } |
There was a problem hiding this comment.
Empty --env string passed to wrangler breaks previews
High Severity
The runWranglerSecretBulk guard at line 224 checks options.env !== undefined, which is true when options.env is "". This causes --env "" to be forwarded to wrangler, which may fail because an empty string is not a valid environment name. The label logic at line 258 (options.env && options.env.length > 0) correctly treats empty string as "default," revealing the author's intent — but the wrangler argument guard doesn't match. Both preview workflow calls (--env "" on lines 155 and 199) would be affected, potentially breaking all preview deploys.
Additional Locations (1)
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>


Migrate the Resend mock to a Cloudflare Worker with D1, add a mock dashboard, and integrate mock server deployments into PR previews.
This improves mock server infrastructure, provides better visibility into mock state, and enables PR deploys to use dedicated, secure mock services.
Note
Medium Risk
Moderate risk due to substantial CI workflow restructuring (new validate gating and new preview deploy/cleanup paths) and a new D1-backed mock Worker that changes how local dev and tests interact with mocked external services.
Overview
Mock infrastructure is now Worker-based and preview-deployable. The Resend mock is migrated from the old Bun
createMockApiServerapproach to a dedicated Cloudflare Worker (mock-servers/resend) that persists messages in D1, enforces an optionalMOCK_API_TOKEN, and exposes a small/__mocksdashboard + metadata/message APIs; the legacytools/mock-*.tsmodules and the priorserver/email/resend.test.tsare removed and replaced with new mock-worker tests.CI/CD is reorganized around validation, production deploy gating, and preview stacks. A new
✅ Validateworkflow runs lint/typecheck/tests/e2e, production deploy (deploy.yml) is triggered only on successful validation and guarded to deploy only the validated SHA atmainHEAD, and a newpreview.ymldeploys/cleans up per-PR (or manual) preview Workers plus per-mock Workers, wiring the app preview to those mock URLs via generated secrets. Secret syncing is consolidated via a newtools/ci/sync-worker-secrets.tswrapper aroundwrangler secret bulk, and local dev (cli.ts) now starts the Resend mock viawrangler dev(dev:mock-resend) and waits for readiness.Docs and setup tooling are updated accordingly: adds
.env.examplefor preview/local defaults, expandsdocs/post-download.tsto update preview workflow + mock worker configs, and updates TypeScript worker config to includemock-servers/**.Written by Cursor Bugbot for commit 0704265. This will update automatically on new commits. Configure here.