carlos / platform Public

plans 4c: Luna copy applied; throttle docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev d02da423b80985d8a77ffa4d937fc108d436b3df parent 8384722
4 files changed, +24 −8
  • docs/site/plans.md +7 −2
  • docs/superpowers/specs/LUNA-COPY-RESULT-PLANS-4C.md +10 −0
  • internal/console/plancaps_copy.go +6 −5
  • internal/console/plangrace_view_test.go +1 −1
diff --git a/docs/site/plans.md b/docs/site/plans.md
index b52239fa3..1f2e53de2 100644
--- a/docs/site/plans.md
+++ b/docs/site/plans.md
@@ -84,6 +84,11 @@ 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.
- **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.
-The account banner and the CLI warning line say which stage is in force. Bandwidth and awake hours only warn for now.
+- **Bandwidth.** At twice the month's limit, the account's apps are served more slowly until the month ends or the plan grows: one shared allowance of 5 requests a second, with bursts up to 30, across all its instances. This does not wait for notice, because twice the limit is bandwidth's hard ceiling.
+- **Awake hours.** At twice the month's limit, once an owner has had notice for 3 days, the apps are slowed the same way. Open live connections (WebSockets) are closed, new ones are refused, and each instance is put to sleep after 15 minutes awake. It wakes on its next request.
-The console also records when an owner actually received notice: an email that was accepted for delivery, an owner viewing an account page with the banner, or an owner's CLI printing the warning. Apart from the two ceilings above (email at twice its limit, storage at twice its limit), whatever acts after grace starts only once grace has ended and an owner received notice at least 3 days earlier. So an account nobody has heard from is never cut off for anything short of a ceiling.
+The slowdown is a plan stage, not abuse protection, so it applies whatever `CARLOS_RATE_LIMIT` says. `CARLOS_PLAN_LIMITS=off` on a box turns it off with every other plan limit. Each box drops a throttle at the start of the next month even if it can't reach the console.
+
+The account banner and the CLI warning line say which stage is in force.
+
+The console also records when an owner actually received notice: an email that was accepted for delivery, an owner viewing an account page with the banner, or an owner's CLI printing the warning. Apart from the ceilings above (email, storage and bandwidth at twice their limits), whatever acts after grace starts only once grace has ended and an owner received notice at least 3 days earlier. So an account nobody has heard from is never cut off for anything short of a ceiling.
diff --git a/docs/superpowers/specs/LUNA-COPY-RESULT-PLANS-4C.md b/docs/superpowers/specs/LUNA-COPY-RESULT-PLANS-4C.md
new file mode 100644
index 000000000..468cb68bf
--- /dev/null
+++ b/docs/superpowers/specs/LUNA-COPY-RESULT-PLANS-4C.md
@@ -0,0 +1,10 @@
+| key | new | why |
+|---|---|---|
+| `banner.bandwidth_throttled` | This account's apps are served more slowly until the month ends or the plan grows: it has used %s. | Names the affected apps, explains the reduced rate, and includes both recovery conditions. |
+| `cli.bandwidth_throttled` | this account's apps are served more slowly until the month ends or the plan grows: it has used %s | Same facts in lower case with no final full stop. |
+| `banner.awake_throttled` | This account's apps are served more slowly and put to sleep after 15 minutes awake until the month ends or the plan grows: %s. Open live connections (WebSockets) are closed. | Keeps the sleep rule, reduced rate, recovery conditions, and connection behavior. |
+| `cli.awake_throttled` | this account's apps are served more slowly and put to sleep after 15 minutes awake until the month ends or the plan grows: %s. open live connections are closed | Same facts in lower case with no final full stop. |
+
+## Flags
+
+None.
\ No newline at end of file
diff --git a/internal/console/plancaps_copy.go b/internal/console/plancaps_copy.go
index c31376390..745e220e6 100644
--- a/internal/console/plancaps_copy.go
+++ b/internal/console/plancaps_copy.go
@@ -49,9 +49,10 @@ var planNoticeCopy = map[string]string{
"cli.email_paused": "email is paused until midnight utc: this account sent %s",
"banner.storage_denied": "New uploads to this account's storage are refused: %s. Downloads and deletes still work.",
"cli.storage_denied": "new uploads to this account's storage are refused: %s. downloads and deletes still work",
- // Plans 4c: the monthly throttle. Luna pass pending.
- "banner.bandwidth_throttled": "This account is slowed down until the month ends: it has used %s.",
- "cli.bandwidth_throttled": "this account is slowed down until the month ends: it has used %s",
- "banner.awake_throttled": "This account's apps are slowed down and put to sleep after 15 minutes awake until the month ends: %s.",
- "cli.awake_throttled": "this account's apps are slowed down and put to sleep after 15 minutes awake until the month ends: %s",
+ // Plans 4c: the monthly throttle. Approved by delegation (Luna,
+ // docs/superpowers/specs/LUNA-COPY-RESULT-PLANS-4C.md).
+ "banner.bandwidth_throttled": "This account's apps are served more slowly until the month ends or the plan grows: it has used %s.",
+ "cli.bandwidth_throttled": "this account's apps are served more slowly until the month ends or the plan grows: it has used %s",
+ "banner.awake_throttled": "This account's apps are served more slowly and put to sleep after 15 minutes awake until the month ends or the plan grows: %s. Open live connections (WebSockets) are closed.",
+ "cli.awake_throttled": "this account's apps are served more slowly and put to sleep after 15 minutes awake until the month ends or the plan grows: %s. open live connections are closed",
}
diff --git a/internal/console/plangrace_view_test.go b/internal/console/plangrace_view_test.go
index a1ca6d53f..9f8f77cc8 100644
--- a/internal/console/plangrace_view_test.go
+++ b/internal/console/plangrace_view_test.go
@@ -130,7 +130,7 @@ func TestBannerSaysBandwidthThrottled(t *testing.T) {
t.Fatal(err)
}
c := signInPaul(t, fx)
- if _, _, body := get(t, c, fx.u("/")); !strings.Contains(body, "This account is slowed down until the month ends") {
+ if _, _, body := get(t, c, fx.u("/")); !strings.Contains(body, "This account&#39;s apps are served more slowly until the month ends") {
t.Fatalf("no bandwidth-throttled banner:\n%s", body)
}
}