carlos / platform Public

plan 2a: Astra round 2 findings (4 P1, 3 P2; stopping rule 2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 3bb277b951fbed1896b8a5f67e76954d0ff71c67 parent 6108a06
1 file changed, +90 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-domains-plan-2a-R2.md +90 −0
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-domains-plan-2a-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-domains-plan-2a-R2.md
new file mode 100644
index 000000000..08ab6f148
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-domains-plan-2a-R2.md
@@ -0,0 +1,90 @@
+- R1-1 **P1: resolved** — purchases freeze the contact, version and handle; handle writeback is conditional.
+- R1-2 **P1: resolved** — legacy journals retain their contact; registration backfill covers interrupted purchases.
+- R1-3 **P1: resolved** — claim cleanup precedes removal of the purge marker and app row.
+- R1-4 **P1: resolved** — purchase insertion stays under the billing hold; deletion checks precede tombstoning.
+- R1-5 **P1: partly** — extra-name proofs are specified, but their constructor lacks the domain input.
+- R1-6 **P1: partly** — automatic detaching is removed; destination admission and partial-success recovery remain faulty.
+- R1-7 **P1: resolved** — pointing refuses non-terminal purchases.
+- R1-8 **P1: partly** — app-less revision checks are preserved, but the armed-gate parking and alert path cannot execute as specified.
+- R1-9 **P1: resolved** — authoritative parity inputs, CLI documentation and census approval are included.
+- R1-10 **P2: resolved** — account listing has a separate read gate.
+- R1-11 **P2: resolved** — the registrable-domain example is corrected.
+- R1-12 **P2: resolved** — unpointed purchases end CLI waiting at `done`.
+- R1-13 **P2: partly** — the budget is corrected, but Task 5’s one-list test contradicts its implementation instructions.
+- R1-14 **P2: resolved** — remaining legacy-contact readers and stale POST handling are addressed.
+
+Reviewed `6108a068e22076244f8e437e87302c17d722a8db`, round 2 of 3. Both authority commits are ancestors. No files changed; no tests run.
+
+1. **P1 — Task 3: `ManagedFor` cannot construct the required proofs. Carry-forward R1-5.**
+
+ The signature at [plan:110](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:110) receives apex targets, extra names and a proof callback, but no domain. Task 4 explicitly passes `names=nil`. `ApexTarget` contains only IP, region and routing identifiers ([zonehost.go:13](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/zonehost/zonehost.go:13)); proof generation requires the hostname ([domainpolicy.go:283](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainpolicy.go:283)).
+
+ **Failure:** with proof enabled, the helper cannot identify the apex or `www` host for an ordinary purchase.
+
+ **Fix:** add an explicit domain or `Zone` argument, update every caller, and test proof generation with no extra names.
+
+ **Fault family:** managed DNS must supply the proof required by attach.
+
+2. **P1 — Task 7: the destination check does not establish a live app belonging to the account. Carry-forward R1-6.**
+
+ [Plan:219](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:219) factors destination admission from `attachDomainAs`. That function checks linked and temporary status ([domainattach.go:134](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainattach.go:134)), but membership is established separately by existing doors ([server.go:4286](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/server.go:4286)). `temporaryRefusal` accepts a missing app and does not refuse Trash ([temprefusal.go:27](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/temprefusal.go:27)).
+
+ **Failure:** a submitted trashed app with a still-ready registry route passes the specified checks and receives new claims. The per-account pointing mutex also does not exclude purge between admission and attachment; the alias attachment path takes no app lifecycle lock ([claim_alias.go:42](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/claim_alias.go:42)).
+
+ **Fix:** explicitly require a live app in this account, reject linked/temporary destinations, and define lifecycle exclusion and revalidation through attachment. Test missing, foreign and trashed destinations, plus purge during admission, with no DNS writes on refusal.
+
+ **Fault family:** destination authority must remain valid through domain attachment.
+
+3. **P1 — Task 7: successful partial attachment prevents the promised retry. Carry-forward R1-6’s recovery requirement.**
+
+ [Plan:225](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:225) refuses any existing apex or `www` claim, including the caller’s. Line 227 nevertheless instructs the caller to retry after an attachment failure.
+
+ **Failure:** apex attachment succeeds; `www` attachment fails. Retrying stops at the apex claim before reaching the idempotent attach operation. DNS proof propagation creates another case: attach can return a pending claim, whose proof is completed by retrying ([domainpolicy.go:291](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainpolicy.go:291)); the new unclaimed-host checks prevent that retry for both pointing and added addresses.
+
+ **Fix:** permit retries for claims already belonging to the same account and destination app, while refusing other holders. Test failure after apex attachment, lost success responses, and pending-to-proven retries.
+
+ **Fault family:** partial domain attachment must remain recoverable without detaching successful work.
+
+4. **P1 — Task 4: armed-gate parking cannot persist its reason or reach the existing alert. Carry-forward R1-8.**
+
+ [Plan:143](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:143) promises `captured`, `Reason="app_gone"` and the existing attempts alert. Non-empty-app mutations remain unchanged.
+
+ **Failure:** if the app disappears in `registered`, capture never runs: `purchaseMutation` enters app admission, which refuses a missing identity ([app_mutation_runner.go:64](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/hostops/app_mutation_runner.go:64)). If it disappears in `captured`, updating the reason or attempts still needs the old app’s SQL permit ([store_gate.go:646](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/store_gate.go:646)). The existing alert runs only after a successful journal update ([domainbuy.go:588](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainbuy.go:588)). The purchase therefore remains silently stuck instead of reaching the specified parked state.
+
+ **Fix:** define parking before app admission, retaining the last durable state and issuing an account-level operator alert without mutating the gated row. Specify this for every non-terminal state, including legacy purchases, and test it with the actual gate armed.
+
+ **Fault family:** purchase-journal recovery and notification must survive loss of app authority.
+
+5. **P2 — Task 5: the one-list assertion contradicts the prescribed calls. Carry-forward R1-13.**
+
+ [Plan:177](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:177) requires one `ListWithUnread`, followed by `settingsDomains` for each app. Each `settingsDomains` call lists claims again ([appsettings.go:791](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/appsettings.go:791)); the cache performs another bucket listing ([claimcache.go:147](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/domains/claimcache.go:147)).
+
+ **Failure:** with two represented apps, the requested implementation makes three claim listings, contradicting `TestAccountDomainsOneClaimsListPerCall`.
+
+ **Fix:** either pass the shared snapshot into a factored state assembler, or explicitly expect `1 + represented apps` listings and revise the test.
+
+ **Fault family:** request-budget assertions must match the cache contract.
+
+6. **P2 — Tasks 3 and 7: no interface supplies the zone’s current managed names.**
+
+ [Plan:226](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:226) requires preserving “the zone’s current names.” `zonehost.Host` exposes no read operation ([zonehost.go:22](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/zonehost/zonehost.go:22)), and the proposed registration schema stores no name inventory. Route 53’s record reader is private to its adapter ([route53.go:172](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/zonehost/route53zones/route53.go:172)).
+
+ **Failure:** the builder must invent an authority for existing names. Deriving them only from claims omits names whose DNS write succeeded but attachment failed; a later replacement can delete them.
+
+ **Fix:** specify a provider-neutral managed-name read operation, its fake implementation and error handling, or an explicit durable desired-name inventory. Test preservation across DNS-write/attach failure and restart.
+
+ **Fault family:** managed-record replacement must preserve previously established names and proofs.
+
+7. **P2 — Task 2: define durable completion of the legacy-contact backfill.**
+
+ [Plan:94](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md:94) calls the migration one-time, but its specified duplicate check is merely an equal saved contact. The legacy row remains, and `migrateDomains` runs through the store migrator on startup ([store.go:793](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/store.go:793)).
+
+ **Failure:** implementing that duplicate check alone recreates the old contact after its migrated copy is edited or removed.
+
+ **Fix:** specify a durable migration-completion marker committed atomically with the backfill. Test migration, edit/removal, then reopening the store—not just two consecutive migrations.
+
+ **Fault family:** saved-contact edits and removals must survive restart without legacy data resurrection.
+
+The recurring R1-5, R1-6 and R1-8 families trigger stopping rule 2. Before another fix round, the author should present the required choice: refuse unsupported cases up front, cut the affected feature, or enforce each invariant in one shared place with guard tests. I recommend shared admission and retry rules for pointing, and explicit parking before app admission for armed-gate purchases.
+
+**NOT READY**
\ No newline at end of file