carlos / platform Public

free storage: apply copy review 2 (instance refusal, resume help, docs)

Summary

Paul's second copy review (fcgjjoxcauzpiycl3g752zxlca, six strings, approved without edits) applied verbatim: the per-instance refusal joins freestorage_copy.go and the placeholder map is gone; carlos email --help's resume line documents the operator override; docs/site/plans.md documents email_per_hour, storage_self_serve with storage_scan_required, kept_storage, and the operator resume override. Census overlay refreshed.
claude agent, operated by paul@keymail.dev b7630b9e209d010c98927fa270e37c154f1cc4b3 parent a52e3c1
7 files changed, +18 −15
  • docs/site/plans.md +7 −1
  • internal/console/apistore_provision.go +1 −1
  • internal/console/freestorage_copy.go +5 −3
  • internal/console/freestorage_copy_pending.go +0 −7
  • internal/console/storeselfserve_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-free-storage-250.tsv +1 −1
  • mail_cli.go +3 −1

CI cancelled — superseded by a newer push — run details

diff --git a/docs/site/plans.md b/docs/site/plans.md
index 26df09a02..a6c3709c3 100644
--- a/docs/site/plans.md
+++ b/docs/site/plans.md
@@ -36,6 +36,12 @@ Every account without a plan of its own is on `default_plan`. Packs may only rai
Set `pdf_renders_month` in a plan's limits to give your account a monthly PDF allowance shared by its apps. A value of 0 means no monthly limit. The PDF service's fair-use limits still apply.
+Set `email_per_hour` to cap how many emails an account can send in one UTC hour. 0 means no hourly limit. There's no grace: once the hour's sends reach the limit, every sender of every app is held back until the next UTC hour.
+
+With `storage_self_serve`, members can set up their app's object storage with `carlos store create`, without an operator's approval. Sponsored accounts still need approval. Add `storage_scan_required` to scan that plan's stores for viruses and block infected objects from the moment each store is made. The deployment needs scanning switched on (`carlos system antivirus enable`). A plan that requires scanning can't have per-environment or per-instance stores, which aren't scanned, or stores marked client-encrypted, which a scanner can't read.
+
+When you lower a plan's storage, `kept_storage` lets accounts an operator already approved keep the old amount. For example, `"kept_storage": {"approved_before": "2026-11-15T00:00:00Z", "storage_bytes": 1073741824}` keeps 1 GB for every account approved before that time. The console records it on each of those accounts once, when it starts with the catalog.
+
Change `version` whenever you change the file. The console notices an edit that kept the old version and treats it as a new catalog anyway, so every account's limits are written again.
## Assigning a plan
@@ -90,7 +96,7 @@ While an account is over, its owners get one reminder a day, saying when grace e
After grace, only the capped action is refused, and each refusal lifts by itself:
-- **Email.** When an account has sent twice its daily limit, every sender of every app is paused until midnight UTC. This does not wait for notice, because sending reputation is shared by every tenant. The catalog's email ceiling caps it.
+- **Email.** When an account has sent twice its daily limit, every sender of every app is paused until midnight UTC. This does not wait for notice, because sending reputation is shared by every tenant. The catalog's email ceiling caps it. An operator's `carlos email resume` lifts the hold anyway, as a deliberate override, but the app's next send puts it back while the limit is still used up. To let an account send more, raise its limit with `carlos accounts plan --sponsored`.
- **PDFs.** At twice your account's monthly PDF allowance, new requests are refused with `402` until the 1st of the UTC month or until you move to a larger plan. This does not wait for notice. Your apps share the allowance, and the PDF service's fair-use limits still apply.
- **Storage.** New uploads to the account's stores are refused once grace has ended and an owner has had notice for 3 days, or straight away at twice the limit. Downloads, listing and deletes keep working, so the account can clean up. Uploads come back once usage is under the limit or the limit is raised.
diff --git a/internal/console/apistore_provision.go b/internal/console/apistore_provision.go
index 03a058618..b6fe28fcf 100644
--- a/internal/console/apistore_provision.go
+++ b/internal/console/apistore_provision.go
@@ -139,7 +139,7 @@ func (s *Server) refuseInstanceStoresIfScanned(w http.ResponseWriter, acct *Acco
return false
}
if scan {
- jsonError(w, http.StatusConflict, freeStorageCopyPending["store.scan_required.instance"])
+ jsonError(w, http.StatusConflict, freeStorageCopy["store.scan_required.instance"])
return false
}
return true
diff --git a/internal/console/freestorage_copy.go b/internal/console/freestorage_copy.go
index 33282d760..2ebcf4dec 100644
--- a/internal/console/freestorage_copy.go
+++ b/internal/console/freestorage_copy.go
@@ -1,6 +1,7 @@
-// Code generated from the approved copy review of 2026-11-15 (#1076,
-// review nsylvafbb5botywl3ptw475hrm, approved without edits). Apply later
-// edits through copy review, not by hand.
+// Code generated from the approved copy reviews of 2026-11-15 (#1076,
+// reviews nsylvafbb5botywl3ptw475hrm and fcgjjoxcauzpiycl3g752zxlca, both
+// approved without edits). Apply later edits through copy review, not by
+// hand.
package console
@@ -15,5 +16,6 @@ var freeStorageCopy = map[string]string{
"billing.limit.email_hour": "%s emails an hour",
"billing.limit.storage_scanned": "Object storage scanned for viruses",
"mail.plan_hour.paused": "plan: %d of %d emails this hour, held back until the next UTC hour",
+ "store.scan_required.instance": "your plan's object storage is always scanned for viruses, and scanning covers only the app's own store, so its instances can't have storage of their own",
"mail.plan_hour.resumed": "hourly email hold cleared on the UTC hour roll",
}
diff --git a/internal/console/freestorage_copy_pending.go b/internal/console/freestorage_copy_pending.go
deleted file mode 100644
index 4e213eace..000000000
--- a/internal/console/freestorage_copy_pending.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package console
-
-// Copy in Paul's review (#1076, round 2). Each value is replaced by the
-// approved sentence, and moved into freestorage_copy.go, before merge.
-var freeStorageCopyPending = map[string]string{
- "store.scan_required.instance": "copy pending review (#1076): store.scan_required.instance",
-}
diff --git a/internal/console/storeselfserve_test.go b/internal/console/storeselfserve_test.go
index 1784f5589..d7a4ade71 100644
--- a/internal/console/storeselfserve_test.go
+++ b/internal/console/storeselfserve_test.go
@@ -263,7 +263,7 @@ func TestScanRequiredRefusesPerInstanceStores(t *testing.T) {
fx.srv.cfg.AppsDomain = "oncarlos.test"
scanned(fx)
status, _, out := rawReq(t, http.MethodPut, enableURL(fx, "bab", "titogo"), token, `{"private_storage":true}`)
- if status != http.StatusConflict || !strings.Contains(out, freeStorageCopyPending["store.scan_required.instance"]) {
+ if status != http.StatusConflict || !strings.Contains(out, freeStorageCopy["store.scan_required.instance"]) {
t.Fatalf("enable = %d %s, want the scan-required refusal", status, out)
}
assertNoPolicy(t, fx)
diff --git a/internal/provision/testdata/plan14-root-reads-free-storage-250.tsv b/internal/provision/testdata/plan14-root-reads-free-storage-250.tsv
index f8f4d1800..2e8d21516 100644
--- a/internal/provision/testdata/plan14-root-reads-free-storage-250.tsv
+++ b/internal/provision/testdata/plan14-root-reads-free-storage-250.tsv
@@ -1,6 +1,6 @@
# Census overlay free-storage-250, written by census-propose (#369). census-ruling-free-storage-250, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-free-storage-250.md.
# 0 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-@coverage . 88886714b9c4401924943e0de0aa9650c1911770230892e4708e78b0b5887e48
+@coverage . 65322d780e5bdd4aa76e30adf9a7c16ee9c0e97a3944f65ba12b9274f5ecaf93
@coverage internal/mailwire a893d16d652f17db332243441dfe0d69f84419141ac5213e1e6964fd71de54cc
@coverage internal/objstore 4596987e07cb1e55d9c15e7ca3599e821f12cf2b11b3a694c72055b63b867cf2
@coverage internal/plans 0179b728f765872b2cd85536365e58a9b382be1818d44f7dc096f87a166ee244
diff --git a/mail_cli.go b/mail_cli.go
index 3b86a5844..64c322e47 100644
--- a/mail_cli.go
+++ b/mail_cli.go
@@ -133,7 +133,9 @@ const emailUsage = `usage: carlos email <enable|domains|status|test|credentials|
mint a fresh delivered credential, leaving the old
one live until --finish deletes it.
pause --app <a> stop this app's sending — operator only.
- resume --app <a> resume it.
+ resume --app <a> resume it — operator only. this lifts a plan's
+ email hold too, until the app's next send while its
+ limit is still used up
--account <sqid|name> account the app belongs to (default: your only
account, or the configured/chosen one).