design: group roll verb rev 3.1, Astra round 3 fixes
Round 3 (final) left two P1s: tool switching is now one root-run migration per group, and the shared-config loader option is typed correctly. Also: copy review before strings are written, probe recovery leaves, stale claim and credential_process text removed. Not reviewed again (stopping rule 1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+103
−18
docs/superpowers/plans/2026-11-09-group-roll-verb.md+11 −10docs/superpowers/reviews/ASTRA-R3-group-roll-verb.md+67 −0docs/superpowers/specs/2026-11-09-group-roll-verb-design.md+25 −8
CI failed — run details
Intent
Human
<task-notification> <task-id>b3dx2vk39</task-id> <tool-use-id>toolu_017NSYTmhz8xBTEyKRoNxnX5</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/669506ff-23ec-45f1-9035-1d29593f2c37/tasks/b3dx2vk39.output</output-file> <status>completed</status> <summary>Background command "Wait on Astra round 3 by pid" completed (exit code 0)</summary> </task-notification>
diff --git a/docs/superpowers/plans/2026-11-09-group-roll-verb.md b/docs/superpowers/plans/2026-11-09-group-roll-verb.md| index 47e889cac..1b0b40ce0 100644 |
| --- a/docs/superpowers/plans/2026-11-09-group-roll-verb.md |
| +++ b/docs/superpowers/plans/2026-11-09-group-roll-verb.md |
| @@ -8,7 +8,7 @@ |
| **Tech Stack:** Go, aws-sdk-go-v2 (autoscaling, ec2, ssm, new: elasticloadbalancingv2), `internal/release` (`Store`, `GetSystemPointer`), `golang.org/x/sys/unix` for the pseudo-terminal, MinIO for integration tests. |
| -**Spec:** `docs/superpowers/specs/2026-11-09-group-roll-verb-design.md` (rev 3). Plan rev 3 applies Astra rounds 1 and 2 (`~/.cache/group-roll-go/ASTRA-R1.md`, `ASTRA-R2.md`); round 2's repeated families were cut or refused up front, not fixed again (spec rev 3 note). Read it and the script before any task; the script at the merge of `held-floor-sha-map` is the parity target. |
| +**Spec:** `docs/superpowers/specs/2026-11-09-group-roll-verb-design.md` (rev 3.1). Plan rev 3.1 applies Astra round 3's P1, P2 and P3 fixes without a fourth round (unreviewed). Rev 3 applies Astra rounds 1 and 2 (`~/.cache/group-roll-go/ASTRA-R1.md`, `ASTRA-R2.md`); round 2's repeated families were cut or refused up front, not fixed again (spec rev 3 note). Read it and the script before any task; the script at the merge of `held-floor-sha-map` is the parity target. |
| ## Global Constraints |
| @@ -17,7 +17,7 @@ |
| - Regexes verbatim from the script: `SHA`, `IID`, `TX`, `EDGES_KEY`, `BUCKET`, `HOST_NAME`, and every pattern in `validate_config`. |
| - The core never imports `github.com/aws/...`; each new core file is added to `regionHACoreFiles` in `region_ha_boundary_test.go` in the commit that creates it. |
| - Linux/Darwin-only files carry `//go:build linux || darwin` with a `_other.go` sibling returning `errUnsupportedSystem`. Before every push: `GOOS=darwin GOARCH=arm64 go build ./... && GOOS=windows GOARCH=amd64 go build ./...`. |
| -- Operator copy is the script's `TEXT` table ported verbatim into `internal/grouproll/text.go`; no new user-facing string is invented outside that table, and Task 13's copy review is the only place strings change. |
| +- Operator copy: each slice's strings are reviewed with the copy-review skill BEFORE they are written into any implementation or docs file (Task 1 Step 0 for the core table, Task 5 Step 0 for the plan/status slice, Task 13 for the rest, before Tasks 7, 9 and 10 start). The approved source is the script's `TEXT` table plus the new refusals, ported into `internal/grouproll/text.go`; no new user-facing string is invented outside that table, and Task 13's copy review is the only place strings change. |
| - Local tests: changed packages only, with `-run`; full suite once before the branch review (memory: local verification budget). Scratch under `$TMPDIR`. |
| - Commit subjects under 80 characters. One amadan task per plan task on the branch, advanced as each closes. |
| - Command registry: every task that adds a `clireg` leaf adds its rows to `parity/parity.tsv` (status `cli-only`, audience operator) and runs `make parity-doc` in the same commit, so `TestCLIProjection` and `internal/parity` stay green; the leaf's usage text is in the copy review of Task 13 before any release. |
| @@ -42,6 +42,7 @@ |
| **Interfaces:** |
| - Produces: `type Config struct{...}` with the script's keys (JSON tags identical; `state_dir` is parsed and validated but not used, spec V4) and `func LoadConfig(path string) (Config, error)`; `type Journal`, `func (j *Journal) Add(kind string, fields map[string]any) (Row, error)`, `func (j *Journal) Last(kind string, match map[string]any) (Row, bool)`; `type State`, `func OpenState(c Config, readonly bool) (*State, error)`, `func (s *State) Lock() (unlock func(), err error)`, `func (s *State) Create(header Header) (*Journal, error)`, `func (s *State) Load(tx string, readonly bool) (*Journal, error)`, `func (s *State) ActiveID() (string, error)`, `func (s *State) Finish() error`, `func ResolveStateDir(env func(string) string) (string, error)` (`$XDG_STATE_HOME/carlos/group`, else `$HOME/.local/state/carlos/group`; called once by the CLI leaf before the environment is isolated, Task 3, and passed down; no override flag); `type Refusal struct{Key string; Args map[string]string}` and `func Text(key string, args ...string) string`. |
| +- [ ] **Step 0: Copy review** of the script's `TEXT` table and the new refusal strings (root, on a box, Windows, profile identity, plugin version, state directory), through the copy-review skill; `text.go` is written only from the approved file. |
| - [ ] **Step 1: Write failing tests.** `TestConfigMatchesScriptValidation`: a table of every accept/refuse case in `scripts/region_group_roll_test.py` and `region_group_held_test.py` config tests plus the `held-floor-sha-map` keys; each refusal is `config_invalid`. `TestJournalFormat2Golden`: two fixed rows encode to the bytes in `testdata/journal-format2.golden` (header has `"format":2`, times are integer milliseconds). `TestJournalRefusesDamage`: truncated last line, duplicate key, `NaN`, a bad `previous`, a bad `hash`, `seq` gap, over 64 MiB → `record`. `TestStateRefusesUnsafe`: state dir 0755, owned by another uid, a symlinked ancestor, a group-writable ancestor → `unsafe_state`. `TestStateIgnoresScriptFiles`: a directory holding a script `active.json` and `<tx>.jsonl` is invisible to `ActiveID`, and `Load` of a `.v2.jsonl` whose header lacks `"format":2` → `record` (V4). `TestResolveStateDir`: `XDG_STATE_HOME` set → under it; unset → under `HOME`; relative or empty `HOME` → refusal. `TestJournalLargeRow`: a 74,000-byte drain response row round-trips. `TestLockRefusesSecondWriter`: a second `Lock()` in another process → `busy`. |
| - [ ] **Step 2: Run** `go test ./internal/grouproll -run 'TestConfig|TestJournal|TestState|TestLock'` — FAIL (undefined). |
| - [ ] **Step 3: Implement.** Canonical encoding in one function `encodeRow(map[string]any) []byte`: keys sorted, no spaces, integers only (refuse floats), HTML escaping off. Group directory `hex(sha256(group_arn))[:32]` under the resolved state directory, files `<tx>.v2.jsonl`, `active-v2.json`, `group.lock` (`flock(LOCK_EX|LOCK_NB)`), `provider-observation.json`, `provider-divergence.json`, plan logs `plan-<hex>.log`. File checks as `private_file` with the owner = euid (V1). Port `TEXT` verbatim. |
| @@ -78,7 +79,7 @@ |
| - [ ] **Step 1: Failing tests.** `TestMapPhaseTotal`: every state in the spec §5.2 table maps as listed; `"Warmed:Pending"` → `Unknown`. `TestIsolatedEnvironment` (runs the adapter constructor in a subprocess): with `AWS_ACCESS_KEY_ID`, `AWS_PROFILE=other`, `AWS_DEFAULT_PROFILE=other`, `AWS_ENDPOINT_URL=http://127.0.0.1:1`, `AWS_ENDPOINT_URL_AUTO_SCALING=…`, `AWS_CONTAINER_CREDENTIALS_FULL_URI=…` set, and a shared config whose profile has `endpoint_url = http://127.0.0.1:1`, the resolved credentials are the profile's static keys, every client's resolved endpoint is the AWS regional one, and `os.Environ()` afterwards holds only the allow-list plus `AWS_IGNORE_CONFIGURED_ENDPOINT_URLS=true`, `AWS_EC2_METADATA_DISABLED=true`, `AWS_PROFILE=<profile>`. `TestProfileIdentityRule` (spec §4): accepted — static keys; `sso_session` profile; assume-role with `role_session_name` over static keys; a two-link chain where both links name `role_session_name`. Refused before any call — any `credential_source`; `credential_process`; `web_identity_token_file`; assume-role without `role_session_name` at any link of the chain. `TestProfileFromAllowedFile`: a profile present only in the file named by `AWS_CONFIG_FILE` validates and loads (validation and loading get the same explicit file lists). `TestCallerJournaled`: the `sts:GetCallerIdentity` `UserId` is journaled in the `begin` row. `TestExpiredSSOIsAPIRefusal` (Review Focus 4). `TestWriteShapes` (SDK middleware capture, no network): `Park` sends `ShouldDecrementDesiredCapacity=true` for exactly that iid; `Terminate` sends `ShouldDecrementDesiredCapacity=false` and refuses (`h4`) unless a fresh describe shows the member `Standby` and `desired == minimum`; `RaiseDesired` refuses unless `desired <= n <= maximum`; no method can lower desired. `TestActivitiesKinds`: "Moving EC2 instance out of Standby", "to Standby", "into Standby", "Terminating EC2 instance" classified as the script; a description naming another iid is ignored. `TestTemplateRelease`: gzip and plain user data; zero or two `CARLOS_RELEASE=` lines → `api`. `TestTargetsDuplicatePort`: two registrations with different states → `unknown`. `TestInstanceNotFound`: an empty filtered response → `not-found`; a CLI error is never absence. |
| - [ ] **Step 2: Run** `go test ./internal/grouprollaws -run .` — FAIL. |
| -- [ ] **Step 3: Implement** `func IsolateEnvironment(profile string) error` (called by the CLI leaf before anything else: `os.Clearenv`, then the spec §4 allow-list and the three fixed values), then `awsconfig.LoadDefaultConfig` with `WithSharedConfigProfile(c.Profile)`, `WithRegion(c.Region)`, IMDS disabled, `RetryMaxAttempts=1`, 2 s connect and read timeouts; resolve the two shared-file paths once (before `IsolateEnvironment`) and pass them as `WithSharedConfigFiles` and `WithSharedCredentialsFiles` to both `awsconfig.LoadSharedConfigProfile` (for the rule, walking `SourceProfileName` to the end) and `LoadDefaultConfig`. |
| +- [ ] **Step 3: Implement** `func IsolateEnvironment(profile string) error` (called by the CLI leaf before anything else: `os.Clearenv`, then the spec §4 allow-list and the three fixed values), then `awsconfig.LoadDefaultConfig` with `WithSharedConfigProfile(c.Profile)`, `WithRegion(c.Region)`, IMDS disabled, `RetryMaxAttempts=1`, 2 s connect and read timeouts; resolve the two shared-file lists once (before `IsolateEnvironment`); pass them to `awsconfig.LoadSharedConfigProfile` as `func(o *awsconfig.LoadSharedConfigOptions) { o.ConfigFiles = cfg; o.CredentialsFiles = creds }` (for the rule, walking `SourceProfileName` to the end), and to `LoadDefaultConfig` as `awsconfig.WithSharedConfigFiles(cfg)` and `awsconfig.WithSharedCredentialsFiles(creds)`: the same two lists for both. |
| - [ ] **Step 4: Run** — PASS. |
| - [ ] **Step 5: Commit** `grouprollaws: Auto Scaling, ELB and EC2 calls behind the Group interface`. |
| @@ -109,13 +110,13 @@ |
| - Consumes: Tasks 1-4. |
| - Produces: `type Engine struct{...}`; `func NewEngine(c Config, g Group, b Box, s *State, clock func() time.Time, sleep func(time.Duration), out io.Writer, attendedBy string) *Engine`; `func (e *Engine) Plan(ctx, iid, sha string) (ok bool, err error)`; `func SavedStatus(j *Journal) map[string]any`; `func runSystemGroup(verb string, args []string) int`; the fake `newFake(t, n int) *fake` that later tasks extend. |
| +- [ ] **Step 0: Copy review** of the two `docs/site/cli.md` entries and the `plan`/`status` usage text, before they are written. |
| - [ ] **Step 1: Failing tests.** Port every `test_plan*`, `test_status*`, `test_stale_and_racing_readiness`, `test_publication_lag_and_two_second_margin`, `test_readiness_clock_starts_at_first_response_*`, `test_live_*` parsing test. Add `TestPreflightRefusesForeignTransactionShape` (Review Focus 3: the fake group has `minimum = N-1` and another member parked, as another account's transaction leaves it; `roll`, `replace` and `remove` refuse `shape` with no write and the journal closes `preflight-refused`). `TestSkewedClockRefuses` (Review Focus 1: box `started_at` 3 minutes ahead of the local clock → `admission`). `TestCLIRefusesRootBoxWindows`: euid 0 → `root` text adapted per Task 13; `/etc/carlos/host.env` present (injected path) → refused; positional args → usage error; missing `--config` → usage error; no console session is ever opened (the console client constructor is a nil func in the test and must not be called). |
| - [ ] **Step 2: Run** `go test ./internal/grouproll ./ -run 'TestPlan|TestStatus|TestReadiness|TestSkewed|TestCLIRefuses|TestCLIProjection' && go test ./internal/parity` — FAIL. |
| - [ ] **Step 3: Implement** the script's `snapshot`, `identity`, `readiness`, `preflight`, `plan`, `saved_status` and `main`'s argument rules. |
| - [ ] **Step 4: Run** — PASS. Cross-compile check. |
| - [ ] **Step 5: Commit** `carlos system group: plan and status` (with the parity rows and regenerated files). |
| -- [ ] **Step 6: Copy review for this slice** (spec §3): the `TEXT` strings `plan` and `status` print, the new refusals (root, on a box, Windows, profile identity, plugin version) and the two `docs/site/cli.md` entries, through the copy-review skill before Merge A; apply the edits verbatim. |
| -- [ ] **Step 7: Merge A.** Whole-change review for Tasks 1-5 (one Astra pass: Task 3 touches termination), census card, CI green, merge under the standing rule for inert operator verbs. Then, read-only and only with Paul's dev go: `carlos system group plan --config <dev ie config> --member <iid> --to-sha256 <current sha>` from an operator machine; it must print the same refusals as the script's `plan` on the same group. |
| +- [ ] **Step 6: Merge A.** Whole-change review for Tasks 1-5 (one Astra pass: Task 3 touches termination), census card, CI green, merge under the standing rule for inert operator verbs. Then, read-only and only with Paul's dev go: `carlos system group plan --config <dev ie config> --member <iid> --to-sha256 <current sha>` from an operator machine; it must print the same refusals as the script's `plan` on the same group. |
| ### Task 6: The deciders and golden fixtures |
| @@ -186,12 +187,12 @@ Starts only after `held-floor-sha-map` merges (stopping rule 4). |
| ### Task 10: The probe |
| **Files:** |
| -- Create: `internal/grouproll/probe.go`; Modify: `system_group.go`, `parity/parity.tsv` + `make parity-doc`, `docs/site/cli.md` (leaf `probe`); Test: `internal/grouproll/probe_test.go` |
| +- Create: `internal/grouproll/probe.go`; Modify: `system_group.go`, `parity/parity.tsv` + `make parity-doc`, `docs/site/cli.md` (branch `probe` with leaves `start`, `resume`, `status`, `abandon`, `close-lost`, each accepting only `probe` journals; the roll leaves keep refusing them, `journal_kind`); Test: `internal/grouproll/probe_test.go` |
| **Interfaces:** |
| - Produces: `func (e *Engine) Probe(ctx, iid string) error`, `func (e *Engine) ProbeResume(ctx, tx string) error`; journal kind `probe`. |
| -- [ ] **Step 1: Failing tests:** port all `region_group_probe_test.py` tests (status-only sessions, `read_only` refusal for any other verb, the member's own instance row overriding membership, `unchanged`). |
| +- [ ] **Step 1: Failing tests:** `TestProbeLeavesKindIsolation` (each probe leaf refuses a roll journal and each roll leaf refuses a probe journal, as the test at `region_group_probe_test.py:471` does); port all `region_group_probe_test.py` tests (status-only sessions, `read_only` refusal for any other verb, the member's own instance row overriding membership, `unchanged`). |
| - [ ] **Step 2: Run** `go test ./internal/grouproll -run TestProbe` — FAIL. **Step 3: Implement** as a wrapper over `Group` and `Box` that refuses writes outside the probe's set. **Step 4: Run** — PASS. **Step 5: Commit** `grouproll: the Standby observation probe`. |
| ### Task 11: (cut in rev 3) |
| @@ -209,9 +210,9 @@ The cross-machine claim is cut (spec §8). Serialization is Task 1's local lock |
| - [ ] **Step 3: Fill the ledger**; each "does not apply" row carries a reason tied to a V-row of spec §7. |
| - [ ] **Step 4: Run** — PASS. **Commit** `grouproll: parity ledger, boundary and MinIO end to end`. |
| -### Task 13: Copy review of the remaining strings and the runbook |
| +### Task 13: Copy review of the remaining strings and the runbook (runs before Task 7) |
| -- [ ] **Step 1:** Before Merge B: every `TEXT` string and `docs/site/cli.md` entry not reviewed in Task 5 Step 6, through the copy-review skill; apply Paul's edits verbatim. (Each later slice's strings are written into `text.go` only from this review's approved file; Tasks 7, 9 and 10 use the script's strings as placeholders marked in one list that this step empties.) |
| +- [ ] **Step 1:** Before Task 7 starts: the `docs/site/cli.md` entries and usage text for every remaining leaf, and the runbook copy, through the copy-review skill; Tasks 7, 9 and 10 write only approved strings. |
| - [ ] **Step 2:** The runbook page for `carlos system group` (from the §25 runbook branch if merged, else a new `docs/site` page), through the same review. |
| - [ ] **Step 3:** `go test ./internal/grouproll ./ -run 'Text|Usage'` — PASS (golden usage output updated). **Commit** `grouproll: reviewed operator copy and runbook`. |
| @@ -220,7 +221,7 @@ The cross-machine claim is cut (spec §8). Serialization is Task 1's local lock |
| - [ ] **Step 1:** Full local suite once: `go test ./...` (scratch under `$TMPDIR`), both cross-compiles. |
| - [ ] **Step 2:** Whole-branch review, Astra (`codex exec -m gpt-6-astra -c model_reasoning_effort="high" … < /dev/null`), brief from `docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md`, max three rounds; Fable as the second reader on Tasks 7 and 9 (termination). |
| - [ ] **Step 3:** `make census-card`, `make census-propose NAME=group-roll-verb CLAIMS=…`, the other-family reviewer's verdict on #280. |
| -- [ ] **Step 4:** Re-merge main, CI green on the tip, `amadan branch merge carlos/platform <branch> -expect <full sha> -squash -message "$(cat msgfile)"`. The verb is inert; release, the claim statement's apply and the witnesses are Paul's steps. |
| +- [ ] **Step 4:** Re-merge main, CI green on the tip, `amadan branch merge carlos/platform <branch> -expect <full sha> -squash -message "$(cat msgfile)"`. The verb is inert; release and the witnesses are Paul's steps. |
| ### After merge (not tasks of this plan; each needs Paul's go) |
diff --git a/docs/superpowers/reviews/ASTRA-R3-group-roll-verb.md b/docs/superpowers/reviews/ASTRA-R3-group-roll-verb.md| new file mode 100644 |
| index 000000000..354986acb |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/ASTRA-R3-group-roll-verb.md |
| @@ -0,0 +1,67 @@ |
| +codex |
| +- **R2-1 — Resolved by cut:** shared ownership and forced recovery are removed. |
| +- **R2-2 — Resolved by cut:** divergence stays in the script’s local state model. Finding 1 concerns switching tools. |
| +- **R2-3 — Resolved:** `cancel-drain` again accepts the closed failed-drain journal. |
| +- **R2-4 — Resolved:** unstable credential sources and unnamed assume-role sessions are explicitly refused. |
| +- **R2-5 — Resolved:** session credentials move out of argv, with exclusion tests. |
| +- **R2-6 — Resolved:** the `Box` signatures now match and have an interface assertion. |
| +- **R2-7 — Partly resolved:** file selection and chain validation are specified, but the prescribed loader options have incompatible types. |
| +- **R2-8 — Partly resolved:** CLI documentation is included; copy review still follows writing the copy. |
| +- **R2-9 — Resolved:** the state path is resolved before environment isolation. |
| +- **R2-10 — Resolved:** the small-file cap is distinguished from journal rows, with a large-row test. |
| + |
| +Reviewed commit `d9347bffa2f6dde315946dfdf88e575246e652a2`. |
| + |
| +1. **P1 — Spec §11.5 / plan rollout: `status` cannot establish that switching tools is safe.** |
| + |
| + **Evidence:** [spec:496](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md:496) requires checking the outgoing tool’s `status` for no open transaction and no divergence flag. But [saved_status:1372](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/scripts/region-group-roll.py:1372) reads only the selected journal: it checks neither the active marker nor the divergence file. [The existing test:514](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/scripts/region_group_roll_test.py:514) explicitly preserves the divergence flag after `close-lost`, while subsequent `status` reports a completed transaction. |
| + |
| + **Failure scenario:** the Python transaction observes divergence and is later closed as member-lost. Once the group is restored, its journal reports `done`, but the blocking flag remains. Switching to Go’s separate state directory loses that block. An in-memory reproduction confirmed that `saved_status` never accesses either state marker. |
| + |
| + **Fix:** require explicit inspection of the outgoing group’s active state and divergence flag under its lock before switching. Alternatively, cut switching during overlap and require one verified migration before enabling Go writes. Add the divergence → close-lost → attempted-switch case. |
| + |
| + **Fault family:** preservation of recovery interlocks across tool transitions. This does not require restoring the shared claim. |
| + |
| +2. **P1 — Plan Task 3: the specified shared-config loader call does not compile.** |
| + |
| + **Evidence:** [plan:81](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/plans/2026-11-09-group-roll-verb.md:81) directs passing `WithSharedConfigFiles` and `WithSharedCredentialsFiles` to both loaders. These return `LoadOptionsFunc`, whose signature is `func(*LoadOptions) error` ([SDK:21](/home/paulca/go/pkg/mod/github.com/aws/aws-sdk-go-v2/config@v1.32.6/load_options.go:21)). `LoadSharedConfigProfile` instead accepts `func(*LoadSharedConfigOptions)` ([SDK:655](/home/paulca/go/pkg/mod/github.com/aws/aws-sdk-go-v2/config@v1.32.6/shared_config.go:655)). |
| + |
| + **Failure scenario:** implementing Step 3 literally produces incompatible-argument compiler errors, blocking Task 3 and Merge A. |
| + |
| + **Fix:** pass a `func(o *awsconfig.LoadSharedConfigOptions)` setting `ConfigFiles` and `CredentialsFiles` to the validation loader. Use the existing `WithShared…Files` functions only with `LoadDefaultConfig`, retaining identical resolved lists. |
| + |
| + **Fault family:** SDK API compatibility in credential configuration. |
| + |
| +3. **P2 — Plan Tasks 1, 5 and 13: copy review remains ordered too late.** |
| + |
| + **Evidence:** [Task 1:47](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/plans/2026-11-09-group-roll-verb.md:47) writes `TEXT` verbatim. Task 5 implements and commits strings before its [Step 6 review:117](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/plans/2026-11-09-group-roll-verb.md:117). [Task 13:214](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/plans/2026-11-09-group-roll-verb.md:214) still permits script strings as implementation placeholders. The [copy-review skill:13](/home/paulca/.agents/skills/copy-review/SKILL.md:13) requires drafting into the string index before implementation files. |
| + |
| + **Failure scenario:** following the plan writes unreviewed operator copy despite the stated review requirement. |
| + |
| + **Fix:** move each slice’s review before its first string or documentation write; remove the placeholder exception. |
| + |
| + **Fault family:** command-tree and published-contract consistency; remaining R2-8 P2. |
| + |
| +4. **P2 — Spec §3 / Task 10: probe recovery commands lack an explicit CLI mapping.** |
| + |
| + **Evidence:** [spec:87](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md:87) names probe initiation and resume. [Task 10:189](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/plans/2026-11-09-group-roll-verb.md:189) adds only the `probe` leaf and declares `Probe`/`ProbeResume`. The original [probe CLI:155](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/scripts/region-group-probe.py:155) also exposes `status`, `abandon` and `close-lost`. Ordinary roll recovery rejects probe journals, explicitly tested at [probe test:471](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/scripts/region_group_probe_test.py:471). |
| + |
| + **Failure scenario:** the named command surface omits how an operator abandons or closes a lost probe transaction while preserving journal-kind isolation. |
| + |
| + **Fix:** specify the probe recovery subcommands and their registry, parity and documentation entries, or explicitly define safe journal-kind dispatch through shared commands. |
| + |
| + **Fault family:** recovery-contract completeness. |
| + |
| +5. **P3 — Rev 3 leaves contradictory statements from the removed design.** |
| + |
| + [Spec:167](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md:167) says `credential_process` works immediately after refusing it. [Plan:223](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-group-roll-verb/docs/superpowers/plans/2026-11-09-group-roll-verb.md:223) still schedules “the claim statement’s apply,” although the claim and infrastructure change are cut. |
| + |
| + These could mislead the implementer or operator. Delete the obsolete statements. **Fault family:** consistency of the declared cuts. |
| + |
| +The two P1s have different causes. Refusing tool switching until a verified migration removes finding 1; finding 2 requires correcting the SDK call. Neither requires another shared-claim design or a fourth review round. |
| + |
| +Seven targeted terminate-decision and remote-command tests passed. No full suites or live AWS calls ran. No files were changed; the checkout remains clean. |
| + |
| +**Spec verdict: NOT READY — P1 finding 1.** |
| + |
| +**Plan verdict: NOT READY — P1 findings 1 and 2.** |
diff --git a/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md b/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md| index 5960ffd07..c968cb5ab 100644 |
| --- a/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md |
| +++ b/docs/superpowers/specs/2026-11-09-group-roll-verb-design.md |
| @@ -1,4 +1,4 @@ |
| -# `carlos system group`: the roll tool as a carlos verb (design, rev 3, 2026-11-09) |
| +# `carlos system group`: the roll tool as a carlos verb (design, rev 3.1, 2026-11-09) |
| **Asked by:** Paul, 2026-11-09, via agent manager 8a3d302: a spec for porting |
| `scripts/region-group-roll.py` into the `carlos` binary. |
| @@ -9,6 +9,12 @@ found twice is cut or turned into an invariant, not fixed a third time. |
| Line citations are to `origin/main` at `eed714da` unless they name a branch. |
| +**Rev 3.1 (Astra round 3, final, `~/.cache/group-roll-go/ASTRA-R3.md`: NOT READY on one |
| +spec P1).** No fourth round. The one P1, switching tools on a group with a `status` |
| +that cannot see the script's divergence flag, is cut as the reviewer proposed: |
| +each group switches once, through a migration check run as root on the operator |
| +host (§11 step 5). This fix has not been reviewed. |
| + |
| **Rev 3 (Astra round 2, `~/.cache/group-roll-go/ASTRA-R2.md`, 4 spec P1).** Three |
| families came back a second time, so under stopping rule 2 nothing was fixed a |
| third time. The claim, source of the ownership and divergence families and of |
| @@ -84,7 +90,11 @@ carlos system group status --config F --transaction T |
| carlos system group abandon --config F --transaction T |
| carlos system group close-lost --config F --transaction T |
| carlos system group cancel-drain --config F --member I --transaction T |
| -carlos system group probe --config F --member I | resume --transaction T (the probe's verbs) |
| +carlos system group probe start --config F --member I |
| +carlos system group probe resume --config F --transaction T |
| +carlos system group probe status --config F --transaction T |
| +carlos system group probe abandon --config F --transaction T |
| +carlos system group probe close-lost --config F --transaction T |
| ``` |
| Every verb takes `--attended-by NAME` as the script does (required when stdin is |
| @@ -164,8 +174,7 @@ with a `_other.go` sibling, per the cross-compile gate. |
| assume-role link without `role_session_name` (the SDK would name the session by |
| timestamp, so two resolutions give two callers). At start it calls |
| `sts:GetCallerIdentity` and journals the `UserId`. The script has the same exposure |
| - through the CLI; this is a refusal the script lacks, recorded as V9. SSO and `credential_process` profiles work, since the verb |
| - never runs as root. This matches what the script does to the CLI (`invoke`, |
| + through the CLI; this is a refusal the script lacks, recorded as V9. This matches what the script does to the CLI (`invoke`, |
| `:786-797`) and closes the profile-file endpoint the script left open. |
| 2. **The Session Manager plugin** (`session-manager-plugin`) on `PATH`. This is the |
| one external program, and it belongs to the AWS adapter. §5.3 says why it |
| @@ -493,10 +502,18 @@ operations, the decrement flags and the group name on every write. |
| `cancel-drain` after a forced drain failure. Their journals and drain summaries |
| are compared with the script's W1, W2 and W4 runs: the same phases in the same |
| order, the same provider writes, the same summary fields. |
| -5. **Overlap rule.** Until step 6 a card names one tool per group per window, and a |
| - group whose last transaction ran under one tool is checked with that tool's `status` |
| - (no open transaction, no divergence flag) before the other tool starts. The tools |
| - never share state (V4). |
| +5. **One switch per group, never back.** The script's `status` reads one journal and |
| + cannot see its `active.json` or `provider-divergence.json` (`saved_status`, |
| + `:1372-1382`), so it cannot prove a switch safe. Each group therefore switches from |
| + the script to the Go verb exactly once, as a card step on the operator host, as |
| + root, holding the script's group lock (`flock` on `<state_dir>/<group hash>/group.lock`): |
| + the step shows that `active.json` and `provider-divergence.json` are both absent from |
| + the group's script directory, then renames that directory to `<hash>.retired-<date>` |
| + for the record. The script would recreate an empty group directory on its next run |
| + (`State.__init__`, `:627-633`), so the same step also deletes the group's script config |
| + from the operator host; the script cannot run on the group without it. |
| + Only then does the Go verb run on that group. A divergence found at the switch goes to |
| + the controller first. The tools never share state (V4), and no group goes back. |
| 6. **Retire the script.** First, in its own commit, move what the kept tools import from |
| it: `scripts/region_group_frames.py` (`:9-12`) and `scripts/region-group-fault/client.py` |
| (`:14-15`, `:33-44`) use its text, `remote_command` framing and session transport; those |