carlos / platform Public

copy: PS-2-C15, the fleet-size publication refusal (#892 S2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 20ec0b50046a647d3743347069f8307391fe0ccb parent cbc89a2
1 file changed, +1 −0
  • docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md +1 −0

Intent

Human

<task-notification> <task-id>a0a658ad47e6ba075</task-id> <tool-use-id>toolu_01FoxDhrvvyZPkWn83j85tAc</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/29a43d67-87d2-4557-8e9d-9b70d303a90b/tasks/a0a658ad47e6ba075.output</output-file> <status>completed</status> <summary>Agent "Implement S2 Task 2" 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 Commits: b66327f9 (Task 2), cbc89a25 (`fix: serialize placement with policy writes for fleet sizes (#892 S2 r1)`) Tests: the Step 2/4 groups, Polic and Copies runs pass, as does `-race` on the new serialization and publication tests. Five round-1 mutations were all caught and all edits restored. Cross-compiles pass and `make census-card` is clean. All three findings and the empty-fleet ruling are fixed: 1. **Race:** the place door now holds the app's name (policy) lock from its fleet-size check through the record walk, the same lock the policy door holds through publication. Lock order, written at both doors: account → app → name lock → fleetFloorMu → replicaFloorMu → regionalMu. Each interleaving has its own test. 2. **One requirement:** every destination gate takes the larger fleet size of the recorded and the published policy, from one read. Interrupted publication is tested for an increase and a decrease. 3. **Unlabelled records:** an unlabelled instance counts on every box of its fleet; the PS-2-C03 case is added to `TestFleetSizeCommittedWarns`. 4. **Empty fleet:** now refused, with `sizeUnreadMsg` at the policy door and PS-2-C14 at placement; tested. Concerns: - Replica placement reads the policy a second time, once per app and only in passes that act on its records. I raised `TestReplicaPlacementReadAccounting` from 1 to 2 for that key, with a comment. - The relabel worker and drain do not take the name lock; they only pick from roster boxes the policy door already checks. - On a host-claim console the place check still runs without the lock, as before this round. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-scale-1/.superpowers/sdd/2026-11-22-892-s2-fleet-sizes/task-2-report.md ("Fix round 1" section; the file is git-ignored, so it is not in the commit)</result> <usage><subagent_tokens>318458</subagent_tokens><tool_uses>29</tool_uses><duration_ms>1546176</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>b0gra01sl</task-id> <tool-use-id>toolu_01FAyrKPNrEmkHZYn6GXFjdt</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/29a43d67-87d2-4557-8e9d-9b70d303a90b/tasks/b0gra01sl.output</output-file> <status>completed</status> <summary>Background command "WS=/home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-scale-1/.superpowers/sdd/2026-11-22-892-s2-fleet-sizes; $WS/astra.sh $WS/astra-task2-r2-brief.md $WS/task-2-rereview-1-astra.md &gt; $WS/astra-task2-r2.log 2&gt;&amp;1" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>ae89d2e3af27ba70f</task-id> <tool-use-id>toolu_01Gan78QbqL6QJBifJbzUDUP</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/29a43d67-87d2-4557-8e9d-9b70d303a90b/tasks/ae89d2e3af27ba70f.output</output-file> <status>completed</status> <summary>Agent "Implement S2 Task 3" 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: NEEDS_CONTEXT. I changed no code and made no commits. Commits: none. Tests: none run, because no code was written. I read region HA spec §7.5 and §25; this task adds no HA path. Blocker: the publication refusal from `replicaFloorJudge` (needed for `TestFleetSizeFloorJudge`) has no approved copy row. SR-4-C23 is about copies, and PS-2-C04 is a door refusal, not a publication refusal. Draft: "sizes 4g to 192g are in use on a fleet, so the platform cannot move below %s. set those apps and instances to xlarge or smaller first" Also needs a decision: 1. Unreadable pointer at the policy door: copiesUnread says "the copy count was left unchanged", which is wrong for a size change. Either use copiesUnread everywhere as the brief says, or keep it at the copies door and answer `sizeUnreadMsg` (503) at the policy door. I'd use `sizeUnreadMsg`. 2. Placement to another fleet: an app already at 12g could move onto a fleet whose boxes follow a channel that already points below v0.43.0, and those boxes would later roll down under it. To close this, placement would also take `replicaFloorMu` and run the barrier over the target fleet. That is beyond the brief's doors, so yes or no? The full implementation plan is in the report and ready to go once these are answered. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-scale-1/.superpowers/sdd/2026-11-22-892-s2-fleet-sizes/task-3-report.md</result> <usage><subagent_tokens>109778</subagent_tokens><tool_uses>16</tool_uses><duration_ms>189920</duration_ms></usage> </task-notification>

Attributed to this commit: 13.1 g CO₂e (1,683,949 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-scale-2-fleet-sizes, 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-11-stateless-replicas-scale-copy.md b/docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md
index f09dbc731..f9057b358 100644
--- a/docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md
+++ b/docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md
@@ -31,3 +31,4 @@ SR-4-C19, C20 and C29 (deferred to #892) are PS-2-C01, C04 and C10. PS-2-C08 als
| PS-2-C12 | docs/site/stateless-replicas.md | A box is eligible only if it has room for the instance's size. Up to xlarge, a size may use at most a quarter of a box's memory. The fleet sizes 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g and 192g may use all but 1 GiB or one eighth of the box's memory, whichever is larger. An app with no size set uses standard. | approved by delegation (Luna pass, gpt-5.6-luna, 2026-11-22; brief and result in docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S2.md); for Paul's copy review |
| PS-2-C13 | internal/console/apipolicy.go | size must be small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default | approved (controller: PS-2-C09's approved edit applied to the per-instance message); for Paul's copy review |
| PS-2-C14 | internal/console/fleets.go | <app> uses size <size>, which needs a fleet of your own whose every box has room for it. choose such a fleet, or set a size of xlarge or smaller first | approved (controller; Luna house rules, written after Astra's plan review round 1); for Paul's copy review |
+| PS-2-C15 | internal/console/replicafloor.go | sizes from 4g up are in use, so the platform cannot move below <floor>. set those apps and instances to xlarge or smaller first | approved (controller; Luna house rules, shaped on approved SR-4-C23, written for Task 3's publication refusal); for Paul's copy review |