carlos / platform Public

console: apply approved throttle and SES events copy

Byte for byte from the approved copy review: check.code_throttled
(and its approved-copy JSON) and the README SES events section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev ad9ca53721aa4a21f0d62410f925aa9cbdf055bd parent 4a8b9b8
3 files changed, +12 −12
  • README.md +9 −9
  • docs/superpowers/specs/2026-10-21-console-email-signin-copy-approved.json +2 −2
  • internal/console/signincopy.go +1 −1
diff --git a/README.md b/README.md
index 989fd3611..4b45833b9 100644
--- a/README.md
+++ b/README.md
@@ -613,18 +613,18 @@ Roll it in this order:
SES reports sends, bounces and complaints to the console through an SNS subscription to `POST /api/ses/events`. Anyone can post to that path, and a post naming a signing certificate the console has not seen makes it fetch one. Enough of those can use up the fetches a real notification needs after a restart or a certificate change. This release lets the path carry a secret, so only the SNS subscription can reach the code that reads the body or fetches anything.
-- `CARLOS_SES_EVENTS_TOKEN` is optional. unset, nothing changes: SNS keeps posting to `/api/ses/events`.
-- set, the console takes notifications only at `/api/ses/events/<token>`. the old path, and any other token, get the same 404 as a path that does not exist, before the console reads the body.
-- the token is a secret. keep it where the console's other secrets live, never in a repo, a ticket or a log. the console never logs it.
-- a notification whose signing certificate the console cannot fetch right now gets a 503, which SNS retries. before this release it got a 403, and SNS gives up on a 403.
+- `CARLOS_SES_EVENTS_TOKEN` is optional. Unset, nothing changes: SNS keeps posting to `/api/ses/events`.
+- Set, the console takes notifications only at `/api/ses/events/<token>`. The old path, and any other token, get the same 404 as a path that does not exist, before the console reads the body.
+- The token is a secret. Keep it where the console's other secrets live, never in a repo, a ticket or a log. The console never logs it.
+- A notification whose signing certificate the console cannot fetch right now gets a 503, which SNS retries. Before this release it got a 403, and SNS gives up on a 403.
Switch over in a window, one console at a time:
-1. roll the console to this release. nothing changes yet.
-2. make a token: `openssl rand -hex 32`.
-3. set `CARLOS_SES_EVENTS_TOKEN` to it in the console's environment and restart the console. from now on it answers only the new path, so do steps 4 and 5 straight away. a notification sent in between gets a 404, and SNS does not retry a 404.
-4. subscribe the SES events topic (`CARLOS_MAIL_SNS_TOPIC_ARN`) to `https://<console origin>/api/ses/events/<token>` over HTTPS. the console confirms the subscription itself. check that `aws sns list-subscriptions-by-topic --topic-arn <arn>` shows the new endpoint with a subscription ARN, not `PendingConfirmation`.
-5. delete the old subscription to `/api/ses/events` with `aws sns unsubscribe --subscription-arn <old arn>`.
+1. Roll the console to this release. Nothing changes yet.
+2. Make a token: `openssl rand -hex 32`.
+3. Set `CARLOS_SES_EVENTS_TOKEN` to it in the console's environment and restart the console. From now on it answers only the new path, so do steps 4 and 5 straight away. A notification sent in between gets a 404, and SNS does not retry a 404.
+4. Subscribe the SES events topic (`CARLOS_MAIL_SNS_TOPIC_ARN`) to `https://<console origin>/api/ses/events/<token>` over HTTPS. The console confirms the subscription itself. Check that `aws sns list-subscriptions-by-topic --topic-arn <arn>` shows the new endpoint with a subscription ARN, not `PendingConfirmation`.
+5. Delete the old subscription to `/api/ses/events` with `aws sns unsubscribe --subscription-arn <old arn>`.
The subscription is not in this repo's `infra/`. Make the change wherever the deployment's SES events topic and its subscription are managed. If that is Terraform, change the endpoint there instead of by hand, or the next apply puts the old one back.
diff --git a/docs/superpowers/specs/2026-10-21-console-email-signin-copy-approved.json b/docs/superpowers/specs/2026-10-21-console-email-signin-copy-approved.json
index dee476dca..7cae27428 100644
--- a/docs/superpowers/specs/2026-10-21-console-email-signin-copy-approved.json
+++ b/docs/superpowers/specs/2026-10-21-console-email-signin-copy-approved.json
@@ -130,9 +130,9 @@
},
{
"id": "check.code_throttled",
- "text": "Too many wrong codes for this address. Use the link in the email, or try again later.",
+ "text": "Too many wrong codes. Use the link in the email, or try again later.",
"original": "Too many wrong codes for this address. Use the link in the email, or try again later.",
- "edited": false,
+ "edited": true,
"rerolled": false,
"rerolls": [],
"done": false
diff --git a/internal/console/signincopy.go b/internal/console/signincopy.go
index 36a4634a4..50a265f70 100644
--- a/internal/console/signincopy.go
+++ b/internal/console/signincopy.go
@@ -21,7 +21,7 @@ var signinCopy = map[string]string{
"check.code_button": "Sign in",
"check.code_wrong": "That code doesn't match. Check the email and try again.",
"check.code_used_up": "That code has expired or had too many wrong tries. Ask for a new link below.",
- "check.code_throttled": "Too many wrong codes for this address. Use the link in the email, or try again later.",
+ "check.code_throttled": "Too many wrong codes. Use the link in the email, or try again later.",
"check.nothing": "Nothing arriving? Check your spam folder, or ask for a new link. You can ask once a minute.",
"check.again_button": "Send a new link",
"link.title": "Sign in as {address}?",