test: guard every S2 copy row; record who replaced old approvals (#892 S2)
The scale copy guard now checks PS-2-C01 to C15 in the files the deck names, plus the instances set variant of C08. The deck's file column for C04 and C14 names internal/console/fleetsize.go. The old decks' rewritten entries carry replaced_by, replaced_on and previous_text.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
approved_stateless_scale_copy_test.go+21 −1docs/superpowers/plans/2026-10-07-instance-settings-5-copy.json+4 −1docs/superpowers/plans/2026-10-21-instance-policy-copy.json+7 −7docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md+2 −2
Intent
<task-notification> <task-id>a8df6ad79ffd246eb</task-id> <tool-use-id>toolu_01HfAf1c6Agenxr2MqmdW5QC</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/29a43d67-87d2-4557-8e9d-9b70d303a90b/tasks/a8df6ad79ffd246eb.output</output-file> <status>completed</status> <summary>Agent "Implement S2 Task 5" 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. The overlay is re-proposed and committed, and the census checks pass. Commits: - e169cfe9: `docs: fleet sizes in the CLI and docs (#892 S2)` - 5b440472: `census: re-propose stateless-scale-2-fleet-sizes for Task 5 (#892 S2)` Tests: - `go test ./internal/provision -run 'TestPlan14RootReadCensus|TestCensus'` passes. - `make census-card` now reports a clean census. - The Task 5 tests and the three cross-compiles passed earlier. Concerns: - The card's table has 10 unit claims, not 12. I used those 10 verbatim. The other 2 are the new units `memAvailable` and `ReadMemTotal`, which have no card row, so I took their claim text from the basis already written in the overlay. - The overlay gained pins for the `.` and `internal/updatewords` envelopes. The chain seal is unchanged at 8728f8fc..., so there is no new chain line. - The first `git commit` printed a `packed-refs.lock` error, but both commits exist, and `git status` is clean afterwards. Report (census note appended): /home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-scale-1/.superpowers/sdd/2026-11-22-892-s2-fleet-sizes/task-5-report.md</result> <usage><subagent_tokens>96276</subagent_tokens><tool_uses>33</tool_uses><duration_ms>433266</duration_ms></usage> </task-notification>
<task-notification> <task-id>bhsgjohlv</task-id> <tool-use-id>toolu_013amxqCngRzKRPPaMcHpeiK</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/29a43d67-87d2-4557-8e9d-9b70d303a90b/tasks/bhsgjohlv.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-task5-brief.md $WS/task-5-review-astra.md > $WS/astra-task5.log 2>&1" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 13.0 g CO₂e (1,655,303 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/approved_stateless_scale_copy_test.go b/approved_stateless_scale_copy_test.go| index ae4f11206..b5531f082 100644 |
| --- a/approved_stateless_scale_copy_test.go |
| +++ b/approved_stateless_scale_copy_test.go |
| @@ -10,7 +10,7 @@ import ( |
| // The #892 copy deck (stateless replicas at production scale). |
| const statelessScaleCopyDeck = "docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md" |
| -var statelessScaleBuiltCopy = []string{"PS-1-C01", "PS-2-C06", "PS-2-C07", "PS-2-C08", "PS-2-C10", "PS-2-C11", "PS-2-C12"} |
| +var statelessScaleBuiltCopy = []string{"PS-1-C01", "PS-2-C01", "PS-2-C02", "PS-2-C03", "PS-2-C04", "PS-2-C05", "PS-2-C06", "PS-2-C07", "PS-2-C08", "PS-2-C09", "PS-2-C10", "PS-2-C11", "PS-2-C12", "PS-2-C13", "PS-2-C14", "PS-2-C15"} |
| func statelessScaleCopyRows(t *testing.T) []copyRow { |
| t.Helper() |
| @@ -60,3 +60,23 @@ func TestStatelessScaleCopyHasNoEmDash(t *testing.T) { |
| t.Fatal("copy deck contains an em dash") |
| } |
| } |
| + |
| +// PS-2-C08 also applies to `instances set` with its own prefix. |
| +func TestStatelessScaleC08AppliesToInstancesSet(t *testing.T) { |
| + var c08 string |
| + for _, r := range statelessScaleCopyRows(t) { |
| + if r.ID == "PS-2-C08" { |
| + c08 = r.Text |
| + } |
| + } |
| + const prefix = "apps set: " |
| + if !strings.HasPrefix(c08, prefix) { |
| + t.Fatalf("PS-2-C08 = %q, want the %q prefix", c08, prefix) |
| + } |
| + if want := "instances set: " + strings.TrimPrefix(c08, prefix); instancesSetBadSize != want { |
| + t.Fatalf("instancesSetBadSize = %q, want %q", instancesSetBadSize, want) |
| + } |
| + if appsSetBadSize != c08 { |
| + t.Fatalf("appsSetBadSize = %q, want %q", appsSetBadSize, c08) |
| + } |
| +} |
diff --git a/docs/superpowers/plans/2026-10-07-instance-settings-5-copy.json b/docs/superpowers/plans/2026-10-07-instance-settings-5-copy.json| index 328bf4962..fe3a220df 100644 |
| --- a/docs/superpowers/plans/2026-10-07-instance-settings-5-copy.json |
| +++ b/docs/superpowers/plans/2026-10-07-instance-settings-5-copy.json |
| @@ -130,7 +130,10 @@ |
| { |
| "id": "settings.cli.set-usage", |
| "file": "internal/updatewords/words_surfaces.go", |
| - "text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|4g|6g|8g|12g|16g|24g|32g|48g|96g|192g|default] (an empty value clears an update setting)" |
| + "text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|4g|6g|8g|12g|16g|24g|32g|48g|96g|192g|default] (an empty value clears an update setting)", |
| + "replaced_on": "2026-11-22", |
| + "replaced_by": "replaced by the controller as a usage synopsis (#892 S2): the ten fleet size names listed before default; not new prose", |
| + "previous_text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|default] (an empty value clears an update setting)" |
| }, |
| { |
| "id": "settings.cli.update-done", |
diff --git a/docs/superpowers/plans/2026-10-21-instance-policy-copy.json b/docs/superpowers/plans/2026-10-21-instance-policy-copy.json| index 0ac8de500..9d3d28e98 100644 |
| --- a/docs/superpowers/plans/2026-10-21-instance-policy-copy.json |
| +++ b/docs/superpowers/plans/2026-10-21-instance-policy-copy.json |
| @@ -23,8 +23,8 @@ |
| {"id": "IP1-18", "file": "internal/console/policylease.go", "text": "this console is not set up to write app policies (no writer lease). deploy a console built from current main"}, |
| {"id": "IP1-19", "file": "internal/console/policylease.go", "text": "this console stopped being the policy writer during the change, so it may not have been published. read the policy again before you retry"}, |
| {"id": "IP1-20", "file": "internal/console/apipolicy.go", "text": "nothing to set: send egress_allow, default_size or size"}, |
| - {"id": "IP1-21", "file": "internal/console/apipolicy.go", "text": "default_size must be small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or empty for the build's size"}, |
| - {"id": "IP1-22", "file": "internal/console/apipolicy.go", "text": "size must be small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default"}, |
| + {"id": "IP1-21", "file": "internal/console/apipolicy.go", "text": "default_size must be small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or empty for the build's size", "replaced_on": "2026-11-22", "replaced_by": "replaced by PS-2-C09 (#892 S2; Luna pass by delegation, gpt-5.6-luna, 2026-11-22)", "previous_text": "default_size must be small, standard, large or xlarge, or empty for the build's size"}, |
| + {"id": "IP1-22", "file": "internal/console/apipolicy.go", "text": "size must be small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default", "replaced_on": "2026-11-22", "replaced_by": "replaced by PS-2-C13 (#892 S2; controller: PS-2-C09's approved edit applied to the per-instance message)", "previous_text": "size must be small, standard, large, xlarge or default"}, |
| {"id": "IP1-23", "file": "internal/console/apipolicy.go", "text": "no instance %s in this app"}, |
| {"id": "IP1-24", "file": "internal/console/apipolicy.go", "text": "send If-Match with the policy's etag, or If-None-Match: * when there is none"}, |
| {"id": "IP1-25", "file": "internal/console/apipolicy.go", "text": "the policy changed since it was read. read it again and retry"}, |
| @@ -51,8 +51,8 @@ |
| {"id": "IP1-58", "file": "internal/console/appsettings.go", "text": "An earlier app named %s in %s had an instance policy set by an operator, so this app cannot be moved there. Ask an operator to move it."}, |
| {"id": "IP1-59", "file": "internal/console/appsettings.go", "text": "Could not check the instance policies, so nothing was moved. Try again."}, |
| {"id": "IP1-31", "file": "apps_policy.go", "text": "apps set: --egress-allow: %v"}, |
| - {"id": "IP1-32", "file": "apps_policy.go", "text": "apps set: --size is small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default, not %q"}, |
| - {"id": "IP1-33", "file": "apps_policy.go", "text": "instances set: --size is small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default, not %q"}, |
| + {"id": "IP1-32", "file": "apps_policy.go", "text": "apps set: --size is small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default, not %q", "replaced_on": "2026-11-22", "replaced_by": "replaced by PS-2-C08 (#892 S2; Luna pass by delegation, gpt-5.6-luna, 2026-11-22)", "previous_text": "apps set: --size is small, standard, large, xlarge or default, not %q"}, |
| + {"id": "IP1-33", "file": "apps_policy.go", "text": "instances set: --size is small, standard, large, xlarge, one of 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g, or default, not %q", "replaced_on": "2026-11-22", "replaced_by": "replaced by PS-2-C08 with the instances set prefix (#892 S2; Luna pass by delegation, gpt-5.6-luna, 2026-11-22)", "previous_text": "instances set: --size is small, standard, large, xlarge or default, not %q"}, |
| {"id": "IP1-34", "file": "apps_policy.go", "text": "not found: either %s is not an app in this account, you are not a system operator, or this console predates app policies (deploy a console built from current main)"}, |
| {"id": "IP1-35", "file": "apps_policy.go", "text": "the policy changed while this ran. run it again"}, |
| {"id": "IP1-36", "file": "apps_policy.go", "text": "egress allow for %s set to %s"}, |
| @@ -66,8 +66,8 @@ |
| {"id": "IP3-11", "file": "apps_policy.go", "text": "the new memory size applies at the next start. a larger size also applies at the next deploy; a smaller size waits for a cold start. CPU and IO apply now"}, |
| {"id": "IP1-44", "file": "apps_policy.go", "text": "apps show works through a console, and this shell is in direct bucket mode (CARLOS_DEPLOYMENT_BUCKET or CARLOS_DEPLOYMENT_DIR is set). log in instead: carlos auth login --console <url>"}, |
| {"id": "IP1-50", "file": "apps_policy.go", "text": "private addresses every instance of the app may reach, comma-separated, never a port. pass the whole list; \"\" clears it. system operators only"}, |
| - {"id": "IP1-51", "file": "apps_policy.go", "text": "the size the app's instances run at: small, standard, large or xlarge, or 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g on your own fleet. default uses the build's size. system operators only"}, |
| - {"id": "IP1-52", "file": "apps_policy.go", "text": "this instance's size: small, standard, large or xlarge, or 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g on your own fleet. default follows the app's size. system operators only"}, |
| + {"id": "IP1-51", "file": "apps_policy.go", "text": "the size the app's instances run at: small, standard, large or xlarge, or 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g on your own fleet. default uses the build's size. system operators only", "replaced_on": "2026-11-22", "replaced_by": "replaced by PS-2-C06 (#892 S2; Luna pass by delegation, gpt-5.6-luna, 2026-11-22)", "previous_text": "the size the app's instances run at: small, standard, large or xlarge. default uses the build's size. system operators only"}, |
| + {"id": "IP1-52", "file": "apps_policy.go", "text": "this instance's size: small, standard, large or xlarge, or 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g on your own fleet. default follows the app's size. system operators only", "replaced_on": "2026-11-22", "replaced_by": "replaced by PS-2-C07 (#892 S2; Luna pass by delegation, gpt-5.6-luna, 2026-11-22)", "previous_text": "this instance's size: small, standard, large or xlarge. default follows the app's size. system operators only"}, |
| {"id": "IP1-53", "file": "apps_policy.go", "text": "Only system operators may pass --egress-allow or --size. A change reaches\nthe app's boxes within seconds on a box following the deployment's change index, or within about 33 minutes on another box."}, |
| {"id": "IP1-54", "file": "apps_policy.go", "text": "usage: carlos apps show <app> [--account <sqid|name>] [--account-id <sqid>] [--console <origin>]"}, |
| {"id": "IP1-60", "file": "apps_policy.go", "text": "egress allow %s"}, |
| @@ -80,7 +80,7 @@ |
| {"id": "IP1-55", "file": "apps.go", "text": " show <app> the app's egress allow and sizes. system operators only\n"}, |
| {"id": "IP1-56", "file": "apps.go", "text": "usage: carlos apps <create|place|build-probe|set|show|delete|restore|ttl|keep|list> [flags] <app>"}, |
| {"id": "IP1-57", "file": "apps_swap.go", "text": "apps set: nothing to set. pass --copies, --swap, --swap-concurrency, --egress-allow, --size or --interactive", "superseded_by": "SR-2-C17", "note": "Replaced verbatim by SR-2-C17 in the stateless replicas copy deck for Plan 2 slice 1a."}, |
| - {"id": "GAP-1", "file": "internal/updatewords/words_surfaces.go", "text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|4g|6g|8g|12g|16g|24g|32g|48g|96g|192g|default] (an empty value clears an update setting)"}, |
| + {"id": "GAP-1", "file": "internal/updatewords/words_surfaces.go", "text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|4g|6g|8g|12g|16g|24g|32g|48g|96g|192g|default] (an empty value clears an update setting)", "replaced_on": "2026-11-22", "replaced_by": "replaced by the controller as a usage synopsis (#892 S2): the ten fleet size names listed before default; not new prose", "previous_text": "usage: carlos instances set <host> [--app <a>] [--updates auto|manual] [--channel <c>] [--major <n>] [--pin <build>] [--size small|standard|large|xlarge|default] (an empty value clears an update setting)"}, |
| {"id": "GAP-2", "file": "apps_swap.go", "text": "usage: carlos apps set <app> [--copies <n>] [--swap overlap|hold] [--swap-concurrency <n>] [--interactive on|off] [--account <sqid|name>] [--account-id <sqid>] [--console <origin>] [--egress-allow <ip,...>] [--size <size>]\n", "superseded_by": "SR-2-C13", "note": "Replaced verbatim by SR-2-C13 in the stateless replicas copy deck for Plan 2 slice 1a."}, |
| {"id": "GAP-3", "file": "apps_swap.go", "text": "app whose swap or instance policy to set"}, |
| {"id": "IP3-04", "file": "status_instances.go", "text": "BOX REGION HOST LAYOUT INSTANCE-SANDBOX SIZE EGRESS REASON"}, |
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 f9057b358..11e7dfcbd 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 |
| @@ -20,7 +20,7 @@ SR-4-C19, C20 and C29 (deferred to #892) are PS-2-C01, C04 and C10. PS-2-C08 als |
| | PS-2-C01 | internal/console/fleetsize.go | <size> leaves too little memory on <box>. choose a smaller size | 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-C02 | internal/console/fleetsize.go | <size> is only for apps on your own fleet. choose xlarge or smaller | 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-C03 | internal/console/fleetsize.go | warning: sizes on <box> may now add up to <committed> MiB, more than the <budget> MiB it can give. an instance there may run out of memory | approved by delegation (Luna pass, gpt-5.6-luna, 2026-11-22), then "may" added by the controller (plan ruling P8: the figure is an upper bound); for Paul's copy review | |
| -| PS-2-C04 | internal/console/replicafloor.go | this size needs a complete memory report and a platform release that supports it on every box the app can run on and in the console. update the boxes and try again | 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-C04 | internal/console/fleetsize.go | this size needs a complete memory report and a platform release that supports it on every box the app can run on and in the console. update the boxes and try again | 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-C05 | internal/activator/fleetreserve.go | not enough free memory on <box> to start the new build beside the old one. the old build is still serving | 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-C06 | apps_policy.go | the size the app's instances run at: small, standard, large or xlarge, or 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g on your own fleet. default uses the build's size. system operators only | 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-C07 | apps_policy.go | this instance's size: small, standard, large or xlarge, or 4g, 6g, 8g, 12g, 16g, 24g, 32g, 48g, 96g or 192g on your own fleet. default follows the app's size. system operators only | 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 | |
| @@ -30,5 +30,5 @@ SR-4-C19, C20 and C29 (deferred to #892) are PS-2-C01, C04 and C10. PS-2-C08 als |
| | PS-2-C11 | docs/site/one-instance-per-customer.md | An operator can give that one instance a bigger size: `small` (256 MiB), `standard` (512 MiB), `large` (1 GiB) or `xlarge` (2 GiB), and on the operator's own fleet one of `4g`, `6g`, `8g`, `12g`, `16g`, `24g`, `32g`, `48g`, `96g` or `192g`. See [carlos apps](/docs/cli#carlos-apps). | 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-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-C14 | internal/console/fleetsize.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 | |