carlos / platform Public

Astra round 3 (final) on region HA without claims rev 4: findings, unedited

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 11ad733735ba3c95269aac25918b4fb242d47a94 parent bcfc342
1 file changed, +102 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-region-ha-no-claims-r3.md +102 −0

CI failed — run details

diff --git a/docs/superpowers/notes/reviews/ASTRA-FINDINGS-region-ha-no-claims-r3.md b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-region-ha-no-claims-r3.md
new file mode 100644
index 000000000..5a53817ce
--- /dev/null
+++ b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-region-ha-no-claims-r3.md
@@ -0,0 +1,102 @@
+| Round-2 finding | R3 disposition |
+|---|---|
+| astra-2.1 — marker retry | **Resolved:** exact marker and ETag persist; expiry cannot retire the obligation. |
+| astra-2.2 — S3-triggered replacement | **Resolved:** A22 is cut. |
+| astra-2.3 — premature staging-marker consumption | **Resolved by scope cut:** promotion design moves to P4. |
+| astra-2.4 — replacing an unconfirmed stager | **Resolved by scope cut:** P4 must retain the pin. |
+| astra-2.5 — incorrect seed-import contract | **Resolved by scope cut:** P5 must preserve the actual route and environment provenance. |
+| astra-2.6 — target security groups | **Resolved:** §12.1 admits the NLB security group and preserves backhaul. |
+| astra-2.7 — destination-marker permission | **Resolved by scope cut:** destination-side writing is a P4 requirement. |
+| astra-2.8 — mixed-mode formats | **Resolved by scope cut:** mixed moves remain refused pending conversion. |
+| astra-2.9 — cleanup dependency | **Partly, P2:** P0 owns its work, but its inventory still misses an active claim guard; finding 6. |
+| Carried astra-1.1 — checksum proof | **Resolved:** checksum reuse remains removed. |
+| Carried astra-1.2 — takeover on expiry | **Resolved:** cross-box acquisition requires release or confirmed termination. |
+| Carried astra-1.3 — same-box emptiness | **Resolved:** unsupported proofs now cause refusal. |
+| Carried astra-1.4 — incomplete files publication | **Resolved:** incomplete publication cannot produce a clean marker or retirement readiness. |
+| Carried astra-1.5 — replication classes | **Resolved by N-HA6:** the differing loss windows are explicit. |
+| Carried astra-1.6 — key/token producers | **Resolved in the full design:** producers and initial durable publication are specified. |
+| Carried astra-1.7 — once-timer ownership | **Resolved:** ownership follows the holder/releaser. |
+| Carried astra-1.8 — missing duty discovery | **Partly, P1:** death before the first duty-file PUT still strands work; finding 1. |
+| Carried astra-1.9 — failover timeline | **Partly, P1:** direct backhaul bypasses launch-hook admission; finding 2. |
+| Carried astra-1.10 — forwarded takeover | **Resolved:** the receiving home-region box may take over. |
+| Carried astra-1.11 — named-unit routes | **Resolved:** serving boxes explicitly exclude them. |
+| Carried astra-1.12 — unsafe offline moves | **Partly, P1:** full-rollout refusals are specified, but the first slice precedes them; finding 4. |
+| Carried astra-1.13 — rollback after termination | **Resolved:** the old box remains stopped until acceptance. |
+| Carried astra-1.14 — hostname reuse | **Resolved in the full design:** lifetime-bound reuse and expanded leftovers refusal are specified. |
+| Carried astra-1.15 — reacquiring an awake lease | **Resolved:** awake backfill uses the live handle. |
+| Carried astra-1.16 — request budget | **Resolved:** index mutations and contention retries are included. |
+| Carried astra-1.17 — placement | **Partly, P2:** the app-spreading input is still missing; finding 5. |
+
+1. **P1 — §7.4 still loses discovery when the holder dies before its first duty-file write.**
+
+ [Spec:291](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:291) says such duties pass through termination. But the adopter reads only the departing box’s duty file at [spec:298](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:298). No discovery mechanism covers entries absent from that file.
+
+ **Failure scenario:** H registers its first once-timer. Its wake state reaches S3; its release-time duty-file PUT fails; its box retains the lease and then terminates. Survivors have neither H’s timer nor its due time. Their existing wake query selects only local rows with positive `next_due` ([registry.go:2931](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/registry/registry.go:2931)); timer delivery likewise queries local timer rows ([runner.go:296](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/schedule/runner.go:296)). Retaining the lease does not supply a trigger.
+
+ **Fix:** durably register discovery before accepting responsibility for the first duty, or specify a termination reconciliation that discovers omitted hosts and imports their wake state. Cover death before the first successful duty-file PUT.
+
+ **Fault family:** I6, durable duty discovery.
+
+2. **P1 — §§4.3, 10 and 12.1 allow service before the launch lifecycle hook completes.**
+
+ The latch requires a published edges file before hook completion ([spec:425](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:425)). Yet serving membership depends on fresh edges and role, without a boot-admission condition ([spec:114](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:114)). Peers dial the box directly ([homemap.go:159](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/edge/homemap.go:159)), on port 443 ([edge.go:3052](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/edge/edge.go:3052)).
+
+ **Failure scenario:** a new box publishes `serve`, receives a forwarded request, acquires H and serves it. Hook completion is delayed or fails, then the agent hangs. The instance remains in `Pending:Wait`, potentially until the specified 15-minute timeout. The 60-second in-service grace does not bound this interval. AWS documents that lifecycle ordering at [https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks-overview.html](https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks-overview.html).
+
+ **Fix:** gate both peer eligibility and local tenant acquisition on completed group admission. Before completing the hook, require the complete health predicate—not only the serving latch. Add a direct-backhaul-first-service hang witness.
+
+ **Fault family:** H20/N-HA3 and I5, service admission outside the replacement bound.
+
+3. **P1 — §8.4 backfill can publish a stale sleeping copy as authoritative.**
+
+ [Spec:333](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:333) tells sleeping instances to acquire, publish and release. That bypasses §5.3’s requirement that local reuse needs a matching clean marker. Acquiring establishes exclusion; it does not establish freshness.
+
+ **Failure scenario:** A retains H’s older files; B has H’s latest files. Both are asleep when HA turns on. A acquires first and backfills its stale tree, or acquires after B and overwrites B’s manifest. The publisher accepts changed bytes ([publisher.go:132](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/hostfiles/publisher.go:132)); a full scan also deletes manifest entries absent locally ([sync.go:161](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/hostfiles/sync.go:161)). A complete publication can therefore certify stale state.
+
+ Applying §5.3 first does not bootstrap legacy files either: without a manifest, restoring into an empty tree discards the only available local state.
+
+ **Fix:** define an explicit initial migration from a verified authoritative copy, before ordinary HA wakes. Refuse ambiguous legacy copies. Once that baseline exists, backfill must obey the same freshness decision as every other writer.
+
+ **Fault family:** I2, local-cache provenance versus authority to publish.
+
+4. **P1 — §19’s first slice excludes prerequisites required by its own behavior.**
+
+ [Spec:645](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:645) enables freshness before files/keys/duties and before P2’s refusals. But release requires final files and wake-state publication plus acknowledged duties ([spec:134](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:134)); first wake without a marker restores a clean files tree ([spec:173](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:173)).
+
+ **Failure scenarios:** an existing host’s first slice wake has local files but no published manifest, so it cannot safely perform the specified restore. Separately, an offline move from the two IE boxes to a single-box region can still start: current capability checks do not exclude `CARLOS_REGION_HA` ([movesoffline.go:59](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/host/movesoffline.go:59)), and the console proceeds to `OfflineStart` ([apiinstancemove_offline.go:610](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/console/apiinstancemove_offline.go:610)). P2’s later refusal cannot prevent that initial stop.
+
+ **Fix:** include the publication, migration and refusal prerequisites in the first enabled slice, or restrict activation to explicitly validated hosts with those prerequisites satisfied. Withdraw unsupported move capability before activation and refuse activation during an existing move/import.
+
+ **Fault family:** I2/I6 and §14’s refusal-before-side-effects boundary.
+
+5. **P2 — §6.3 does not supply the information needed for H4’s app spreading.**
+
+ [Spec:223](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:223) says spreading follows from the roomiest choice. `ChooseRoomiest` actually implements spreading through its separate `running[box].Apps[app]` input ([policy.go:83](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/boxchoice/policy.go:83)). The existing producer derives that input from claims ([loads.go:18](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/hostops/loads.go:18)); this design supplies no replacement.
+
+ **Failure scenario:** A already runs an instance of the app but has more free memory than eligible B. With empty loads, the next instance also lands on A.
+
+ **Fix:** specify a claim-free source, freshness rule and failure behavior for the per-app running map, then pass it to `ChooseRoomiest`.
+
+ **Fault family:** H4, placement-policy inputs.
+
+6. **P2 — §16.3 omits a claim guard activated by the redefined HA switch.**
+
+ The assertion that remaining claim machinery stays inert ([spec:584](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:584)) misses `beginExecutableChange`. With `regionHA=true`, it writes the legacy marker and checks participation even without claims ([systemparticipation.go:47](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/host/systemparticipation.go:47)).
+
+ **Failure scenario:** a retained or unreadable `.hostexec` directory defers platform updates after HA activation; the check explicitly refuses those cases ([participation.go:25](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/hostfloor/participation.go:25)). The production update path invokes it at [systemapply.go:540](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/host/systemapply.go:540).
+
+ **Fix:** explicitly classify this path in P0: retain it with documented readiness requirements, or scope its rewrite while preserving required root-participation protection and census approval.
+
+ **Fault family:** feature-switch scope and root update gating.
+
+7. **P3 — §16.3 lists an already-completed helper move.**
+
+ [Spec:582](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:582) still requires moving `GroupBoxReference` into `internal/host`. The local implementation already exists, with its cleanup history and golden-test contract ([boxreference.go:91](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-no-claims/internal/host/boxreference.go:91)).
+
+ **Failure scenario:** the implementation plan repeats completed work against the wrong baseline. **Fix:** mark it retained/already done and correct §4.1. **Fault family:** baseline accuracy; follow-up only.
+
+The four P1s do **not** share one cause: they concern duty discovery, admission before replacement protection, and migration/rollout ordering. Up-front refusals can exclude unbackfilled hosts, unsupported operations and pre-admission serving. The duty gap needs durable discovery or an explicit restriction excluding affected timer hosts. Cutting moves/imports alone does not remove these blockers.
+
+Reviewed at `bcfc342a85d8452daf3499bb7c464f0cf2ae52e5`. No files changed, tests run, subagents spawned or live infrastructure actions taken.
+
+**NOT READY — P1 findings 1–4 remain.**
\ No newline at end of file