region HA G2: main-only addendum to P3b Task 8, with rulings
The named main-only addendum for the G2 drills on main (v0.34.5 base), with Paul's 2026-11-05 rulings: G2 = the four I4 drills plus the riding rows; T3 and T8 built on region-ha-g2-prep; Task 8 pass conditions kept verbatim. Opus review READY after three rounds (#421). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from region-ha-g2-addendum into main.
1 file changed,
+125
−0
docs/superpowers/notes/2026-11-05-region-ha-g2-addendum.md+125 −0
CI passed — run details
diff --git a/docs/superpowers/notes/2026-11-05-region-ha-g2-addendum.md b/docs/superpowers/notes/2026-11-05-region-ha-g2-addendum.md| new file mode 100644 |
| index 000000000..a4741e390 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/2026-11-05-region-ha-g2-addendum.md |
| @@ -0,0 +1,125 @@ |
| +# Region HA G2: the main-only addendum to P3b Task 8 |
| + |
| +Date: 2026-11-05. Status: **for review, not merged.** It changes no code and authorizes no live call. |
| + |
| +Plan: `docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md`, Task 8 ("P3b-3, G2 evidence"). Task 8 runs only "after the named main-only addendum and scoped go". This note is that addendum. It does three things: |
| +- names what is on main today, so the drill card cites real producers instead of outlines; |
| +- records the rulings made since the plan was written; |
| +- lists what the drills still lack, with owners. |
| + |
| +Spec: `docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md` rev 6.2, §9.8, §19 and §21. The operational card (exact ids, counts, windows) is private and lives with the dev records; this note is its public contract. |
| + |
| +## 1. Base |
| + |
| +Main at **e129f535** (released to dev as v0.34.5; not on flagship). Producers on that base: |
| + |
| +| Producer | State on main | Task 8 use | |
| +|---|---|---| |
| +| P1a, P1b-1, P1b-2, P1b-3a, P1b-3b slice T (9b8b2c50) | merged | takeover after confirmed termination and expiry (N-HA9); departure scan and import; durable termination proof (N-HA16) | |
| +| P2a (f2810fdc) | merged | HA create door; move and import refusals (§14) | |
| +| P2b-1 (bb8973d1) | merged | create-time capacity evidence and `Carlos/Region EligibleBoxes` from console start | |
| +| P3a (016599d5) | merged | dev NLB ingress, opt-in admission on the fixed pair, plan gate | |
| +| P3b-1 (5c3e3fe5, fixes f6f91e2a, 2914921c, 9dad8707) | merged | group mode, launch hook, claim-free boot, names-2, restart guard, hairpin rules, group alarms | |
| +| P3b-2 (e129f535) | merged | attended Standby rolls; the tool never completes a lifecycle action | |
| + |
| +Not on main: |
| + |
| +| Producer | Where | Effect on G2 | |
| +|---|---|---| |
| +| P1b-3b slice S (native sidecars born HA) | branch `region-ha-p1b3b-s-build`, in task review | sidecar recovery rides drill 1 only if S is merged and in the release the group runs | |
| +| P3b-2 operability (probe driver, session document, fault harness) | build in progress | the S3-loss drill reuses the fault harness | |
| +| P2b-2 (desired-role writer, readiness diagnostics) | plan only; dev slot 2026-11-11 | no role or drain drill | |
| +| Drain completion producer (`EnqueueDrained`) | no plan | no drain drill | |
| +| Suspect-holder page (§20) | not built | see §4, T3 | |
| + |
| +## 2. Rulings since the plan |
| + |
| +These replace the plan text they name. All are recorded on #421. The §4 acceptance ruling also replaces the full-G2 prerequisite in `docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:42`. |
| + |
| +1. **One shared dev group** (Paul, 2026-11-05). The group provisioned for P3b-2's windows A and B stays up and carries the G2 drills. N-HA19/D3's 24 h and $5 cap is lifted for this group (about $1 a day). The $5 card cap remains per drill window, on top of the group's running cost. Its shape is unchanged: two t4g.micro members, 20 GiB roots, two zones, pool `hapair` only. Task 8's "two disposable members" means this group. |
| +2. **Standing go for dev windows** (Paul, 2026-11-05). A dev-only window may start without a separate go when its card has exact expected plan counts, a rollback for every step, and the agent manager reads back afterwards. Flagship, releases and other spend stay with Paul. |
| +3. **Return hooks are refused** (Paul, 2026-11-05 07:24Z, replaces B3b-D). Nothing in Task 8 sends `CompleteLifecycleAction` or `ABANDON` for a member returning from Standby. The box's own completion of its **initial** launch hook is unchanged, so Task 8's "accepted CONTINUE with a lost response" check (initial launch only) still runs. |
| +4. **Release pin = the dev stable pointer's artifact sha256** (#546), and **floor = absent-expected** (Paul, 2026-11-04). The boot pin check accepts the pointer's artifact sha256 or a matching release tag; a mismatch returns `errGroupLaunch` (`internal/host/installchannel.go:323`). P3b-2 window B promotes a newer dev release to stable, so the group must be re-pinned before any drill that needs a replacement (§3, step G0). |
| + |
| +## 3. What Task 8 executes on this base |
| + |
| +**Order.** The drills run on the shared group after P3b-2 window B closes with no open transaction and no `provider-divergence.json`. |
| +- **G0, re-pin.** Re-seed the bootstrap object and hash for the current pointer, then a targeted saved plan that changes only the launch template (new version) and the group's pinned `group_launch_template_version`. Expected **0 to add, 2 to change, 0 to destroy**, gate approved. Anything else refuses the window. |
| +- **Scope.** Withdraw `hapair` from both fixed boxes (P3b-2's B4 method, four attended edge restarts), so failover is member to member. The ingress alarms keep `expected_targets = 4`. |
| + |
| +**The four I4 drills** (§19 G2), with Task 8's numeric limits unchanged: |
| + |
| +| Drill | Fault | Pass | Cleanup before another fault | |
| +|---|---|---|---| |
| +| 1 | EC2 terminate of the member holding the fixtures | NLB exclusion ≤ 30 s; first success ≤ L + 180 s; takeover only after proof **and** expiry | Confirm terminated iid, replacement hook/receipt/admission, two healthy group members and no excess member. | |
| +| 2 | `SIGSTOP` of `carlos-edge` on an admitted member | exclusion ≤ 30 s; replacement launch starts ≤ 180 s; first success ≤ L + 180 s | Verify hung iid terminated and replacement admitted. If aborted before termination starts, SIGCONT only that exact iid under the card and verify its state before any further action. | |
| +| 3 | `SIGSTOP` at the replacement's first success reached by cross-region backhaul | the same bounds, including the 60 s grace | Apply drill 2's exact-iid termination/SIGCONT checks; leave no hung process or pending lifecycle action. | |
| +| 4 | outbound S3 and SSM blocked on an admitted member | health stays 200, same iid, no automatic replacement; the operator terminates; loss is recorded, not bounded | Verify fault removal, termination and restored fixture service before another fault. | |
| + |
| +For drills 1 to 3, require zero successful requests served by the failed iid after exclusion, one writer/acquirer per lease generation, generations only increasing, and no takeover before termination proof **and** lease expiry (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:223`). These apply to all three drills. Record each class's configured publish/snapshot interval and loss bound before injecting (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:226`). A class with no recorded 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 and the remaining blocker. Never weaken a limit after observing the result. After each run, sleep fixtures through the API and verify marker/debt state. |
| + |
| +Drill 4 extends Task 8's S3-only fault (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:213`, spec §21.2) using the S3+SSM harness from `docs/superpowers/notes/2026-11-05-region-ha-p3b2-standby-witness.md:173-195`, step 3. The operator loses Session Manager and must terminate through the EC2/ASG API. Before blocking, arm and verify the harness's root timer; it removes the block locally after the card's bounded duration without Session Manager. |
| + |
| +`L` is the lease time left at the fault, per Task 8. For drills 1 to 3, continuously feed acknowledged numbered writes and compare restored data. Committed-write loss is checked per replication class against its recorded configured interval (`internal/registry/registry.go:572-576`): |
| +- `stream`: ≤ 1 s; |
| +- `batched`: ≤ 5 minutes; |
| +- `daily`: no write acknowledged after the last wake or daily sync may be expected to survive. Pass means nothing older than that sync was lost. |
| + |
| +**Riding along** (Task 8's other rows): |
| +- concurrent cold wakes, with one writer; |
| +- Task 7's T1/I4 Standby outage and recovery witness (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:226`); |
| +- initial-launch CONTINUE accepted with a lost response/receipt: record the InService box's closed local admission and health replacement in P3-C3 diagnostics, the timeline and launch counters, separately from failed boot; no false boot-failure label or Pending buildup (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:225`); |
| +- a failed initial boot reaching ABANDON/termination notification without Pending buildup, and an all-unhealthy NLB still unable to bypass local admission (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:213`); |
| +- timers recovered with no visitor (slice T); |
| +- outside-VPC ingress through both NLB addresses; |
| +- cross-region backhaul; |
| +- 30 s deregistration; |
| +- the hairpin from the agent, a tenant and a sidecar (spec §21.2, `docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:779`); live sidecar evidence waits for slice S in the group's release, otherwise it remains open; |
| +- with slice S on the group's release, a born-HA native sidecar on drill 1's member (the full Task 5B acceptance, with the member as the disposable box). |
| + |
| +**Not run, and why:** |
| +- drain, role change, default rollback and readiness: their producers are not on main (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:226`; spec §21.2 includes rollback restart); |
| +- the disposable-only EIP-mapping rehearsal: **not run: awaiting a ruling**. Task 8 still requires it (`docs/superpowers/plans/2026-11-04-region-ha-p3b-group.md:226`; spec §21.2). Its connection to §13 cut-over (G5) does not authorize dropping it; carry it as an open requirement. G2 (spec) may be recorded with this rehearsal reported as open, not passed, the same way as the native sidecar rows in §4; |
| +- the S3-loss runbook alarm if T3 misses the release cut: use §4's ruled operator log watch and termination at 10 minutes, and report the alarm as not run. |
| + |
| +## 4. Acceptance split (ruled 2026-11-05) |
| + |
| +Spec §19 defines G2 as G1 plus I4's four drills within §9.8's bound. The plan is stricter: "missing items prevent full G2", where the missing items are the role writer, drain, verified readiness and native sidecars. |
| + |
| +**Recommendation:** record **G2 (spec)** when the four drills and the riding rows above pass. Carry the plan's outline rows forward explicitly: |
| +- readiness becomes a G3 prerequisite, because §19 G3 needs "readiness green"; |
| +- drain and the role writer go to P6 and G5, where §13 uses them; |
| +- native sidecars ride drill 1 if S has landed; otherwise their acceptance is reported as open, never passed. |
| + |
| +**Ruled by Paul, 2026-11-05 ~11:15Z (relayed by agent manager 8a3d302, recorded on #421):** as recommended. G2 is the four I4 drills plus the riding rows. Drain, the role writer and readiness carry to G3, P6 and G5. |
| + |
| +Rulings on section 5, same date: |
| +- **T3:** build the §20 page (branch `region-ha-g2-prep`), aiming for the v0.34.6 cut. If it misses the cut, drill 4 falls back to the operator watching `ha_takeover ... confirmed=false` refusal logs and terminating at 10 minutes. The holder is not confirmed dead; it may still be running, rather than EC2 having failed to answer (`internal/activator/hatakeover.go:47-51`, `internal/activator/hatakeover.go:100`). |
| +- **T8:** pin v0.34.5 as the first `names-2` release with its verified digests, before the v0.34.6 cut (branch `region-ha-g2-prep`). Agent manager 8a3d302 approved the widening under Paul's delegation of 2026-11-03: 8a3d302 answers questions and rule-2 cuts for Paul and escalates as needed. A fixed box also accepts a signed pointer whose source is `release:<tag>` for a plain tag at or above v0.34.5. This deliberately changes the invariant at `internal/host/systemleg.go:329-332`, "a caller-supplied version never grants reader capability": a console-ingested public release tag now does, because the console sets that source only after fetching the public release and checking its checksums. Local uploads still need a pinned digest. A digest list alone would refuse every later release. This widening gets its own Opus review and goes on #421. |
| +- **T1, T2, T4, T6:** reviewed scripts in the repo under `scripts/region-ha-g2/`. They are dev-only and touch nothing at build time. |
| + |
| +Post on #421: |
| + |
| +- the T8 invariant change, its delegated approval and its own Opus review; |
| +- the disposable-only EIP-mapping rehearsal as **not run: awaiting a ruling**, with no accepted omission or pass claimed. |
| + |
| +## 5. What the drills still lack |
| + |
| +Each item names an owner. None is a reason to weaken a limit. |
| + |
| +| # | Missing | Why it blocks | Owner | |
| +|---|---|---|---| |
| +| T1 | A drill probe: 1 s requests through both NLB addresses and one backhaul entry, with a request id, the serving box from the response, and status; plus a lock reader every 5 s for each fixture (holder, generation, expiry) | Task 8 needs per-second evidence and lease timings; the earlier windows used ad hoc `curl` loops | G2 prep session (operator script; no release) | |
| +| T2 | Numbered-write fixtures: three born-HA `hapair` apps, one per replication class, each acknowledging a numbered write and reporting its serving box and row count | Loss per class cannot be measured on today's fixtures | G2 prep session, through the HA create door (needs the P2b-1 window to have passed) | |
| +| T3 | The §20 suspect-holder page: a host refused for over 10 minutes for a lease whose owner is not confirmed dead | Drill 4 needs the visitor-path page; that path is log-only. The departure-finalize path already pages (`internal/activator/hatakeover.go:53-63`). If T3 misses the cut, watch `ha_takeover ... confirmed=false` and terminate at 10 minutes (§4). | ruled 2026-11-05 (§4): build on region-ha-g2-prep | |
| +| T4 | A first-service hang trigger: a root one-shot on the replacement that stops `carlos-edge` on its first logged success for a named fixture | Drill 3 needs the hang within about a second of first service; an SSM round trip is too slow to call "immediately" | G2 prep session (delivered by SSM, removed at cleanup) | |
| +| T5 | A backhaul rehearsal: a request through the dev UK box for a sleeping `hapair` fixture lands on an ie member | Drill 3's entry path is unproven for members | G2 window, step G1; if it fails, drill 3 is not run | |
| +| T6 | A tenant hairpin fixture: an app endpoint that fetches its own region ingress address | §21.2 needs the hairpin from a tenant; the agent leg needs no fixture | G2 prep session | |
| +| T7 | The P3b-2 fault harness, usable on an InService member | Drill 4 reuses it | P3b-2 operability build | |
| +| T8 | Fixed-box releases while the shared group lives: `firstNames2Release` is empty (`internal/host/systemleg.go:338`) | Every dev fixed box refuses every system update while a `g-` edges file exists, which now means days | ruled 2026-11-05 (§4): build on region-ha-g2-prep | |
| +| T9 | Slice S in the group's release | Sidecar recovery rides drill 1 only then | slice S controller; the P3b-2 window B release owner includes S if it has merged by the cut | |
| +| T10 | A dev promote freeze from G0 to cleanup | A new pointer makes every replacement refuse boot | release owner, on the card | |
| + |
| +## 6. Cost |
| + |
| +On top of the shared group's running cost (about $1 a day; the NLB is already paid): each drill 1 to 3 adds one replacement launch, a few cents. Probes and lock reads stay under 20,000 S3 GETs for the whole window, under $0.01. Card cap: $5 per drill window, on top of the group's running cost. |