copy: apply delegated copy pass for the demo holding tool
README.md+1 −1cmd/console/member.go+1 −1cmd/console/member_demo_test.go+2 −2docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.md+20 −0internal/console/demo_members.go+1 −1internal/console/member_demo_test.go+1 −1
CI cancelled — superseded by a newer push — run details
Intent
<task-notification> <task-id>b9kzllrsn</task-id> <tool-use-id>toolu_01HnBwd2HFHyKudUfwfW2o3u</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/b9kzllrsn.output</output-file> <status>completed</status> <summary>Background command "Wait for holding fix and read its string list" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 33.6 g CO₂e (4,374,639 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on demo-holding-last-owner, 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/README.md b/README.md| index ad043ed04..4f034d088 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -619,7 +619,7 @@ Set these variables on the console: |
| | `CARLOS_DEMO_CREATE_GLOBAL_DAY` | Positive integer. Default `100`. | |
| | `CARLOS_DEMO_MAX_LIVE` | Positive integer. Default `20`. Failed and retiring demos keep their place until cleanup completes. | |
| -Create the holding account and its demo fleet, then revoke all of the account's CLI and service tokens through its service pages, including expired tokens. Only a member can revoke them, so do this before removing the last owner. Then run `console member -remove <address> "$CARLOS_DEMO_ACCOUNT"` on the console box for each member, leaving the owner until last. Use the console's environment with valid demo settings; you can leave `CARLOS_DEMO_APPS` unset while preparing the account. Only the configured holding account can lose its last owner, and it must own `CARLOS_DEMO_FLEET`. The command refuses to remove the last owner while any tokens remain unrevoked and lists them. It reports when no members remain. |
| +Create the holding account and its demo fleet. Revoke all of the account's CLI and service tokens through its service pages, including expired tokens. Only a member can revoke them, so do this before removing the last owner. Then run `console member -remove <address> "$CARLOS_DEMO_ACCOUNT"` on the console box for each member, leaving the owner until last. Use the console's environment with valid demo settings. You can leave `CARLOS_DEMO_APPS` unset while preparing the account. Only the configured holding account can lose its last owner. It must own `CARLOS_DEMO_FLEET`. The command refuses to remove the last owner while any tokens remain unrevoked and lists them. It reports when no members remain. |
| Put each demo box's settings in its root-owned `/etc/carlos/host.env`. Set `CARLOS_DEMO_BOX=1` and the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET` and `CARLOS_DEMO_DOMAIN` tuple as the console. Keep the box's existing `CARLOS_FLEET`, box identity, tunnel credentials and release public key consistent with that fleet. These are per-box authority settings. Preserve them through host.env rewrites, using the same per-box mechanism as `CARLOS_FLEET`; do not deliver them through shared or regional parameters. |
diff --git a/cmd/console/member.go b/cmd/console/member.go| index 967e52f95..dfb7cefaf 100644 |
| --- a/cmd/console/member.go |
| +++ b/cmd/console/member.go |
| @@ -229,7 +229,7 @@ func memberRemoveDemoHolding(st *console.Store, acct *console.Account, address s |
| } |
| cat, err := planCatalog() |
| if err != nil { |
| - log.Fatalf("CARLOS_PLAN_CATALOG: %v", err) |
| + log.Fatalf("could not load plan catalog from CARLOS_PLAN_CATALOG: %v", err) |
| } |
| if err := st.RemoveDemoHoldingMember(acct.ID, address, cfg, envOr("CARLOS_REGISTRY", "/data/registry.db"), cat, time.Now()); err != nil { |
| log.Fatal(err) |
diff --git a/cmd/console/member_demo_test.go b/cmd/console/member_demo_test.go| index 4b581f004..54abfc577 100644 |
| --- a/cmd/console/member_demo_test.go |
| +++ b/cmd/console/member_demo_test.go |
| @@ -26,8 +26,8 @@ func TestMemberDemoHoldingLastOwner(t *testing.T) { |
| {name: "different account invalid config", enabled: "bad", target: "other", want: "last owner"}, |
| {name: "not a member", fleetOwner: "shop", address: "absent@keymail.dev", want: "not a member"}, |
| {name: "members remain", fleetOwner: "shop", extraMember: true, want: "removed"}, |
| - {name: "live tokens", fleetOwner: "shop", liveTokens: true, want: "revoke them first through the account's service pages"}, |
| - {name: "live tokens with member remaining", fleetOwner: "shop", extraMember: true, liveTokens: true, want: "revoke them first through the account's service pages"}, |
| + {name: "live tokens", fleetOwner: "shop", liveTokens: true, want: "console: cannot remove the last owner while CLI or service tokens remain unrevoked. revoke them first through the account's service pages (including expired tokens):"}, |
| + {name: "live tokens with member remaining", fleetOwner: "shop", extraMember: true, liveTokens: true, want: "console: cannot remove the last owner while CLI or service tokens remain unrevoked. revoke them first through the account's service pages (including expired tokens):"}, |
| {name: "another owner can revoke", fleetOwner: "shop", extraOwner: true, liveTokens: true, want: "removed"}, |
| } { |
| t.Run(tc.name, func(t *testing.T) { |
diff --git a/docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.md b/docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.md| new file mode 100644 |
| index 000000000..344fd0502 |
| --- /dev/null |
| +++ b/docs/superpowers/specs/LUNA-COPY-RESULT-DEMO-HOLDING.md |
| @@ -0,0 +1,20 @@ |
| +| where (file:line) | current | new | why | |
| +|---|---|---|---| |
| +| README.md:622 | Create the holding account and its demo fleet, then revoke all of the account's CLI and service tokens through its service pages, including expired tokens. Only a member can revoke them, so do this before removing the last owner. Then run `console member -remove <address> "$CARLOS_DEMO_ACCOUNT"` on the console box for each member, leaving the owner until last. Use the console's environment with valid demo settings; you can leave `CARLOS_DEMO_APPS` unset while preparing the account. Only the configured holding account can lose its last owner, and it must own `CARLOS_DEMO_FLEET`. The command refuses to remove the last owner while any tokens remain unrevoked and lists them. It reports when no members remain. | Create the holding account and its demo fleet. Revoke all of the account's CLI and service tokens through its service pages, including expired tokens. Only a member can revoke them, so do this before removing the last owner. Then run `console member -remove <address> "$CARLOS_DEMO_ACCOUNT"` on the console box for each member, leaving the owner until last. Use the console's environment with valid demo settings. You can leave `CARLOS_DEMO_APPS` unset while preparing the account. Only the configured holding account can lose its last owner. It must own `CARLOS_DEMO_FLEET`. The command refuses to remove the last owner while any tokens remain unrevoked and lists them. It reports when no members remain. | Splits the long paragraph into short sentences while preserving the command, flags and environment variable names. | |
| +| cmd/console/member.go:232 | `CARLOS_PLAN_CATALOG: %v` | `could not load plan catalog from CARLOS_PLAN_CATALOG: %v` | Starts with a lower-case word as required for an operator log line and keeps the environment variable name. | |
| +| cmd/console/member.go:237 | `removed %s from %s (%s)` | unchanged | unchanged | |
| +| cmd/console/member.go:240 | `membership removed; cannot check remaining members: %v` | unchanged | unchanged | |
| +| cmd/console/member.go:245 | `%s (%s) has no members` | unchanged | unchanged | |
| +| internal/console/demo_members.go:27 | `console: the ops account cannot be a demo holding account` | unchanged | unchanged | |
| +| internal/console/demo_members.go:41 | `console: cannot check demo fleet ownership: %w` | unchanged | unchanged | |
| +| internal/console/demo_members.go:46 | `console: removal committed but registry detach failed: %w` | unchanged | unchanged | |
| +| internal/console/demo_members.go:66 | `console: account %q is not the configured demo holding account` | unchanged | unchanged | |
| +| internal/console/demo_members.go:71 | `console: cannot check demo fleet ownership: %w` | unchanged | unchanged | |
| +| internal/console/demo_members.go:74 | `console: account %q does not own demo fleet %q` | unchanged | unchanged | |
| +| internal/console/demo_members.go:79 | `console: %s is not a member of %s` | unchanged | unchanged | |
| +| internal/console/demo_members.go:102 | `console: cannot remove the last owner while CLI or service tokens remain unrevoked; revoke them first through the account's service pages (including expired tokens):` | `console: cannot remove the last owner while CLI or service tokens remain unrevoked. revoke them first through the account's service pages (including expired tokens):` | Uses separate short sentences and lower-case Go error style after the full stop. | |
| +| internal/console/demo_members.go:104 | `\n%s\taddress=%q\tname=%q\tlabel=%q\tkind=%q\tapp=%q` | unchanged | unchanged | |
| + |
| +**Flags** |
| + |
| +- None. |
diff --git a/internal/console/demo_members.go b/internal/console/demo_members.go| index 72719f04a..044292e7a 100644 |
| --- a/internal/console/demo_members.go |
| +++ b/internal/console/demo_members.go |
| @@ -99,7 +99,7 @@ func removeDemoHoldingMemberWrite(accountID int64, address string, cfg demo.Conf |
| } |
| if len(tokens) != 0 { |
| var message strings.Builder |
| - message.WriteString("console: cannot remove the last owner while CLI or service tokens remain unrevoked; revoke them first through the account's service pages (including expired tokens):") |
| + message.WriteString("console: cannot remove the last owner while CLI or service tokens remain unrevoked. revoke them first through the account's service pages (including expired tokens):") |
| for _, tok := range tokens { |
| fmt.Fprintf(&message, "\n%s\taddress=%q\tname=%q\tlabel=%q\tkind=%q\tapp=%q", tok.ID, tok.Address, tok.Name, tok.Label, tok.Kind, tok.App) |
| } |
diff --git a/internal/console/member_demo_test.go b/internal/console/member_demo_test.go| index 3ec800400..27e84e86d 100644 |
| --- a/internal/console/member_demo_test.go |
| +++ b/internal/console/member_demo_test.go |
| @@ -265,7 +265,7 @@ VALUES(?, 'another@keymail.dev', 'deploy label', ?, ?, ?, ?, ?, ?)`, id, "deploy |
| t.Fatalf("err=%v want refusal=%v", err, tc.wantRefuse) |
| } |
| if tc.wantRefuse { |
| - for _, want := range []string{"first-token-id", "second-token-id", "deploy label", "deploy name", "another@keymail.dev", "revoke them first through the account's service pages"} { |
| + for _, want := range []string{"first-token-id", "second-token-id", "deploy label", "deploy name", "another@keymail.dev", "console: cannot remove the last owner while CLI or service tokens remain unrevoked. revoke them first through the account's service pages (including expired tokens):"} { |
| if !strings.Contains(err.Error(), want) { |
| t.Errorf("refusal missing %q: %v", want, err) |
| } |