Repository navigation
feat(email): permanent short alias on the shared mail domain - #553
Conversation
…mail domain A project owner can run `void email alias <name>` to give the project a second name on the platform's shared mail domain. The alias is set once and freed only when the project is deleted. The slug keeps sending and receiving, so a receiving project with an alias uses two Cloudflare routing rules. - projects.email_alias (migration 0062) with a trigger that keeps every slug and alias distinct, also for older runtimes after a rollback - PUT /projects/:id/email/alias: owner only, slug name rules, plan check for short names, and a Cloudflare check for conflicts and room before saving - ingress, admission, proxy router and gateway accept either name; replies may use either name; deploys only wait for the slug rule - reconcile restores alias rows an older runtime removed or half removed - docs for the CLI, sending, receiving, administration and rollback Fixes #511 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a4673c293
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://feat-email-project-alias-void-cloud.voidzero-docs.workers.dev (commit b44a000)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 131fbc11a2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A retry after a lost response used to get 409 although the alias was saved. The same name now returns the saved state; a different name still gets 409. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Fixes #511
What this adds
A project owner can give the project one short, permanent name on the platform's shared mail domain:
Both names send and receive. Handlers route the same way either way:
acme+support@…andacme-store+support@…both reachemail/support.ts.Answers to the three questions
1. Alias field, or another way?
A field:
projects.email_alias(nullable, migration 0062).void_project_mailbox_name_guard, SQLSTATE 23505) keeps slugs and aliases apart in both directions, including on older runtimes after a rollback.preview-. Names of five characters or fewer need the same plan permission as short slugs.PUT /projects/:id/email/alias).2. Permanent, or changeable?
Permanent. Set once, never changed or removed, and freed only when the project is deleted.
acme+ticket-42@…) keep working.3. Does the old slug keep working?
Yes, for sending and receiving. An alias project uses two Cloudflare literal rules:
fromstays<slug>+noreply@…. Apps that want the alias as sender setfrom.Fromwith either name. Replies and forwards can use either name, whatever address the mail came in on.void email aliasbut never blocks a deploy.Rollback
compatibility.jsonneeds no change: no release contains 0061, and the existing 1.1.11–1.2.1 entries now cover 0062 (covered by a test).platform/meta/operations.md: on an older runtime, creating a project whose slug equals an existing alias returns 500 (the trigger refuses it), notslug already taken.Rule limit
Each receiving alias project uses one more rule out of Cloudflare's default 200 per domain. The admin docs say so.
Tests
handleEmailprefix strip.Local: typecheck, lint, fmt,
vp run test(affected) pass. Browser tests can't run on this machine (TLS proxy blocks the Playwright download).🤖 Generated with Claude Code