carlos / platform Public

plans: Plan 4 R17, trim v0.35.0 to the first user's needs

Paul accepted Fable 5.2's scope steer: keep Task 2, Task 3's view, F11
and Task 5's floor with a slimmer drill; defer Task 4, box targeting,
per-box logs and F1b/F4/F7. Production scale is #892.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4672025fe1a9cda52d343b3625877ec6c64893e7 parent c3d74b1
1 file changed, +21 −0
  • docs/superpowers/plans/2026-11-01-stateless-replicas-4-deploy-and-drill.md +21 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>a9f821e38ebce5680</task-id> <tool-use-id>toolu_01TUNCKMAL9btwDYo62ZNbjk</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/72128d15-58b8-452f-9f7e-8e864e8854d2/tasks/a9f821e38ebce5680.output</output-file> <status>completed</status> <summary>Agent "Implement Plan 4 Task 1" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>- **Status:** DONE_WITH_CONCERNS - **Commit:** `c3d74b1d fix: judge replica retries before writing; halt swaps on removed boxes` (local only). It is on top of `88605b6e`. - **Tests:** the 23 Task 1 tests pass (20 original plus 3 new). The targeted console, host, provision, activator, rollout and root runs pass, as do the D11 HA guards, vet, gofmt and all three cross-builds. All 5 fix mutations were caught. - **What changed, by finding:** - **2:** every affected instance is checked before anything is signed or written. A refused retry writes nothing, and the tests compare the whole bucket before and after. Retries are recorded only after the grant or the ladder accepts, and before the serial bump. Running the same request again finishes a partly written one. - **3:** the direct-bucket `promote --retry` now refuses on a channel with copies. It writes nothing and points to the console with a new pending copy row, SR-4-C40. - **4:** when the next box in the order has been removed, the coordinator saves a halt and stops. There is no repair path. - **1 (partial):** active boxes with a stale heartbeat are left out of the order and get no permit. - **Concerns:** - The order step now does one bucket read of heartbeats per deploy. - The approval-proposal path of `promote --retry` has no test of its own; it shares the same helpers as the API door. - If the instance retry door fails after its grant is written, running it again adds a duplicate grant. That is harmless. - `git commit` again warned about a stale `packed-refs.lock` that is not mine. The commit landed and the tree is clean. - **Census:** I updated the record-write census. The root-read census showed only re-pinned envelopes; that proposal is `stateless-replicas-4-task1-fix1`, and its #280 verdict is yours. - **Report:** `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-replicas-4/.superpowers/sdd/2026-11-01-stateless-replicas-4-deploy-and-drill/task-1-report.md` (fix round 1 is the appended section)</result> <usage><subagent_tokens>596758</subagent_tokens><tool_uses>55</tool_uses><duration_ms>1928434</duration_ms></usage> </task-notification>

Attributed to this commit: 18.9 g CO₂e (2,310,571 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-replicas-4, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/plans/2026-11-01-stateless-replicas-4-deploy-and-drill.md b/docs/superpowers/plans/2026-11-01-stateless-replicas-4-deploy-and-drill.md
index befe94157..0f820f4a0 100644
--- a/docs/superpowers/plans/2026-11-01-stateless-replicas-4-deploy-and-drill.md
+++ b/docs/superpowers/plans/2026-11-01-stateless-replicas-4-deploy-and-drill.md
@@ -159,6 +159,27 @@ Round 2 found the same fault families again. Under stopping rule 2, these ruling
- R11 additionally counts a box as at StatelessReplicasFloor only when its heartbeat `prev_release` is at the floor too (or prev is "none"). That closes the one automatic path back to an old binary: a failed first apply restoring `carlos.prev`.
- A manual root downgrade on a box with copies is not prevented. The Task 5 docs page says so.
+- **R17 (Paul, 2026-11-11, after Fable 5.2's scope steer; the first user confirmed one instance per app, two copies, and xlarge as enough): v0.35.0 scope.**
+ - **Kept:**
+ - Task 2 in full.
+ - Task 3's view only: `replicaViews`, the live "1 of 2" count and per-copy rows, plus one test that a run and a TTY start exactly once with two assigned boxes. Run pickup is already a single CAS (`internal/host/runs.go:224`), and attach is already single (`internal/console/apiinteractivebox.go:75`).
+ - F11.
+ - Task 5's publication judge and the copies-door barrier, with R4 and R16's `prev_release` rule, the docs page and `TestReplicaDrillAccounting`.
+ - **The drill is trimmed to the spec's four items:**
+ - the even spread;
+ - a hard-stop with zero failed reads, "1 of 2", worker heartbeats and websocket reconnect;
+ - the box returns and the spread evens again;
+ - one good deploy under load (release once, swaps in order) and one failing release.
+
+ Scale-down to 1 stays. The timing numbers (the 3 s view and the 5 s reconnect) are recorded as observations, because the spec says "within seconds". The drill reuses an existing rootfs Rails fixture if one fits.
+ - **Deferred to a later release:**
+ - Task 4 in full. R6, R11's size doors and R12 go with it; the barrier serves the copies door only.
+ - Task 3's `--box` flag, signed target grants, and per-box logs and metrics.
+ - F1b, F4 and F7.
+ - F2, unless restart cycles both copies at once; that gets checked in Task 3.
+ - The docs say to deploy apps one at a time.
+ - Production scale (separate worker instances, copy counts well above 2, per-process sizes) is #892.
+
**Round limit.** This is the third and final plan round. If Astra's round 3 still finds a P1, the next step is to cut scope or ask Paul, not a fourth round.
- **Test patterns.** Each task's red run names only its new tests, because `TestReplica(Release.*|Deploy.*|OnlyOne.*)$` already matches about 20 passing Plan 1 tests.