carlos / platform Public

docs: an old build's long streams are cut when a copy switches (#511 H4)

Drill 3 cut two streams on box-2 as its d1 generation stopped during the
good deploy. That is the accepted behaviour (ruling H4), the same as on a
box loss; the docs now say so for deploys too, in the Deploys section,
as new row SR-4-C94.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev ab4cd5c33823c7bbd7df812449c39beaafe99caa parent 38b1f4b
2 files changed, +3 −0
  • docs/site/stateless-replicas.md +2 −0
  • docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md +1 −0
diff --git a/docs/site/stateless-replicas.md b/docs/site/stateless-replicas.md
index 9fe9be66f..7f7ee463a 100644
--- a/docs/site/stateless-replicas.md
+++ b/docs/site/stateless-replicas.md
@@ -28,6 +28,8 @@ More than one copy needs an always-on release. Set --copies 1 and wait for remov
A deploy runs the release command once per instance, then switches its copies one box at a time. Your migrations must allow old and new code to serve together. Each copy runs every declared worker.
+When a copy switches, its old build stops once the new one serves. A response still streaming from the old build when it stops is cut, as when a box stops. Websockets on the old build disconnect and their clients reconnect to a healthy copy.
+
The release command runs only once the instance's configuration is on its box. If you set env or secrets before the instance existed, its first release waits a few seconds for them rather than running without them. If they have not arrived after about three minutes, the release is held as failed without running, and a retry runs it.
If the box running the release command disappears, its result may be unknown. The deploy stops and the previous build keeps serving. Deploying again runs the command again, so release commands must be safe to repeat. Rails migrations record completed migrations in schema_migrations.
diff --git a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
index 46183bcfe..266232099 100644
--- a/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
+++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-copy.md
@@ -165,3 +165,4 @@ copy too. Internal wire enums are not an excuse to expose unreviewed text.
| SR-4-C91 | internal/console/appcopies.go | <box> serves a copy of <host> and has no room for size <size>. choose a smaller size or move the instance first | approved (controller; Luna house rules) (drill 1 round 1, Astra A2) |
| SR-4-C92 | internal/activator/replicadeploy.go | the new copy's configuration was not written on its box in time, so it did not start. existing copies keep serving | approved (controller; Luna house rules) (drill 1 round 2) |
| SR-4-C93 | docs/site/stateless-replicas.md | An app that creates its own instance.key or report.token file must take those values from a shared source, its configuration or its environment, or run one copy. The platform gives every copy the same CARLOS_INSTANCE_KEY, but it cannot stop each copy of an app from writing a different file of its own. | approved (controller; Luna house rules) (drill 1 round 2, A3 restriction) |
+| SR-4-C94 | docs/site/stateless-replicas.md | When a copy switches, its old build stops once the new one serves. A response still streaming from the old build when it stops is cut, as when a box stops. Websockets on the old build disconnect and their clients reconnect to a healthy copy. | approved (controller; Luna house rules) (drill 3, H4) |