region HA P3b plan rev 2: answer Opus R1 (Standby return)
Answer all 14 R1 findings against platform main 016599d5. Preserve N-HA14 and distinguish the documented Standby lifecycle from defensive return-hook handling. Record completed G1 switch-on, keep D1-D4 explicit, and prepare the plan for Opus R2. Plan-only revision; no implementation or account calls.
1 file changed,
+114
−40
docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md+114 −40
diff --git a/docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md b/docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md| index 25d4d471f..549ad8319 100644 |
| --- a/docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md |
| +++ b/docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md |
| @@ -10,7 +10,7 @@ |
| **Citation base:** amadan main **016599d5b97c04b2fc5e807b834fdf38e2c7a35e**, containing P3a, P1b-3b T (`9b8b2c50`), follow-ups (`f18da984`) and the store-Deny fix (`9bd45488`). All platform source `file:line` citations below refer to this base. Proposed paths and tests are explicitly marked. No sibling branch is an implementation authority. |
| -**Status:** rev 1, draft for Opus R1. This commission writes two Markdown files and one local commit; no push, implementation, reviewer dispatch or account access. Product wording gets a Luna pass at build time; plan prose is exempt. |
| +**Status:** rev 2, for Opus R2. This revision changes only this plan and makes one local commit; no push, implementation, reviewer dispatch or account access. Product wording gets a Luna pass at build time; plan prose is exempt. |
| ## Rulings |
| @@ -24,7 +24,9 @@ |
| | Author's call, B3b-A | **R1/A1:** use the merged two-GET role reader. Own object wins, then existing regional default, then absent-both means serve. Create no role writer or seed bypass. Initial activation requires effective serve; see D2 for the user-visible restriction. | |
| | Author's call, B3b-B | **N1:** a hairpinned client's address is this box's IMDS-reported public IPv4, checked against root boot identity and public-address validation. It is not the NLB EIP, a bridge address or an HTTP header. Task 5 specifies the authenticated kernel path. | |
| | Author's call, B3b-C | **T1/A1:** the restart guard, immutable group marker and Restart=no drop-in ship with the first group, even though the attended roll drill is a later slice. An environment flag cannot disable them. | |
| -| Needs Paul, D1–D4 below | **S1/H4/I6:** dated dev go, P2b-dependent activation boundary, compute/retention cap and the sidecar drill boundary. Recommendations are explicit; none is assumed approved. | |
| +| Author's call, B3b-D | **T1/I4:** AWS documents no Standby hook; Task 7 alone owns any defensive return CONTINUE. Observe the exact dev behavior before enabling rolls; divergence refuses the roll. | |
| +| Author's call, B3b-E | **A1/I6/E1:** a distinct group queue uses competing consumers; a closed member journals but neither imports nor acknowledges. Tasks 2/3 preserve Started without granting duty authority. | |
| +| Needs Paul, D1–D4 below | **S1/H4/I6:** dated dev go, limited pre-P2b acceptance boundary, compute/retention cap and the sidecar drill boundary. Recommendations are explicit; none is assumed approved. | |
| ## Scope, slices and finish lines |
| @@ -36,16 +38,21 @@ |
| P3b-1 is the smallest safe first group merge, not six scaffolding merges. If it cannot fit one session, stop at three days or three compactions and hand off; do not drop the restart guard or hairpin to force a landing. Each implementation session ends at its slice's merge. Planning finishes at this local commit. |
| -**Switch-on gate:** Paul wants G3, the first carloku.com region, after dev G1/G2. Preserve the spec's G1 prerequisite for live group activation: P2b must merge and the release owner must supply G1 evidence before the group window. Executable local tasks here use only 016599d5; P2b integration remains outline. Before implementation landing, name the actual UTC release/drill window, deployment operator and cleanup owner, and obtain the scoped card approval in Task 8. A relative promise of “next release” is insufficient. Without a date or G1, keep implementation on its branch. D1 offers an explicit alternative if Paul wants an earlier limited experiment; this plan does not silently change §19. |
| +**Switch-on gate:** G1 dev switch-on is **recorded done**, not awaiting P2b: #421 export `/home/paulca/.cache/tmp/d421.txt:365` records items 1–7 on sophie-knitting and leo-climbing, v0.34.0, on 2026-11-03 (~22:35Z report; restarts 21:54:22Z/21:56:12Z); `:381–383` records item 8 and the console restart at 23:03:11Z. These are recorded observations, not a fresh live verification. Full §19 completion still lacks P2b role/platform/readiness doors and P1b-3b slice S evidence. **P3b-1 uses main-only interfaces and does not require P2b to merge.** D1 requests explicit acceptance of this limited first-service slice before full G2, without declaring those missing features complete. Before implementation **starts**, Paul must choose D1/D2, name an actual UTC switch-on window, deployment operator and cleanup owner, and approve Task 8's scoped card. No date has been authorized here: do not begin building without it. The first merge still travels with observed hapair service; full G2/G3 remain gated on the missing producers. If Paul requires the literal full-G1 prerequisite before any experiment, that is D1's explicit alternative, not a hidden dependency. |
| **Topology:** eu-west-1, canonical `ie`, empty record placement `CARLOS_REGION`, existing dev IE bucket, `CARLOS_POOLS=hapair` only, count=2 in two public AZ subnets. Use existing born-HA fixtures; P2a's create refusal is not bypassed by writing records. Group boxes run no console/relay/platform unit. Fixed IE boxes and their EIPs stay owned by their existing modules. Group-only fault runs require cleanly sleeping hapair fixtures and withdrawing only hapair from the fixed pair under the private approval card; retain all other pools and restore the exact configuration afterward. No production EIP transfer, old-host migration, replica design (#511), fleet provisioning, moves/import design or P6 retirement work. |
| ## Round history and stopping rules |
| -P3 plan review is **CLOSED at Opus R2, READY AFTER FIXES**, after R1's 2 P1/10 P2 and R2's 0 P1/6 P2. P3a whole-branch R1 was READY, 0 P1/0 P2/3 P3 (`docs/superpowers/reviews/REVIEW-REGION-HA-P3A-BRANCH-R1.md`). This plan replaces its group outlines with executable main-based tasks; **P3b has at most three Opus plan rounds, zero spent here**, stopping at the first with no P1. Apply that round's P2s without another round; P3s go on a follow-up list. A fourth needs Paul. Splits, renames and reviewer changes do not reset a budget. |
| +P3 plan review is **CLOSED at Opus R2, READY AFTER FIXES**, after R1's 2 P1/10 P2 and R2's 0 P1/6 P2. P3a whole-branch R1 was READY, 0 P1/0 P2/3 P3 (`docs/superpowers/reviews/REVIEW-REGION-HA-P3A-BRANCH-R1.md`). This plan replaces its group outlines with executable main-based tasks; **P3b has at most three Opus plan rounds; R1 spent, R2 pending**, stopping at the first with no P1. Apply that round's P2s without another round; P3s go on a follow-up list. A fourth needs Paul. Splits, renames and reviewer changes do not reset a budget. |
| Upstream history remains closed: spec/P1a/P1b-1/P1b-2/dead-holder backoff R1–R3; P1b-3a R2/N-HA12; P2a R3/N-HA13; P1b-3b R3/N-HA16/17; follow-ups branch R2. **Namespace family:** P3a F1/F2 → N1 → R2-1/R2-2, then the ruled CUT and its incomplete-cut correction. This is not permission for another iterative withdrawal repair. Task 1 implements the brief's retained-name invariant; if the same boundary fails in two consecutive rounds, stop and offer refuse/cut/one-invariant choices under rule 2. |
| +| P3b round | Input / verdict | Disposition / budget | |
| +|---|---|---| |
| +| R1, Opus | Rev 1 `cac62f37`, brief `f6720fda`; findings `REVIEW-REGION-HA-P3B-R1.md`, committed `15d43bad`: **NOT READY, 1 P1 / 6 P2 / 7 P3** | T1/I4 return-hook premise checked against AWS below; H4/A1, I6/E1, G2 and S1 fixes in this revision. | |
| +| R2, pending | **rev 2, for Opus R2** | No verdict claimed. Stop at first no-P1 round; if T1/I4 or H4/A1 recur, apply rule 2 before another fix. At most R3 remains after R2; no reset. | |
| + |
| Use `docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md`. Carry these histories into every brief. Only marked risky tasks get their own Opus review; every slice gets a whole-branch review and census decision. The same budget includes census and checks of newly changed root/security/termination/storage behavior after P2 fixes. At 24h without merge, report blocker, last two rounds and recommended cut on the branch discussion and to Paul; repeat daily. No reviewer is launched by this drafting session. |
| ## Current code and file map |
| @@ -70,7 +77,7 @@ Use `docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md`. Carry these histories i |
| | `internal/console/regioningress.go:12`; `internal/console/apiboxroles.go:14,26`; `hostclaimops.go:50,59`; `awsregionmetric.go:26` | Configured public ingress parser exists. Role vocabulary remains claim-era; claim-free verified EligibleBoxes startup is P2b, not an executable dependency here. | |
| | `internal/provision/reconcile.go:515,3286,3314`; `internal/host/hadepartures_wiring.go:108,120`; `internal/host/hadepartures.go:33,54` | Region/pool reconciliation and importer policy are present. Test the composed hapair-only path; consumer admission must not wait for every unrelated departure to complete (N-HA17). | |
| -External, read-only evidence: private `platform-infrastructure` HEAD **e57979d85a05a31f0b51d3bee071f0f14a860187**, `dev/region-ie.tf:10,11` and `dev/region-ie-b.tf:14,15`, uses `t4g.micro`/20 GiB. It is neither a platform-main citation nor live inventory. P3a ledger at `.claude/worktrees/region-ha-p3/.superpowers/sdd/2026-11-03-region-ha-p3a/progress.md` explicitly defers group resources, hook adapter/receipt/marker/guard, boot/IAM/hairpin and group/EligibleBoxes alarms to this work. |
| +External, read-only evidence refreshed at private `platform-infrastructure` **origin/main 80d20c47a83dec74822ce36c5bfc0651b535ebc7**: `dev/region-ie.tf:10,11` uses **t4g.medium/20 GiB** after the 2026-11-03 console-box OOM (`e3b34bd`); `dev/region-ie-b.tf:14,15` still uses **t4g.micro/20 GiB**. This is merged configuration, not live inventory. D3's console-free group micro is a proposed choice, not a claim that both fixed roots use it. P3a ledger at `.claude/worktrees/region-ha-p3/.superpowers/sdd/2026-11-03-region-ha-p3a/progress.md` explicitly defers group resources, hook adapter/receipt/marker/guard, boot/IAM/hairpin and group/EligibleBoxes alarms to this work. |
| ## Global constraints and review focus |
| @@ -82,13 +89,15 @@ Review the actual production wiring, response-loss windows, namespace ownership |
| ### Task 1: Retain every name while admission is closed [own review: routing authority/cache] |
| -**Files:** existing `internal/host/edgesfile.go`, `internal/edge/{homemap.go,edge.go,wakeplacement.go}`, `internal/edgesfile/{homeelect.go,snapshot.go,fold.go}`, existing `internal/console/boxselect.go` and `boxselect_ha_test.go`, and their home/alias tests; proposed `internal/edgesfile/{nameauthority.go,nameauthority_test.go}`, `internal/edge/group_names_test.go`, `internal/host/group_names_test.go`. Read every consumer of host/name fields, including console election, aliases, asset authorities, certificates and steering; change a consumer only where the shared predicate requires it. |
| +**Files:** existing `internal/host/edgesfile.go`, `internal/edge/{homemap.go,edge.go,wakeplacement.go}`, `internal/edgesfile/{homeelect.go,snapshot.go,fold.go}`, existing `internal/console/boxselect.go` and `boxselect_ha_test.go`, `internal/host/group_admission.go`, and their home/alias tests; proposed `internal/edgesfile/{nameauthority.go,nameauthority_test.go}`, `internal/edge/group_names_test.go`, `internal/host/group_names_test.go`. Read every consumer of host/name fields, including console election, aliases, asset authorities, certificates and steering; change a consumer only where the shared predicate requires it. |
| - [ ] Write failing `TestGroupNamesBeforeAdmission` through real reconcile → edges publication → peer fold. Enumerate exact routes, platform aliases, plain aliases, instance catch-alls, delegated served catch-alls, cert-only wildcard parents, replica-marked names and path-owner ambiguity. Sidecar names remain absent. Cross two accounts, an admitted peer's own catch-all, no address, stale/malformed admission and all role states. Confirm real routes can exist before hook completion; do not infer an empty namespace from an empty disk. |
| - [ ] **One H4/A1 invariant:** admission changes who may serve a name, never who owns it or whether a real route exists. Implement one pure name-authority resolution helper in `internal/edgesfile/nameauthority.go`, consumed by peer fold/election and exact-versus-local-fallback dispatch. Inputs retain class, owner/target, lifetime ordering and service eligibility separately. Output distinguishes absent, held and dialable, with a separate real-route bit. Proposed interface: `ResolveNameAuthority(name string, local []NameClaim, peers []NameClaim) NameResolution`; `NameClaim` carries class, account/app/target, stamp/lifetime, eligibility and dial point; `NameResolution` carries Absent/Held/Dialable, RouteExists, owner/target and optional dial. Derive claims from the existing wire schema and local route map; make all consumers use this resolution rather than independently interpreting a held bit. Keep existing wire rows; do not introduce withdrawal or a generic held wildcard that masks another admitted app. |
| - [ ] Resolve ownership first: real route beats another account's alias even when the route is closed; exact name beats a catch-all. Within the same established owner/target, a serving peer may supply the dial under the existing lifetime rules. A held exact entry refuses 503 with no holder and no fallback to another account. Cert-only parents supply certificates, no route/namespace reservation. A closed wildcard supplies no new concrete ownership over names served by an admitted peer's own valid catch-all. Unknown owner identity cannot authorize a cross-account dial. Preserve switch-off legacy behavior and single-hop accounting. |
| - [ ] Add `TestGroupNameClassCensus`: schema/producer inventory must fail when a new name-bearing field or derivation appears without a table row. Drive actual `ServeHTTP`, `ExactHome`, `Owner`, console home election and `DeploymentRoutesComplete` consequences; route existence must survive admission closure and aliases must not gain route authority. Run `nice -n 19 go test ./internal/edgesfile ./internal/edge ./internal/host ./internal/console -run 'TestGroupName|Test.*Booting|Test.*Alias|Test.*HomeElect' -count=1` before/after. |
| -- [ ] Mutation witnesses, at most six: drop closed real-route bit; let admitted alias beat closed route; let held exact fall through; treat cert-only as route; let closed wildcard mask local admitted catch-all; omit a name class. Every mutation must fail the production-path guard. Before group activation, deployment owner records every box/console reader on the accepted build. Rollback cannot put an old reader beside active group publishers. |
| +- [ ] Publish additive capability `names-2` from every upgraded box writer (`internal/host/edgesfile.go:198,360`; `internal/edgesfile/snapshot.go:71`). One proposed `GroupReadersReady` predicate, over the existing complete cached deployment-wide fold, requires every live peer edges file to advertise it; missing, malformed, incomplete or stale evidence refuses. Unknown peers cannot be discarded to make the test pass. Reuse existing liveness/identity rules; a merely silent peer is not proof of retirement. Call this predicate both before the first booting group edges write and before initial CONTINUE or maintenance re-admission. Self is checked by the running build capability. New group peers with no first edges file use the same pinned, verified `names-2` launch build; they are not treated as old live edges publishers. A known live peer whose file is missing remains unknown/refused. The operator inventories nonpublishing readers as well. No per-box polling or request-time reads. Later dependency errors do not clear an admitted health latch (§9.5). |
| +- [ ] `TestGroupReadersReady` drives real mixed-version fold/publication/admission: one old peer (including a different pool/region reader), incomplete snapshot or unknown freshness yields **zero group edges PUTs and zero CONTINUE**. All upgraded permits both. The deployment command inventories nonpublishing readers too; check the console's published `X-Carlos-Version` against the accepted build and record its digest (no invented console capability endpoint). Serialize all supported release/rollback commands with the group experiment record. A rollback to a pre-`names-2` build refuses until Task 8's readback proves no active group publisher and no retained group namespace; missing readback refuses. An ad hoc privileged downgrade outside that entry is unsupported, not made safe by a cached capability. |
| +- [ ] Mutation witnesses, eight: drop closed real-route bit; admitted alias beats closed route; held exact falls through; cert-only becomes route; closed wildcard masks local admitted catch-all; omit a name class; admit/publish with an old peer; permit old-reader rollback without publisher readback. Every mutation must fail the production-path guard. |
| - [ ] Take P3a P3-1 in existing `internal/boxroles/{roles.go,roles_test.go}` and proposed `internal/boxroles/imports_test.go`: replace boxroles' `release.Store` dependency with a one-method `Get(context.Context,string) ([]byte,string,error)` interface; preserve its two GETs/strict decoding. Extend the import assertion to both boxroles and groupadmission. This is a dependency cut, no role protocol change. |
| ### Task 2: Fixed-size group and least-authority IAM [own review: infrastructure/security/termination] |
| @@ -100,21 +109,49 @@ Review the actual production wiring, response-loss windows, namespace ownership |
| - [ ] ASG min=max=desired=count, ELB+EC2 health, 60s grace, suspended AZRebalance, no refresh/scaling policy/maximum instance lifetime/Spot replacement. Use **initial_lifecycle_hook**, launching transition, 900s, default ABANDON; policies/hook must exist for initial instances. Template uses same encrypted gp3/delete-on-termination volume, IMDSv2 hop1 and public IPv4. Pin release/AMI; no automatic template adoption. Ordinary tofu count decreases stay refused; N-HA14 is an operator API transaction only. No apply while a transaction is open. |
| - [ ] Add explicit fixed state moves only where count conversion requires them; preserve every fixed resource's attributes. Extend plan gate's known-identity guard for unknown `instance_id`, `network_interface_id`, `role`, `allocation_id` on cross-module creates (P3a P3-2). Test state/volume/ENI attachments, moved names and targeted closure drift. New group creates with expected unknown identities need a **specific resolved group-resource provenance**, not a global unknown exemption; unrelated ambiguous creates refuse. Fixed-target attachment exception remains limited to reviewed create/delete. No new blanket override. |
| - [ ] Group IAM: define regional=`arn:<partition>:ssm:<aws-region>:<account>:parameter/carlos/<deployment>/<region>` and shared=`arn:<partition>:ssm:<aws-region>:<account>:parameter/carlos/<deployment>/shared`. Regional/shared SSM exact-path AND descendant sets in Allow and NotResource Deny are `[regional, regional+"/*", shared, shared+"/*"]`; no ancestor, sibling or release-key reads. Put bootstrap/hash/ingress under regional `boot/`, outside nonrecursive env enumeration. Configuration KMS key only, ViaService=regional SSM and matching PARAMETER_ARN. CompleteLifecycleAction only exact account/region/group-name ARN (UUID wildcard only), matching deployment/region tags; no box UpdateASG, Enter/ExitStandby, heartbeat, SetInstanceHealth, RegisterTargets or EC2 writes. Scoped DescribeInstances region only; remove broader duplicate inventory grant for groups. |
| -- [ ] Audit final policy composition, including managed attachments. Group denies Put/Delete/tagging on `control/box-roles/*`; preserve existing signed identity, termination proof, edges and lease consumers and the merged store-Deny correction. Drop broad DeleteObjectVersion/ListBucketVersions; if a merged consumer needs versions, enumerate its exact object prefix and conditioned LIST prefix with a positive witness. Keep console inventory/writer rights on fixed roles. Box gets existing queue receive/delete/attributes only; no new queue consumer or IAM write rights. Operator seed and maintenance privileges are separate, scoped on the approval card. |
| +- [ ] Audit final policy composition, including managed attachments. Group denies Put/Delete/tagging on `control/box-roles/*`; preserve existing signed identity, termination proof, edges and lease consumers and the merged store-Deny correction. Drop broad DeleteObjectVersion/ListBucketVersions; if a merged consumer needs versions, enumerate its exact object prefix and conditioned LIST prefix with a positive witness. Keep console inventory/writer rights on fixed roles. Box gets ReceiveMessage/DeleteMessage/GetQueueAttributes on **its group module's queue only**; fixed-box queue grants remain unchanged. No additional consumer or IAM write rights. Operator seed and maintenance privileges are separate, scoped on the approval card. |
| +- [ ] The group module owns a **distinct** termination SQS queue, region-wide EC2-terminated EventBridge rule/target and anti-forgery queue policy, matching `main.tf:843–898` (14-day retention, managed encryption, explicit Deny for sends not from that rule). Reuse the module-local resource shape, never sophie's or leo's queue. All members of this ASG compete on this one queue; each still runs exactly one 20s consumer. An event goes to one member per delivery, not every member; the fixed queues receive their own independent copies. Put the group URL in the group's regional SSM selection as `CARLOS_TERMINATION_QUEUE_URL`; never overwrite either fixed host.env. `group_shape` and `group_iam_exact_scope` assert queue/rule/target identities, URL/account/region binding, receive-only rights and forged-send denial. |
| +- [ ] `group_iam_exact_scope` enumerates policy inheritance: retain `AmazonSSMManagedInstanceCore` (`main.tf:428–435`) with the explicit parameter/release-key Denies; retain DNS-01 `host_route53` only for approved zones/TXT challenges (`:256`). Retain scoped `host_steering` only when that duty is enabled, with explicit zone/name conditions and its documented account-wide health-check limitation (`:301`); assert both enabled and disabled cases. **Exclude** console-only `host_costexplorer` (`:390`), `host_console_mail` (`:777`), `host_store` bucket/user provisioning (`:693`) and `host_store_scan` (`:815`), and reject those group inputs. Serving tenants use their existing data credentials; this exclusion grants no console duty to group boxes. Keep fixed store policies and their merged Deny fix unchanged. Assert the final combined action/resource set, including managed attachments, not only each inline policy. |
| - [ ] Run mock `tofu test -filter=tests/group.tftest.hcl` and `-filter=tests/group_iam.tftest.hcl`, plus Python gate fixtures, from owned initialized local fixtures; first FAIL then PASS. Run module fmt check. Mutate six rails: no initial hook, wildcard completion, dropped Deny, decrement via tofu, changed fixed resource, unknown foreign identity. Never use an account-backed plan as a unit test. |
| ### Task 3: Claim-free boot, hook and receipt [own review: root/admission/termination] |
| -**Files:** existing `internal/host/{group_admission.go,agent.go,installchannel.go,bootstrap.go,boxroles.go}`, `internal/hostenv/{hostenv.go,awsssm.go,cli.go}` and existing `hostenv_test.go`, `write_linux_test.go`; existing host tests `group_admission_test.go`, `installchannel_test.go`, `host_test.go`; proposed `internal/awsregiongroup/{complete.go,complete_test.go}`, `internal/host/{group_boot.go,group_boot_test.go,group_receipt.go,group_receipt_test.go,group_config_linux.go,group_config_test.go}`, `infra/modules/region-host/group-init.sh.tftpl`. Extend existing host-env command plumbing and `docs/site/cli.md` for any option change; no separate public administration command. |
| +**Files:** existing `internal/host/{group_admission.go,agent.go,installchannel.go,bootstrap.go,boxroles.go,hadepartures.go,hadepartures_wiring.go,hadepartures_scan.go,hadepartures_wiring_test.go}`, `internal/hostenv/{hostenv.go,awsssm.go,cli.go}` and existing `hostenv_test.go`, `write_linux_test.go`; existing host tests `group_admission_test.go`, `installchannel_test.go`, `host_test.go`; proposed `internal/awsregiongroup/{complete.go,complete_test.go}`, `internal/host/{group_boot.go,group_boot_test.go,group_receipt.go,group_receipt_test.go,group_config_linux.go,group_config_test.go}`, `infra/modules/region-host/group-init.sh.tftpl`. Extend existing host-env command plumbing and `docs/site/cli.md` for any option change; no separate public administration command. |
| - [ ] Failing-first tests: `TestGroupBootOrder`, `TestGroupHostEnvNoClaims`, `TestGroupHostEnvPools`, `TestGroupHostEnvRegions`, `TestGroupInstallFloor`, `TestGroupAdmissionLifecycle`, `TestGroupAdmissionReceiptCrash`, `TestGroupAdmissionNoHibernate`. Refuse missing hibernate configuration at startup (P3a P3-3), rather than waiting forever for a consumer which cannot arm. |
| - [ ] Boot hardening precedes credentials/tenant execution: nft IMDSv4/v6 denial, chrony, service account, root-owned no-symlink directories. Write immutable root-owned 0644 `/etc/carlos/group.json` (non-secret version/account/region/group/hook/deployment/placement/pools/config digest), separate `/etc/carlos/region-config.json`, and task-4 group unit protection before starting anything. Require the marker and matching unit/configuration on every group entry; `CARLOS_BOX_REFERENCE=group`, admission=1, HA=true and index=read must agree. Missing/unsafe marker, claims enabled, wrong identity or switch mismatch refuses; no fixed-mode fallback. |
| +- [ ] Pin group OS updates to attended Standby maintenance: disable/mask `apt-daily.timer`, `apt-daily-upgrade.timer`, their services and `unattended-upgrades.service`; set `APT::Periodic::Enable "0"` and `Unattended-Upgrade::Automatic-Reboot "false"`; configure needrestart list-only (`$nrconf{restart} = 'l'`). Apply before package installs or starting edge; no automatic reboot, package maintainer-script restart of a live edge, SSM patch association or scheduled reboot is allowed. Package/kernel updates, manual systemctl/reboot and stop/start are operator-only through Task 7. Root can bypass policy, so do not describe the application guard as an arbitrary-root sandbox. `TestGroupInitNoAutoRestart` checks the rendered template/config and ordering; Task 7 reads back effective masks, needrestart policy and absence of patch/reboot schedules. |
| - [ ] Read operator-protected bootstrap object key/version and SHA from SSM once; verify object before any exec. New group-specific hostenv selection omits every `CARLOS_HOST_CLAIM*`, accepts explicit validated `CARLOS_POOLS`, AWS_REGION for deployment bucket, queue URL, platform ingress and canonical region separately from record placement. Compare env scope to marker, require hapair only on dev; never default empty pools to shared. Keep fixed allowlists unchanged. Bound configuration to 100 parameters/20 SSM pages at MaxResults=10, reject duplicate/conflicting keys, no secret logs or shell sourcing. |
| - [ ] Run existing bootstrap then install-channel with safely parsed host.env. Add proposed `checkGroupInstallFloor` observation: both floor and authorization genuinely absent permits claim-free installation; either alone, unreadable, invalid or too new refuses. Observe both once. Published floor still verifies signed identity/image; no-floor still verifies signed pointer/artifact. Existing claims/--policy install stays strict; unreadable/local guard participation refuses. No fabricated identity or guard-arm. Retain `TestBootstrapAppliesTmpfilesBeforeArming` and `TestReconcileMintsNestedUnderANestedIntent`. |
| - [ ] Install/read back hairpin and Restart=no before agent. Whole boot must finish within the original 900s hook deadline; healthy consumer startup budgets ≤30s separately from first full reconcile and booting publication. Reuse `wireAgentAdmission`, actual `Lifecycle.Started()` and matching booting `EdgesPublished`; use nonnil Launch/Completer for first group boot. Do not complete from requests or public health checks. Full local six-condition health plus four facts precedes CONTINUE; post-call health/closure recheck precedes opening. No host orchestration mutex may be held across the cloud call; Close must win while completion is in flight, as the core already allows. Platform role on a group is refused. A drain role is not “drained”; until its producer merges the activation preflight is serve-only (D2). |
| - [ ] Adapter validates own signed iid/account/region against immutable group/hook, sends CompleteLifecycleAction by InstanceId, and disables SDK retries. Bound completion to four total 2s attempts, 1/2/4s backoffs; **budget is per launch, not per tick**. Persist attempt/unknown state locally so an agent restart cannot reset it. Definite failed initial boot may send ABANDON within that same total; early failures without a working adapter rely on default ABANDON at 900s. No heartbeat extensions. Ambiguous CONTINUE stays closed; do not follow it with a guessed success or keep issuing CONTINUE on later ticks. Alarm and health-driven initial-launch cleanup cover accepted-but-unrecorded success; observe no accumulating live Pending members. |
| -- [ ] Host wrapper fsyncs atomic `/data/carlos/group-admission/receipt.json` before reporting successful completion: carlos-owned 0700 parent/0600 file, no symlinks, bound account/region/iid/group/hook/config digest. **Root never reads this agent receipt.** On admitted maintenance restart, a valid same-identity receipt suppresses completion only; all local facts and readiness must recur. Operator-mediated config rebind verifies original completion evidence, not a root trust of agent content. Wrong iid/group/hook, corrupt/absent receipt and “no active hook” never count as acknowledgment. Such an admitted member stays in Standby; no ABANDON/timeout replacement. Reboot needs new boot-id permit and address verification. |
| -- [ ] Drive real direct/hop/door/tunnel and timer/worker/session/co-spawn/duty-import paths with withheld facts: zero acquires, key mints, restores, starts or holder headers. Close admission before shutdown/consumer Stop; Done is not synthesized. Test ack-before-receipt, receipt-before-publication, lost response, persistence failure, close-during-complete, duplicate callbacks and no retry after exhaustion. Run targeted host/groupadmission/awsregiongroup/activator/edge/hostenv tests (`-run 'TestGroup|TestPreAdmission|TestAdmission'`, nice 19) FAIL→PASS. Mutate eight rails: nil group launch, early ack, fake Started, receipt reuse, retry reset, no-floor error-as-absence, pool mismatch, shutdown reopening. |
| +- [ ] Host wrapper fsyncs atomic `/data/carlos/group-admission/receipt.json` before reporting successful completion: carlos-owned 0700 parent/0600 file, no symlinks, bound account/region/iid/group/hook/config digest. **Root never reads this agent receipt.** On admitted maintenance restart, a valid same-identity receipt suppresses **only the original launch action**; all local facts and readiness must recur. It cannot suppress a return action owned by Task 4's operator transaction; the box never competes for that action. Operator-mediated config rebind verifies original completion evidence, not a root trust of agent content. Wrong iid/group/hook, corrupt/absent receipt and “no active hook” never count as acknowledgment. Such an admitted member stays in Standby; no ABANDON/timeout replacement. Reboot needs new boot-id permit and address verification. |
| +- [ ] **A1/I6 choice (a):** while group admission is closed, the consumer may receive and durably journal hints, but may neither import duties (`BindHADuty`/`AdoptHost`), finalize/delete a departed peer's evidence, nor acknowledge any queue receipt. Inject the same admission/start predicate into the production departure controller before arming it. Gate its work/import/finalization and every ack path, including invalid-message and already-complete shortcuts in `hadepartures.go:153–182`; do not return a receive-record error merely because admission is closed. A successful Receive plus durable record still closes Started, avoiding the admission/consumer deadlock. After admission, the existing worker cadence resumes; closure cancels/joins work before shutdown. The queue's 120s visibility permits an admitted group peer to receive an unacked hint; a fixed queue receives a separate EventBridge copy, not this receipt. |
| +- [ ] `TestGroupDepartureAdmission` in production wiring with a shared fake queue: booting B receives a departure, Started becomes true, yet import/finalize/DeleteMessage counters stay zero; visibility expires and admitted C imports under normal proof/lease rules. Repeat with B ABANDONed, B later admitted, invalid hints, completed-journal replay and shutdown racing import. No duties become owned by a never-admitted B. Model the same receive-before-admit/redelivery/failed-boot actions in Task 6. I6 retains the existing visibility/redelivery and scan bounds; no new 15m wait for a failed boot's imported duties. |
| +- [ ] Drive real direct/hop/door/tunnel and timer/worker/session/co-spawn/duty-import paths with withheld facts: zero acquires, key mints, restores, starts, AdoptHost/BindHADuty calls, queue acknowledgments or holder headers. Close admission before shutdown/consumer Stop; Done is not synthesized. Test ack-before-receipt, receipt-before-publication, lost response, persistence failure, close-during-complete, duplicate callbacks and no retry after exhaustion. Run targeted host/groupadmission/awsregiongroup/activator/edge/hostenv tests (`-run 'TestGroup|TestPreAdmission|TestAdmission'`, nice 19) FAIL→PASS. Mutate nine rails: nil group launch, early ack, fake Started, receipt reuse, retry reset, no-floor error-as-absence, pool mismatch, shutdown reopening; closed-member import/ack. |
| + |
| +### Standby return: provider evidence and T1/I4 contract |
| + |
| +Read on 2026-11-04, public AWS documentation only; no dev observation has been performed: |
| + |
| +- **Lifecycle-hook availability, footnote 1** expressly excludes Standby: “Does not apply when you […] move instances in and out of standby mode, or delete the group with the force delete option.” The marked omission is the attach/detach clause. [https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html](https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) |
| +- **Standby procedure:** “You return the instance to service by exiting the standby state.” Its example reports activity `PreInService`, which is not an instance `Pending:Wait` observation. [https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html) |
| +- **Lifecycle page and diagram:** “You can add a lifecycle hook to your Auto Scaling group so that you can perform custom actions when instances launch or terminate.” Its scale-out discussion specifies Pending→Pending:Wait for a launch; the diagram does not override the explicit Standby exclusion. [https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html) [https://docs.aws.amazon.com/images/autoscaling/ec2/userguide/images/auto-scaling-instance-lifecycle.png](https://docs.aws.amazon.com/images/autoscaling/ec2/userguide/images/auto-scaling-instance-lifecycle.png) |
| + |
| +**Conclusion:** R1's unconditional re-entry-hook premise is not supported by the explicit AWS availability rule. Model normal return without a hook, but never use that assumption to ignore a wait state. The ExitStandby API's `PreInService` activity alone proves neither a hook nor its completion. [https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_ExitStandby.html](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_ExitStandby.html) |
| + |
| +**One T1/I4 return invariant, enforced in Task 7's single `return_member` transaction function:** only the serialized operator may return the same iid, after fresh process admission and role publication. It owns any return CONTINUE; the initial-launch receipt can suppress only original-launch duplicates. No maintenance branch sends ABANDON or treats elapsed time as permission to replace. Initial failed boots retain the separate 900s default ABANDON. Tasks 3/4 only supply guarded local state and tests of this contract; the box does not implement a second return controller. |
| + |
| +| Observed phase | Sole operator action / evidence | |
| +|---|---| |
| +| Standby, local readiness incomplete | Keep Standby; no ExitStandby or completion. Wait/alert/resume the same transaction. | |
| +| Standby, freshly admitted | Read root-authenticated status over Task 7's Session Manager channel: exact iid/boot-id, current edge pid/start identity, current transaction, full local health, admission and successful role publication. Persist this observation and return intent; require it ≤5s old immediately before ExitStandby. No restart/second operator may intervene. | |
| +| Return intent recorded; Exit response lost | Read exact member lifecycle/group desired/TG state before another write. Standby permits retry only after a fresh readiness observation; Pending/PreInService/InService never triggers another Exit or a blind desired increase. | |
| +| **Pending:Wait** on return (defensive provider-divergence case) | `return_member` immediately completes **CONTINUE** for the immutable group/hook and exact iid (InstanceId selection, not the original token). Recheck current-process admission first. Persist a separate return-action journal keyed by transaction+iid+boot-id+process start+Exit activity, including call intent/outcome and attempt count; never consult the launch receipt to skip it. SDK retries=1; ≤4 explicit 2s attempts, 1/2/4s backoffs, far inside 900s. No blind retry after ambiguous success: describe first. | |
| +| InService after acknowledged completion or no-hook return | Read back same iid, unchanged total member set, desired N and both TGs healthy before restoring min N/revoking permit. An ambiguous return completion may be resolved by this transaction's observed InService plus fresh admission; this does not relax Task 3's stricter initial-launch receipt rule. | |
| +| Provider behavior differs from the approved observation | Stop/alert, do not advance to another member or start a software roll. If already returned, finish the pending action safely, then EnterStandby(decrement) and verify deregistration; retain the same iid in Standby. Never pretend an iid already in Pending:Wait is still protected by Standby. | |
| + |
| +The first **live** step of P3b-2 is one approved disposable Enter/ExitStandby observation on an already-admitted, unchanged member, using the exact hook/template and recording instance LifecycleState, activity and target states. No package/binary change precedes it. Require the documented no-return-hook result before enabling real rolls. The synthetic Pending:Wait path remains mandatory in the fakes even when the observed path has no hook. If a hook is actually observed, recover/hold the probe in Standby and refuse P3b-2 until the controller resolves the provider contract; do not silently switch to a timed safety promise. In particular, if API access is lost after an unexpected hook starts, an operator cannot guarantee stopping AWS's deadline: that is a failed probe and a roll blocker, never a passing N-HA14 witness. |
| ### Task 4: One root restart guard [own review: root/termination] |
| @@ -122,9 +159,9 @@ Review the actual production wiring, response-loss windows, namespace ownership |
| - [ ] `TestGroupMaintenanceRestartGuard` fails first on every actual apply/recover/rollback/quiesce/repoint/unit-repair entry. Central `requireGroupMaintenance` reads only root-owned marker and permit under `/etc/carlos` and `/run/carlos/group-maintenance/permit.json`: strict bounded schema, uid0, mode0600, regular single-link file, no symlink path traversal, boot-id and exact account/region/group/iid/transaction/old+new signed artifact digests. Checks occur under the mutation lock before any stop, repoint or recovery side effect. Agent-writable data is never a permit. |
| - [ ] Disable group systemLeg; mask automatic system-update path/service, make unit repair preserve masks and the group-only `Restart=no` drop-in. Keep fixed units unchanged. A stale queued update cannot stop/repoint; an absent flag cannot remove marker enforcement. Add root gate to direct install-channel reentry on an already-booted member, so it cannot bypass system-apply protection. First boot's installation permission is consumed before edge starts, never reusable as maintenance permission. |
| -- [ ] Permits are installed only by the authenticated deployment operator **after** ASG Standby and both TG deregistration readback. Permit phases distinguish mutation, local verification, return and revocation; expiry refuses further mutation but never terminates or exits Standby. An already-used mutation cannot replay under a stale permit; same transaction may explicitly authorize rollback to the recorded old artifact. Operator loss leaves durable transaction/Standby intact. Root receipt/config file tampering tests are independent of agent admission tests. |
| -- [ ] Fake transaction tests require N≥2, one transaction and admitted healthy peer; lower min N→N-1 (desired/max N), EnterStandby(decrement=true), verify exact iid/desired N-1/min N-1/max N and deregistration, then permit/close/restart. Return only after fresh full admission and role publication: ExitStandby increments desired N, verify same iid InService/healthy, restore min N, revoke last. Never blindly repair desired after an ambiguous response; read actual phase. No global suspension of HealthCheck/ReplaceUnhealthy, no EnterStandby without decrement. |
| -- [ ] `TestGroupSharedDependencyHealth`, `TestGroupMaintenanceCrashResume`, `TestGroupUnitsCannotRearmUpdate` prove S3/SSM errors leave an admitted live process healthy; restarted member stays closed in Standby. Use preserved host.env/certs/binary, no restart-time SSM refresh. Fifteen-minute wait only alerts/returns to operator. Fake time advances beyond grace/threshold/wait without replacement. Run targeted `nice -n 19 go test ./internal/host -run 'TestGroupMaintenance|TestGroupSharedDependency|TestGroupUnits' -count=1`. Mutate seven rails: absent permit allowed, check after stop, wrong iid/boot-id, agent receipt trusted, repaired Restart=always, automatic ExitStandby, timeout termination. |
| +- [ ] Permits are installed only by the authenticated deployment operator over **AWS Systems Manager Session Manager**, the existing no-SSH admin channel (`main.tf:428–435`), **after** ASG Standby and both TG deregistration readback. Permit phases distinguish mutation, local verification, return and revocation; expiry refuses further mutation but never terminates or exits Standby. An already-used mutation cannot replay under a stale permit; same transaction may explicitly authorize rollback to the recorded old artifact. Operator loss leaves durable transaction/Standby intact. Root receipt/config file tampering tests are independent of agent admission tests. |
| +- [ ] Fake transaction tests require N≥2, one transaction and admitted healthy peer; lower min N→N-1 (desired/max N), EnterStandby(decrement=true), verify exact iid/desired N-1/min N-1/max N and deregistration, then permit/close/restart. Return follows the single contract above: include Standby→Pending:Wait→InService as well as documented no-hook return; operator completes a return action independently of the original receipt, then verifies same iid/healthy, restores min N and revokes last. Never blindly repair desired after an ambiguous response; read actual phase. No global suspension of HealthCheck/ReplaceUnhealthy, no EnterStandby without decrement. |
| +- [ ] `TestGroupSharedDependencyHealth`, `TestGroupMaintenanceCrashResume`, `TestGroupUnitsCannotRearmUpdate` prove S3/SSM errors leave an admitted live process healthy; restarted member stays closed in Standby. Use preserved host.env/certs/binary, no restart-time SSM refresh. Fifteen-minute wait only alerts/returns to operator. Fake time advances beyond grace/threshold/wait without replacement while held in Standby. Add `TestGroupStandbyExitPendingWait`: after fresh re-admission, a valid original receipt plus a synthetic return hook must cause one operator CONTINUE and no box completion. Run against rev 1 semantics first: its receipt suppression/no operator completion reaches default ABANDON at 900s and **must fail**. Test unready refusal before Exit, wrong transaction/process, operator resume and lost return response. Run targeted `nice -n 19 go test ./internal/host -run 'TestGroupMaintenance|TestGroupSharedDependency|TestGroupUnits|TestGroupStandby' -count=1`. Mutate nine rails: absent permit allowed, check after stop, wrong iid/boot-id, agent receipt trusted, repaired Restart=always, automatic ExitStandby, timeout termination, receipt suppresses return completion, completion before fresh admission. |
| ### Task 5: Own-region hairpin with a verified public source [own review: root/network trust] |
| @@ -139,34 +176,47 @@ Review the actual production wiring, response-loss windows, namespace ownership |
| ### Task 6: Group observability and first visible slice |
| -**Files:** existing `internal/host/{group_metrics.go,memwatch.go,group_metrics_test.go,memwatch_test.go}`, `internal/groupadmission/observability.go`, `infra/modules/region-host/group_alarms.tf` and tests; proposed `infra/modules/region-host/tests/group_alarms.tftest.hcl`, `internal/host/group_boot_budget_test.go`; existing `internal/sim/regionha/{world_test.go,actions_test.go,invariants_test.go,sim_test.go}` and proposed `group_admission_test.go` in that directory. Whole-branch review covers instrumentation; any changed security/root behavior still gets the scoped check. |
| +**Files:** existing `internal/host/{group_metrics.go,memwatch.go,group_metrics_test.go,memwatch_test.go}`, `internal/groupadmission/observation.go`, `infra/modules/region-host/group_alarms.tf` and tests; proposed `infra/modules/region-host/tests/group_alarms.tftest.hcl`, `internal/host/group_boot_budget_test.go`; existing `internal/sim/regionha/{world_test.go,actions_test.go,invariants_test.go,sim_test.go}` and proposed `group_admission_test.go` in that directory. Whole-branch review covers instrumentation; any changed security/root behavior still gets the scoped check. |
| - [ ] FAIL→PASS `TestGroupPoolIsolation` through real reconcile/publication/wakeSnapshot/CanAdopt (shared-only, hapair-only and combined peers), `TestGroupMetricsBatch`, `TestGroupAlarmProducers`, `TestGroupBootRequestBudget`: extend existing minute batch, actual box AWS region. Preserve original InstanceId MemAvailablePercent/PSI bytes; append group-name memory/clock/admitted plus existing Deployment+Region admission/clock samples. No second sampler or S3 object. Keep fixed switch-off input byte-identical. Chrony remains fixed absolute command, 1s/4KiB, synchronized/finite parsed offset; unknown is not zero. |
| - [ ] Keep NLB alarm ownership in ingress: each TG UnHealthy maximum >0 for 10/10 minutes; Healthy minimum <count for 25/25; missing breaching. Add ASG metric math `GroupInServiceInstances - GroupDesiredCapacity < 0`, 1/1 minute, missing breaching; use actual desired so approved Standby is not misreported as missing membership. Group memory minimum <15%, 3/3 minutes, missing breaching; group clock maximum >1s, 1/1 minute. Existing queue age >600s stays. EventBridge launch-unsuccessful events scoped to group notify same-region SNS; no brittle Cause-text filter. Timeout/default ABANDON and group-size deficit are both witnesses. Alerts never trigger replacement for S3 loss. |
| - [ ] Enumerate producers before arming alarms. P2b EligibleBoxes remains outline, not a zero/dummy stream. Record per-iid diagnostic evidence: regional aggregate clock samples alone cannot prove every member reported. Test low-member memory, missing clock, hook failure, recovery and SNS region. No missing-data suppression that invents healthy capacity. |
| -- [ ] Extend actual simulation with boot/hook/response-loss/admission/first-direct-service hang and maintenance actions; retain I1–I6 and merged production predicates. Mutation pre-admission service and failed-health completion must fail; one serial nice-19 3,000-seed sweep per implementation revision. Do not model unmerged drain as complete. Run named metrics/budget/mock tests; no extra task review solely for metrics. |
| -- [ ] Complete census/whole-branch review and Task 8's first-service subsection under a dated scoped go. Reuse dev ingress or separately approved group ingress, set console full ingress **before** group publication, roll all readers first, verify exact SSM path reads with the actual box role, and show signed release/version and hapair service. No empty NLB acceptance. Only then land P3b-1 through amadan with exact-tip green CI; read main CI afterward. |
| +- [ ] Extend actual simulation with boot/hook/response-loss/admission/first-direct-service hang, pre-admission departure delivery/redelivery/failed boot, and both no-hook and Pending:Wait maintenance-return actions; retain I1–I6 and merged production predicates. Mutation pre-admission service and failed-health completion must fail; one serial nice-19 3,000-seed sweep per implementation revision. Do not model unmerged drain as complete. Run named metrics/budget/mock tests; no extra task review solely for metrics. |
| +- [ ] Complete census/whole-branch review and Task 8's first-service subsection under a dated scoped go. Reuse dev ingress or separately approved group ingress, set console full ingress **before** group publication, roll all readers first, verify exact SSM path reads with the actual box role, and show signed release/version and hapair service. No empty NLB acceptance. D1/D2 and the dated window are settled before build; P2b merge is **not** a prerequisite for this limited observation. Only then land P3b-1 through amadan with exact-tip green CI; read main CI afterward. |
| ### Task 7: Operator Standby roll and T1/I4 witness [own review: root/termination] |
| **Files:** later, separate `platform-infrastructure` branch: proposed `scripts/roll-region-group.sh`, proposed `scripts/tests/roll-region-group-test.sh` for fake-AWS/transport tests, `dev/region-ha-group.tf`, and `docs/superpowers/notes/2026-11-04-region-ha-p3b-dev-drill.md`. These are proposed private paths, not existing interfaces. This planning commission writes none of them. Platform changes, if needed by testing, remain in Task 4's reviewed guard. |
| -- [ ] Implement Task 4's phase machine as an attended operator command, with a durable root-on-operator-host record keyed by group and transaction, exclusive group lock and authenticated root delivery. All supported operators must share that serialized release entry; a second writer or lost record refuses before changes. Record before/after API intents and responses, exact iid, member set, artifact digests, permit state and target readback. Restrict operator IAM to named group UpdateASG/EnterStandby/ExitStandby and required describes; termination is separate scoped fault authority. No cron, daemon or box credential can run it. |
| -- [ ] Fake-provider failing-first `standby_roll_order`, `standby_response_loss`, `standby_resume`, `standby_shared_outage` cover every write boundary including operator death after Enter/ExitStandby and before restoring min. Refuse unsupported hand restarts **before** issuing systemctl stop. Validate staged signature and old local configuration before lowering minimum. Keep the same iid; do not refetch SSM to restart. A local-failure termination requires independent evidence and scoped authority. |
| -- [ ] Live witness, later approved: capture member IDs/activity counters; admit two members; roll one. Attempt unattended update and invalid permit (zero stop/repoint). In Standby black-hole S3+SSM, restart, drive direct/hop/door/tunnel/timer paths, hold >15 minutes, lose/recover operator connection. Require same iid, no extra launch/replacement/termination, no lifecycle completion, closed tenant admission. Restore access, re-admit/publish, return same iid and restore min=desired=max=2. Test rollback/recovery through the same guard. Then hang outside maintenance to prove genuine local failure still replaces. |
| -- [ ] Bound each operator wait to 15m, then alert and retain Standby/permit/record; no automatic timeout action. Run fake tests before scoped live go; mutate decrement=false, permit-before-Standby, blind desired reset, exit-on-timeout, ignored transaction lock (five). Warm multi-tenant drain/readiness claims wait for the outline below; a maintenance restart is not certification that duties drained. Record any held-request outage and remaining-lease wait, never promise seamless roll. |
| +- [ ] Implement Task 4's phase machine as an attended operator command, with a durable root-on-operator-host record keyed by group and transaction, exclusive group lock and authenticated root delivery through Session Manager (approved operator identity, exact instance ARN and approved shell session document; no SSH or agent-written permit). Keep `AmazonSSMManagedInstanceCore` on the group role and the parameter Denies intact. One session delivers/reads back the bounded permit and status; every reconnect is counted. All supported operators must share that serialized release entry; a second writer or lost record refuses before changes. Record before/after API intents and responses, exact iid, member set, artifact digests, permit state and target readback. Restrict operator IAM to named group UpdateASG/EnterStandby/ExitStandby/**CompleteLifecycleAction** and required group/member/target describes; scope completion to the same group ARN/tags as the boot adapter, and enforce iid/hook/CONTINUE-only/transaction binding in `return_member` where IAM cannot express it; termination is separate scoped fault authority. No cron, daemon or box credential can run it. |
| +- [ ] Fake-provider failing-first `standby_roll_order`, `standby_response_loss`, `standby_resume`, `standby_shared_outage`, `standby_exit_pending_wait` cover every write boundary including operator death after Enter/ExitStandby and before restoring min. Refuse unsupported hand restarts **before** issuing systemctl stop. Validate staged signature and old local configuration before lowering minimum. Exercise return CONTINUE success/loss/duplicate, operator restart in Pending:Wait, and stale original receipt: the rev 1 fake must time out/ABANDON, and rev 2 must complete exactly once on a successful response. Treat Pending:Proceed as an in-flight completed action, never complete it again. Keep the same iid; do not refetch SSM parameters to restart. A local-failure termination requires independent evidence and scoped authority. |
| +- [ ] After fake tests pass, the first live step is the no-software-change provider observation above; no actual roll without its recorded pass. Verify Task 3's effective OS masks/policy and absence of automatic patch/reboot associations. Live witness, later approved: capture member IDs/activity counters; admit two members; roll one. Attempt unattended update and invalid permit (zero stop/repoint). In Standby black-hole S3+SSM, restart, drive direct/hop/door/tunnel/timer paths, hold >15 minutes, lose/recover operator connection. Require same iid, no extra launch/replacement/termination, no lifecycle completion **while unready in Standby**, closed tenant admission. Restore access, re-admit/publish, use `return_member` (0 completions on documented live return; the separate fake exercises one return CONTINUE), return same iid and restore min=desired=max=2. Test rollback/recovery through the same guard. Then hang outside maintenance to prove genuine local failure still replaces. |
| +- [ ] Bound each operator wait in Standby to 15m, then alert and retain Standby/permit/record; no automatic timeout action. After Exit, never use this 15m wait for Pending:Wait: handle it immediately under the return contract. A lost operator may resume only with the durable action journal and current state; no duplicate Exit or completion after InService. Run fake tests before scoped live go; mutate decrement=false, permit-before-Standby, blind desired reset, exit-on-timeout, ignored transaction lock, original receipt suppresses return completion, completion before fresh admission, treating PreInService as InService (eight). Warm multi-tenant drain/readiness claims wait for the outline below; a maintenance restart is not certification that duties drained. Record any held-request outage and remaining-lease wait, never promise seamless roll. |
| ### Task 8: Dev approval and G2 drill card |
| **Files:** proposed private `dev/region-ha-group.tf` and `docs/superpowers/notes/2026-11-04-region-ha-p3b-dev-drill.md` for the card and evidence; platform evidence references them. Tests here are acceptance observations, not new production code. No live call is authorized by this plan. |
| -- [ ] Card names actual account id, eu-west-1 VPC/subnet/AZ/SSM/KMS/SNS/bucket ARNs, domains/fixture IDs, two group members, ingress ownership, max count/type/volume, IAM deltas, fault permissions, cost/UTC 24h window, cleanup owner and retained-versus-disposable resources. Set `CONSOLE_REGION_INGRESS` to full configured public set before publication; own-region hairpin uses only IE EIPs. Record G1 releases and P2b producer commits after merge. Refuse wrong pool, legacy fixture, unsupported sidecar, missing clock sandbox access, missing local admission or unverified namespace-reader roll. |
| +- [ ] Card names actual account id, eu-west-1 VPC/subnet/AZ/SSM/KMS/SNS/bucket ARNs, domains/fixture IDs, two group members, ingress ownership, max count/type/volume, IAM deltas, fault permissions, cost/UTC 24h window, cleanup owner and retained-versus-disposable resources. Set `CONSOLE_REGION_INGRESS` to full configured public set before publication; own-region hairpin uses only IE EIPs. Record the completed G1 switch-on evidence above and its release. For the full G2 addendum only, record P2b/S producer commits after they merge; do not make those a P3b-1 prerequisite. Refuse wrong pool, legacy fixture, unsupported sidecar, missing clock sandbox access, missing local admission or unverified namespace-reader roll. |
| +- [ ] Pin ingress alarm `expected_targets` explicitly: **2 before**, **4 during shared P3a ingress + two group members**, **2 after group removal**; both fixed targets stay registered even when their hapair pool is withdrawn. Count does not fall to 2 merely because fixtures are group-only. A separately approved dedicated group ingress uses 2 during and is removed at cleanup. Keep these thresholds during Standby: a >25m maintenance interval is expected to trip HealthyHostCount, including a >15m outage plus restore. Annotate and acknowledge that alarm with transaction id/window; do not disable delivery or change the ASG deficit alarm. Verify healthy/threshold readback and alarm recovery on return and cleanup. |
| - [ ] Read-plan the **whole private dev root** at the proposed pinned module revision, inventory fixed IE/IE-b/UK/standby drift, then make a targeted saved plan for named group resources/ingress changes only. Run JSON gate on the full target closure. The store-Deny fix is on this base; prove the selected module revision includes it and no saved plan restores the Deny. Do not apply incidental fixed user_data/IAM/SG/EIP drift. First flagship module bump later must also pass the moved-state/fixed gate; no flagship change here. |
| - [ ] First-service sequence: verify baseline fixtures born HA/nested and hapair-only reconciliation/placement/import; preserve fixed scopes until the approved group-only phase. Observe Pending:Wait with each readiness fact withheld, direct signed backhaul refused, real first Receive acknowledgment, full readiness, CONTINUE/receipt, admission publication, InService/healthy, then GET/POST/WebSocket/version via each EIP from outside VPC. Console remains fixed, with its existing unit stamp before any fixed admission roll. Verify DNS guidance never offers transient group public box addresses. |
| - [ ] **G2 failure matrix:** (1) terminate one disposable admitted member; (2) hang health/agent; (3) hang immediately after first successful service reached by direct backhaul; (4) black-hole S3 on a live admitted member. For 1–3 capture health exclusion, termination proof, lease expiry, replacement boot, first200 and data loss per replication class. For 4 require health200, same iid, no automatic replacement; alarm then separately scoped operator termination. Measure §9.8 phases separately; N-HA9 waits the remaining lease, no early takeover. An initial failed boot reaches ABANDON/termination notification without live Pending buildup. All-unhealthy NLB still cannot bypass local admission. |
| -- [ ] Also run concurrent cold wakes (one writer), no-visitor synced timer/departure recovery using merged T, own-region hairpin for approved callers, outside-VPC ingress and signed cross-region backhaul, 30s deregistration, T1/I4 Task 7 witness and **disposable-only** EIP mapping rehearsal. Drain/role/default rollback/readiness and native-sidecar recovery remain blocked outline until their producers merge; missing items prevent full G2, even if the four fault injections pass. Record loss around one second only for stream DB; other classes up to their configured interval. |
| + |
| +For drills 1–3, use these **acceptance limits derived from §9.8's estimates**, not a new availability SLA. Define `t0` as confirmed fault injection, `L=max(0, recorded lease expiry−t0)`; log last renewal, expiry and clock uncertainty. Probe every second with request IDs and serving iid; use server logs to account for reused connections as well as new ones. Pre-existing long requests are closed/quiesced before the fault so the failed-iid count is testable. |
| + |
| +| Drill | Numeric pass criteria | Cleanup before another fault | |
| +|---|---|---| |
| +| 1: terminate admitted member | NLB excludes failed target ≤30s from t0; first successful HA request ≤L+180s from t0; termination proof required before takeover. | Confirm terminated iid, replacement's hook/receipt/admission, two healthy group members and no excess member. | |
| +| 2: hang admitted agent/health | Exclusion ≤30s; replacement launch starts ≤180s from t0 (60s grace +120s allowance); first200 ≤L+180s. Record exclusion, termination, event, boot and restore separately. | Verify hung iid terminated and replacement admitted; if fault is aborted before termination starts, SIGCONT only that exact iid under the card and verify its state before any further action. | |
| +| 3: hang immediately after first direct-backhaul service | Capture that first200 and hang at once; same ≤30s exclusion, ≤180s replacement-start and ≤L+180s recovery bounds, including the initial 60s grace. | Same exact-iid termination/SIGCONT checks as drill 2; no lingering hung process or pending lifecycle action. | |
| + |
| +All three also require **zero successful requests served by the failed iid after exclusion**, one writer/acquirer per lease generation with monotonically increasing generations, and no takeover before proof **and** expiry. Feed acknowledged numbered writes continuously and compare restored data: stream DB committed-write loss **≤1s**; every other replication class **≤its recorded configured publish/snapshot interval**. A class without a stated interval/bound or an unmeasured restore is not a pass. Missing samples or any exceeded bound means **FAIL**: stop further injections, remove faults, restore verified fixture service, keep required resources, and report phases/loss/remaining blocker; never weaken the limit after observing it. After each run, sleep fixtures cleanly through the API and verify marker/debt state. No full G2 claim until every row and the outlined producers pass. |
| + |
| +- [ ] Observe accepted CONTINUE with lost response/receipt separately from failed boot: initial box may be InService while local admission remains closed, then is health-replaced. Record this expected conservative outcome in P3-C3 diagnostics, the timeline and launch counters; no false boot-failure label or accumulating Pending instance. Maintenance uses the distinct return contract and never infers fresh admission from this case. |
| +- [ ] Also run concurrent cold wakes (one writer), no-visitor synced timer/departure recovery using merged T, own-region hairpin for approved callers, outside-VPC ingress and signed cross-region backhaul, 30s deregistration, T1/I4 Task 7 witness and **disposable-only** EIP mapping rehearsal. Drain/role/default rollback/readiness and native-sidecar recovery remain blocked outline until their producers merge; missing items prevent full G2, even if the four fault injections pass. Use the numeric loss limits below; record the configured interval for each non-stream class before injecting a fault. |
| - [ ] Evidence includes exact release and module SHAs, UTC fault/termination/expiry/restore/first200, hook/receipt/admission, request counters, loss windows, alarm delivery/recovery, pool inventory and per-box clock/sandbox result. Check the follow-up list's retained-edges alert subject and recreated-fixed-ref restrictions; do not replace immutable fixed identity records. P3 supplies no fixes to those unrelated follow-ups. |
| -- [ ] Rollback/cleanup: remove faults first; restore fixed hapair scope and verified fixture service before removing group capacity. Stop/sleep fixtures through supported API; if state/debt cannot be verified, keep resources and alert, never declare drain by zero process count. No retained group implies explicitly approved teardown of only experiment ASG/template/targets/alarms/parameters/new allocations. If ingress is reused, remove group attachments/resources and restore fixed target/expected-count state, **retain P3a NLB/EIPs**. If ingress is new, unprotect only named disposable allocations via a reviewed cleanup-only module copy, run saved-plan cleanup manifest gate, destroy, then discard that copy. Never delete bucket/shared identity/pre-existing EIP. Rollback readers only after group publishers are gone and their namespace evidence is safely retired. Record any operator-held Standby resource beyond expiry and obtain expanded duration approval; expiry never authorizes replacement. |
| +- [ ] Rollback/cleanup: remove faults first; restore fixed hapair scope and verified fixture service before removing group capacity. Stop/sleep fixtures through supported API; if state/debt cannot be verified, keep resources and alert, never declare drain by zero process count. No retained group implies explicitly approved teardown of only experiment ASG/template/targets/alarms/parameters/new allocations. If ingress is reused, remove group attachments/resources and restore fixed target/expected-count state, **retain P3a NLB/EIPs**. If ingress is new, unprotect only named disposable allocations via a reviewed cleanup-only module copy, run saved-plan cleanup manifest gate, destroy, then discard that copy. Never delete bucket/shared identity/pre-existing EIP. The rollback command must read back zero active group members (including Standby/Pending), no group TG registrations and a complete deployment edges inventory with no active/retained group names before permitting a pre-`names-2` binary. Use normal evidence-safe retirement, not an age-only purge. Any surviving publisher, retained namespace or incomplete readback refuses the downgrade; keep the upgraded readers. Restore and verify the console version too. Record any operator-held Standby resource beyond expiry and obtain expanded duration approval; expiry never authorizes replacement. |
| ## Integration still waiting on main |
| @@ -186,20 +236,21 @@ Count logical API attempts, including failures, and wire attempts including SDK |
| | Path | Logical attempts / retry bound | |
| |---|---| |
| | Quiet roles | Existing 2G/30m = **4G/box/h**; no-op tick 0. Startup or changed scope exactly 2G, no LIST. Error backoff 5/10/20/40/60s then ≥60s, ≤128G/h including burst; runtime wire ≤r×. Group adds no new role cadence. | |
| -| Effective publication | Existing replacing helper ≤3(G+P), successful mutation index ≤4(G+P): success normally 2G+2P, ceiling **7G+7P**; unsuccessful three CAS operations ≤3G+3P, no index. Booting+admitted normally 4G+4P, ≤14G+14P; failed later retries charged anew. Receipt/permit 0S3. | |
| +| Effective publication | Existing replacing helper ≤3(G+P), successful mutation index ≤4(G+P): success normally 2G+2P, ceiling **7G+7P**; unsuccessful three CAS operations ≤3G+3P, no index. Booting+admitted normally 4G+4P, ≤14G+14P; failed later retries charged anew. Receipt/permit 0S3. `names-2` adds bytes only; GroupReadersReady uses the existing cached fold, 0 extra GET/LIST and 0 group PUT while refused. | |
| | Reader fan-out | Each coalesced mutation ≤ceil(B/1000)L+B G per reader at next existing fold; sustained bound ≤120×(ceil(B/1000)L+B G)/reader/h. B readers multiply this; no separate roles LIST. Keep original timed-write baseline separate. | |
| | Bootstrap + install binaries | Bootstrap named/versioned object **1G**. Fresh no-floor install **4G** (pointer, two absent floors, artifact); published floor **5G** (plus signed identity). Total **5G or 6G**, 0P/L/D, retries=1 per call in the bounded boot path. Already-installed release omits artifact. Failures count attempted reads and stop. Existing reconcile/certs/identity/escrow reads are measured separately, not hidden in this line. | |
| | SSM boot | One GetParameters for key/hash; shared/regional nonrecursive pages at MaxResults=10: max(1,ceil(S/10))+max(1,ceil(R/10)) for ordinary pages, hard **20 pages/100 env values** including empty-token pages; one separate ingress GetParameter. **≤22 calls**. KMS service decrypt work is charged per returned SecureString occurrence (including duplicate/empty-page retry behavior), ≤103 on a successful nonduplicate path including 3 boot/ingress values; box makes 0 KMS write/direct decrypt calls. No boot retry loop after failure. | |
| | Metadata/config | First root identity fetch budgets token + document + signature (3; `internal/host/boxrecord.go:32,65`), address adapter token + public/local/mac/VPC-CIDR (5): **≤8 IMDS HTTP requests**, failures stop; reuse cached identity where available. SDK credential retrieval/refresh is existing infrastructure overhead, recorded separately. 0 EC2 membership describes. Root snapshots avoid new metadata requests on hairpin/health/request paths. | |
| -| Launch completion | Successful launch **1 CompleteLifecycleAction**. Total ≤4 attempts/launch, SDK=1, 2s each, backoff 1/2/4s, persisted exhaustion, original 900s deadline. Explicit initial ABANDON consumes this same budget; default ABANDON needs 0 box calls. Valid receipt maintenance restart **0** box ASG calls. | |
| -| Operator maintenance | Normal four writes: lower min, EnterStandby(decrement), ExitStandby, restore min. SDK=1; ambiguous write requires readback, no blind retries. One invocation ≤2×180 read rounds, at 5s for each ≤15m wait; each ≤1 DescribeAutoScalingGroups + 2 DescribeTargetHealth = **≤1,080 reads**. Entry validation is first round. Return with record at timeout; resumed invocation counted anew. No box runtime polling. Artifact staging uses the separate bounded boot/release fetch budget. | |
| -| Termination | Existing consumer ≈180 empty Receive/h/box, SDK=1; event/redelivery receives and Deletes extra. Initial ≤1 GetQueueAttributes, no GetQueueUrl/heartbeat/second consumer. Confirmation ≤1 Describe/iid/10s on suspicion, 0 healthy-path describes. P3b increment **0**. | |
| +| Launch completion | Successful initial launch **1 CompleteLifecycleAction**; total ≤4 attempts/launch, SDK=1, 2s each, backoff 1/2/4s, persisted exhaustion, original 900s deadline. Initial ABANDON shares that total; default ABANDON costs 0 box calls. Valid receipt maintenance restart: **0 box ASG calls**, solely suppressing the original action. Return completion is operator-owned and charged separately below. | |
| +| Operator maintenance / provider probe | Normal **4 writes**: lower min, EnterStandby(decrement), ExitStandby, restore min. Documented return: 0 completions; synthetic/divergent Pending:Wait: **+1 successful CompleteLifecycleAction**, ≤4 attempts/return transaction (2s, 1/2/4s backoff), persisted across resume, SDK=1. Ambiguous mutation requires readback, never blind replay. ≤2×180 read rounds per invocation, 5s spacing, each ≤1 DescribeAutoScalingGroups +1 DescribeAutoScalingInstances +2 DescribeTargetHealth = **≤1,440 reads**. Pre-completion/resume readbacks consume this bound; a known Pending:Wait is handled immediately, not after a 15m wait. Provider probe is a separately counted invocation. Divergence recovery adds ≤1 min-lowering write if already restored, then ≤1 EnterStandby(decrement) and Standby readback; no termination. No box runtime poll. Release staging uses its bounded fetch budget. | |
| +| Session Manager maintenance | Per invocation: normally **1 StartSession +1 TerminateSession**; at most 4 connections/reconnections, each charged as StartSession or ResumeSession plus TerminateSession: **≤8 SSM API attempts**, SDK=1. Local status/permit messages share the authenticated stream; ≤360 status samples inside the operator read-round cap, 0 parameter GETs on restart. Channel reconnect/stream traffic is logged separately. On connection loss before Exit, retain Standby. A resumed invocation has its own stated budget; no hidden reconnect loop. | |
| +| Termination | Existing consumer ≈180 empty Receive/h/box, SDK=1; event/redelivery receives and Deletes extra. Initial ≤1 GetQueueAttributes, no GetQueueUrl/heartbeat/second consumer. Confirmation ≤1 Describe/iid/10s on suspicion, 0 healthy-path describes. No extra consumer per box; **two new group boxes add ≈360 empty Receive/h** on their distinct shared queue, plus ≤2 startup Attributes reads. Closed-member receipts are not deleted; 120s visibility redeliveries add actual Receive/scan work. Fixed-box queues/polls unchanged. | |
| | Departure import | Retain T's actual budget, not P3's earlier abbreviated estimate: **(U+E+2N+4A+W+Q+F)G+(2A+1)P**, then completion 1D+k(G+P), k≤4. N inventory hosts, A imports, W wake objects, Q changed manifests, U identities, E edges refreshes, F proof reads. Retry/rescan attempts add their real counts; shared queue may duplicate receiver work. No new scan tick. | |
| | Metrics | Existing ≤60 PutMetricData/h/box; extra group datums in same call, 0 S3. Pin group metric client SDK=1, so ≤60 wire submissions/h. Fixed client untouched. Console P2b separately owns ≤60 regional publishes/h and observation reads; no invented 0-read observation. | |
| | Health, starts, names, hairpin | **0 S3/SSM/EC2/ASG calls**. NLB nominal 720 checks/target/h across two TGs is not a hard HTTP ceiling (distributed consensus). Twenty simultaneous closed-box requests cause zero acquire/start/completion work. | |
| -| Plan/apply and drills | Local mocks 0 account calls. Later provider refresh/apply and operator fault/verification reads have saved-plan/card counts, separate from runtime. No account-backed request made while drafting. | |
| +| Plan/apply and drills | Local mocks 0 account calls. Later provider refresh/apply and operator fault/verification and rollback inventory reads have saved-plan/card counts, separate from runtime. Publisher-retirement proof costs one complete `ceil(B/1000)L+B G` edges read plus ≤1 group/member and two TG describes per check; retries counted, no readback-error-as-empty. No account-backed request made while drafting. | |
| -`TestGroupBootRequestBudget` counts no-op/error/absence, SSM empty pages, index conflicts, failed edges CAS, duplicate callbacks, lost completion, persisted exhaustion and receipt restart with transport instrumentation. Runtime S3 baseline remains about 3,300–3,500 calls/box/h; adding boxes adds that baseline, even when P3b's extra path costs zero. S3 allowances are spec §18's $0.0004/1,000 G, $0.005/1,000 P/L, D free. Charge SDK retries too. |
| +`TestGroupBootRequestBudget` counts no-op/error/absence, SSM empty pages, index conflicts, failed edges CAS, duplicate callbacks, lost completion, persisted exhaustion, closed-member redelivery/no-ack, original receipt restart, return-action completion and operator resume with transport instrumentation. Runtime S3 baseline remains about 3,300–3,500 calls/box/h; adding boxes adds that baseline, even when P3b's extra path costs zero. S3 allowances are spec §18's $0.0004/1,000 G, $0.005/1,000 P/L, D free. Charge SDK retries too. |
| ## Planning costs |
| @@ -218,7 +269,7 @@ USD, 730h/month, two AZs. P3's “Cost per region” retains NLB+two EIP monthly |
| | S3/SQS/SNS/SSM/KMS, modest logs/traffic and churn reserve | card-specific | $1.00 | |
| | **24h planning total / proposed spend ceiling** | | **$2.9652 / $5.00** | |
| -Compute/storage rates above are rounded **planning allowances, not a live regional quote**. Module `variables.tf:16,21` supplies no defaults; the cited private dev roots supply t4g.micro/20 GiB. Confirm boot and fixture capacity before approving; resize is a new scoped choice, never an automatic workaround. Standard CPU-credit mode avoids an unpriced Unlimited burst assumption; pin it for the drill. Nine series comprise two original memory/PSI per iid, two regional admission/clock, three group memory/clock/admission. Each replacement adds two new per-iid series; eleven alarms reserve ingress six, queue, ASG deficit, group memory, group clock and later EligibleBoxes. Metric batching saves requests, not series charges. No free-tier credit assumed. Replacement overlap, unused EIPs/Standby boxes and retention beyond 24h still cost money; stop faults and alert before the cap, never terminate merely to enforce a cost timeout. |
| +Compute/storage rates above are rounded **planning allowances, not a live regional quote**. Module `variables.tf:16,21` supplies no defaults; only `host_ie_b` still supplies t4g.micro/20 GiB at the refreshed private main. Group boxes run no console. An edge OOM with Restart=no causes replacement, so D3 requires a boot/fixture memory witness before accepting micro. Confirm boot and fixture capacity before approving; resize is a new scoped choice, never an automatic workaround. Standard CPU-credit mode avoids an unpriced Unlimited burst assumption; pin it for the drill. Nine series comprise two original memory/PSI per iid, two regional admission/clock, three group memory/clock/admission. Each replacement adds two new per-iid series; eleven alarms reserve ingress six, queue, ASG deficit, group memory, group clock and later EligibleBoxes. Metric batching saves requests, not series charges. No free-tier credit assumed. Replacement overlap, unused EIPs/Standby boxes and retention beyond 24h still cost money; stop faults and alert before the cap, never terminate merely to enforce a cost timeout. |
| Primary pricing references (public pages, no account calls): [https://aws.amazon.com/ec2/autoscaling/pricing/](https://aws.amazon.com/ec2/autoscaling/pricing/), [https://aws.amazon.com/ec2/pricing/on-demand/](https://aws.amazon.com/ec2/pricing/on-demand/), [https://aws.amazon.com/ebs/pricing/](https://aws.amazon.com/ebs/pricing/), [https://aws.amazon.com/vpc/pricing/](https://aws.amazon.com/vpc/pricing/), [https://aws.amazon.com/cloudwatch/pricing/](https://aws.amazon.com/cloudwatch/pricing/). NLB regional offer URLs and their original price date are in P3. Refresh the scoped card before go; these are not authorization to spend. |
| @@ -230,7 +281,7 @@ Inventory **every added literal** under these rows before writing product/ops pr |
| | ID | Destination | Required meaning | |
| |---|---|---| |
| -| P3-C3 | group boot/config/admission/receipt diagnostics | Phase, missing fact, exhausted/unknown completion, corrupt/mismatched receipt; distinguish failed initial launch from operator-held maintenance. No secrets/raw env. | |
| +| P3-C3 | group boot/config/admission/receipt diagnostics | Phase, missing fact, exhausted/unknown completion, corrupt/mismatched receipt; distinguish a failed initial launch, accepted CONTINUE with lost response/receipt (InService but locally closed, replacement expected), and operator-held maintenance. No secrets/raw env. | |
| | P3-C4 | Terraform validations/outputs, plan gate, module README | Explicit mode/count/AZ/type inputs, protected fixed/EIP ownership, claim-free config, version pin, no unattended refresh, cost/cleanup and public-443 exception. Inventory each error and description. | |
| | P3-C5 | alarm descriptions/notifications and runbook | Actual producer, unknown/recovery, remaining lease and class-specific loss; S3 failure requires operator decision, never automatic replacement. | |
| | P3-C7 | private dev card/roll/drill/cleanup guide | Exact scope/window/owner, first-service versus G2, Standby recovery, retained resources/cost, no production retirement. | |
| @@ -238,13 +289,13 @@ Inventory **every added literal** under these rows before writing product/ops pr |
| | P3b-C9 | root permit/maintenance command diagnostics | Refuse before stop; exact phase/action needed, concurrent/stale/wrong-identity permit, operator-held timeout; no suggestion to force replacement on dependency error. | |
| | P3b-C10 | hairpin listener/rule diagnostics | Missing public identity or unsupported kernel/egress path refuses; no header-trust workaround. Public responses disclose no internal topology. | |
| | P3b-C11 | host-env option help/CLI docs | Group-only claim-free allowlist, explicit pools/regions, safe boot selection; existing fixed mode preserved. | |
| -| P3b-C12 | first-slice refusal and G2 evidence summary | P2b/drain/sidecar producer missing, desired role versus applied status, experiment versus completed gate. | |
| +| P3b-C12 | first-slice refusal and G2 evidence summary | Limited first-service slice accepted separately from missing P2b/drain/sidecar producers and full G2; mixed-reader refusal, required versions, desired role versus applied status. | |
| P3-C1/C6 role/drain product copy stays P2b-owned outline. Protocol field/metric/reason-code names are data. Product strings, operator shell messages, usage/errors, tofu descriptions, comments explaining new operations and docs all get inventoried; this deck does not preapprove invented text. |
| ## Census and verification |
| -This commission changes Markdown only: no census overlay now. Implementation root inputs include group marker, maintenance permit, immutable boot settings, SSM bootstrap/hash/ingress, host.env, nft config and unit drop-in. Root must never consume agent-owned admission receipt or tenant-selected paths. Trace all root readers and writers of their inputs, not just direct filesystem calls; IAM and every regular infra file are in scope. |
| +This commission changes Markdown only: no census overlay now. Implementation root inputs include group marker, maintenance permit, immutable boot settings, SSM bootstrap/hash/ingress/queue URL, host.env, OS update policy, nft config and unit drop-in. Include Session Manager permit delivery and the reader-rollback guard in the authority review. Root must never consume agent-owned admission receipt or tenant-selected paths. Trace all root readers and writers of their inputs, not just direct filesystem calls; IAM and every regular infra file are in scope. |
| For each actual slice: `make census-card`; write tab-separated CLAIMS; `make census-propose NAME=region-ha-p3b CLAIMS=<owned-file>` for P3b-1 (later slices use distinct names rather than rewriting a merged overlay). Run targeted `nice -n 19 go test ./internal/provision -run 'TestPlan14RootReadCensus|TestCensusScopeIsTheRootBinary|TestPlan14RootInputInventoryCoverage|TestCensusRebaseCarriesDispositions' -count=1`. Independent Opus reviewer for a Codex author approves every unit/envelope against amadan main, citing lines; record reviewer, exact tip and verdict on #280. No Paul census escalation; no archive edits. Preserve 9B8 record-write checks. |
| @@ -252,24 +303,47 @@ Implementation uses failing-first named tests and bounded risky mutations, mock |
| ## Open decisions for Paul |
| -1. **D1 — activation window and G1 boundary (S1/rules 5–6).** **Wait for merged P2b and recorded G1, then name a UTC dev window (Recommended):** preserves §19 and permits a useful first group merge without guessing P2b interfaces. Alternative: explicitly authorize a limited pre-G1 group experiment and amend the rollout ruling; that changes the spec and is not decided here. Either option still requires the complete scoped card, named operator, permission/traffic effects and cleanup. |
| -2. **D2 — initial roles and missing operator features (R1/H4/I3).** **Serve-only initial group acceptance using existing default/absence; keep role transitions, drain, readiness and full G2 blocked until their producers merge (Recommended):** the reader works today without an unauthorized writer; no dummy drained acknowledgment. Alternative: hold all group work until those producers merge. If an existing role is drain/platform or unknown, refuse activation without rewriting it. The recommendation limits the initial visible slice, not the eventual required capability; Paul must choose it before build acceptance. |
| -3. **D3 — resources and retention (S1/H5).** **Two t4g.micro/20 GiB boxes, hapair-only existing IE bucket, ≤24h, $5 planning ceiling, destroy temporary resources after evidence (Recommended):** matches checked dev roots and isolates tenants. Reuse P3a ingress if its ownership/card permits. Alternative: approve larger boxes or a retained proving group with revised measured cost/duration. Capacity failure is a stop, not permission to resize. Actual account/resource IDs and date are still unverified. |
| +1. **D1 — activation window and acceptance boundary (S1/rules 5–6).** **Approve the limited pre-P2b P3b-1 first-service experiment on the recorded G1 switch-on, and name its UTC window before implementation starts (Recommended):** a visible main-only slice does not need the role/readiness writer; full G2/G3 still waits for P2b, drain and slice S. Record this explicit staging exception to §19's literal all-P1b/P2 prerequisite; it is not a claim that full G1 functionality exists or authorization inferred from the earlier G1 card. Alternative: require the complete §19 prerequisite and hold the build until those producers merge, naming their expected merge and the later dev window. Both options require the scoped account/resource/permission/traffic/cost/cleanup card. No date or exception is assumed here. The P3b-2 provider probe must precede any actual Standby software roll; divergent behavior blocks that slice independently of P3b-1. |
| +2. **D2 — initial roles and missing operator features (R1/H4/I3).** **Serve-only initial group acceptance using existing default/absence; keep role transitions, drain, readiness and full G2 blocked until their producers merge (Recommended):** the reader works today without an unauthorized writer; no dummy drained acknowledgment. Alternative: hold all group work until those producers merge. If an existing role is drain/platform or unknown, refuse activation without rewriting it. The recommendation limits the initial visible slice, not the eventual required capability; Paul must choose it before implementation starts. |
| +3. **D3 — resources and retention (S1/H5).** **Two t4g.micro/20 GiB boxes, hapair-only existing IE bucket, ≤24h, $5 planning ceiling, destroy temporary resources after evidence (Recommended):** matches the remaining micro peer, omits the console and isolates tenants. Sophie is now t4g.medium after OOM; require measured cold-boot plus worst-fixture memory headroom (≥15%) on micro before acceptance. With Restart=no, edge OOM causes replacement, not a quick process restart. Reuse P3a ingress if its ownership/card permits. Alternative: approve larger boxes or a retained proving group with revised measured cost/duration. Capacity failure is a stop, not permission to resize. Actual account/resource IDs and date are still unverified. |
| 4. **D4 — sidecar acceptance (I6/N1).** **Keep the real sidecar hairpin witness on the root runner now; require merged native-sidecar producer and a scoped born-HA fixture for the live sidecar/G2 witness (Recommended):** avoids adding a legacy sidecar to a born-HA-only fault set or claiming unsupported duty recovery. Alternative: approve a narrowly separated disposable legacy-sidecar network-only experiment, removed and verified absent before termination/drain drills; this is an explicit topology exception, still no native-sidecar failover claim. Skipping sidecar hairpin entirely is not completion of scope. |
| N-HA14 is decided; no new maintenance exception or §10 change is requested. Any later kernel-layout refusal, fixture exclusion or loss of user-visible capability must return as a decision, never become an author's silent cut. |
| +## Round 1 dispositions |
| + |
| +| Finding / invariant | Disposition | Change / witness | |
| +|---|---|---| |
| +| P1-1 — T1/I4 | **Changed** | AWS hook-availability footnote explicitly excludes Standby, so decline the unconditional provider premise. Accept the missing-state defense: one operator return owner, separate action journal/receipt scope, fresh admission, mandatory Pending:Wait fake that fails rev 1, and first-live-step observation/refusal on divergence. Tasks 4/7 and revised request budget. | |
| +| P2-1 — H4/A1 | **Accepted** | `names-2`, shared cached complete-peer predicate before publication/completion, console version check, mixed-reader mutation and rollback readback that refuses surviving publishers/names. Tasks 1/8. | |
| +| P2-2 — I6/E1 | **Accepted** | Group-owned queue/rule/target/anti-forgery policy, group SSM URL and exact-scope tests; fixed queues unchanged. Shared deliveries/redeliveries budgeted. Task 2. | |
| +| P2-3 — A1/I6 | **Accepted, option (a)** | Receive/journal may start, import/finalize/ack may not; gate all shortcuts, preserve Started, prove redelivery and boot-failure cases in production wiring and simulation. Tasks 3/6. | |
| +| P2-4 — T1/I4 | **Accepted** | OS automatic update/reboot/restarters disabled; rendered-init test and live effective-policy check; all attended OS work uses Standby. Tasks 3/7. | |
| +| P2-5 — G2/I4/I5 | **Accepted** | Numeric exclusion/replacement/recovery, one-writer and replication-loss limits, explicit FAIL and per-fault cleanup. Task 8. | |
| +| P2-6 — S1 | **Changed** | Record completed G1 switch-on including later item 8; P3b-1 has no executable P2b dependency. D1 explicitly requests the limited staging exception and dated window **before build**; full G2 retains named missing producers. | |
| +| P3-1 — evidence | **Accepted** | Corrected existing file to `internal/groupadmission/observation.go`. | |
| +| P3-2 — S1/capacity | **Accepted** | Private merged main 80d20c4: sophie medium, leo micro. D3 keeps conditional console-free micro recommendation, headroom witness and OOM→replacement consequence. | |
| +| P3-3 — N1/E1 | **Accepted** | Session Manager named as permit/status transport; retain managed attachment with Denies, exact operator target/document scope and connection budget. Tasks 2/4/7. | |
| +| P3-4 — E1 | **Accepted** | Enumerated inherited DNS-01/conditional steering and excluded console cost/mail/store/scan policies; combined-policy exact-scope witness. Task 2. | |
| +| P3-5 — A1 | **Accepted** | Initial accepted-but-unrecorded CONTINUE is a distinct observed case and P3-C3 diagnostic; maintenance return has separate readback semantics. Tasks 3/8. | |
| +| P3-6 — I4/observability | **Accepted** | Expected HealthyHostCount alarm during long Standby recorded/acknowledged; no suppression or ASG deficit change. Task 8. | |
| +| P3-7 — S1/observability | **Accepted** | Reused ingress expected_targets **2→4→2**; dedicated option 2. Pool withdrawal does not change target count. Task 8. | |
| + |
| +## P3 follow-ups |
| + |
| +None left from P3b R1: all seven are incorporated above. The previously recorded `docs/superpowers/notes/region-ha-followups-p3.md` remains separate; no new review round for those items. |
| + |
| ## Self-review |
| | Brief scope / requirement | Coverage / honest limit | |
| |---|---| |
| | Group mode, group IAM, automatic claim-free boot | Tasks 2/3, initial hook order and fixed-state/IAM witnesses. No live plan or boot verified here. | |
| | N-HA14 exception, Standby, root guard, Restart=no | Verbatim companion spec edit; Tasks 4/7. No unattended update; shared outage never authorizes replacement. | |
| -| Hook adapter, receipt, ABANDON, no Pending accumulation | Task 3 crash matrix/persisted four-attempt budget and Task 8 timed evidence. | |
| +| Hook adapter, receipt, ABANDON, no Pending accumulation | Task 3 initial crash matrix/budget; provider evidence and Tasks 4/7 separate return ownership; Task 8 timed evidence. | |
| | Verified client hairpin, no proxy-trust expansion | Task 5 pins address provenance and kernel original-destination checks; all callers, both ports, real root witness required. | |
| | Dev IE count=2/hapair-only | Scope, Tasks 6/8, D1–D4. Module has no type default; private root evidence is explicitly separate. | |
| | G2 four faults plus T1/I4 | Tasks 7/8, §9.8 timing and N-HA9 expiry; P2b/drain/native-sidecar pieces are named blockers, not fake executables. | |
| -| Booting names and mixed-reader rollout | Task 1 preserves authority in one helper; actual main disproves a general empty-name claim. Guard covers every name class; all readers upgraded first. | |
| +| Booting names and mixed-reader rollout | Task 1 preserves authority in one helper; actual main disproves a general empty-name claim. Guard covers every name class; capability checks enforce boot/admission refusal and rollback checks enforce publisher retirement. | |
| | Rulings, request/cost/copy/census/review budgets | Dedicated tables; no new per-box poll; P3 closed history retained, P3b max three rounds. No review verdict claimed. | |
| -**Unverified:** deployed resource IDs/configuration and G1 status, effective live IAM, root kernel egress/original-destination behavior, boot timing/fit on t4g.micro, regional price quote, real alarm delivery and P2b/S interfaces not on the citation base. These remain explicit build/activation gates. This draft finishes after its two-file local commit and is ready for the controller's Opus R1 brief. |
| +**Unverified:** current deployed resource IDs/configuration and continued live G1 state (the switch-on itself is recorded done), effective live IAM, ExitStandby behavior in the exact dev ASG, root kernel egress/original-destination behavior, boot timing/fit on t4g.micro, regional price quote, real alarm delivery and P2b/S interfaces not on the citation base. These remain explicit activation gates. This revision finishes after its one-plan-file local commit and is ready for the controller's Opus R2 brief; no new verdict, push or live call is claimed. |