| new file mode 100644 |
| index 000000000..1bf1f6ea9 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-domains-2a-branch.md |
| @@ -0,0 +1,74 @@ |
| +Reviewed `40d7a9cf..58830d44`, whole-branch round 1. No files edited or subagents used. Targeted tests could not start: the read-only sandbox prevented Go from creating its build directory. Findings below are based on verified source paths. |
| + |
| +**P1 — Purge can permanently strand a domain after a transient claim-read failure.** |
| + |
| +- **Evidence:** [lifetimes_purge.go:348](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/lifetimes_purge.go:348) logs every unread custom-domain claim and returns success. `UnreadClaim` includes transient GET failures, not just corrupt objects: [claimcache.go:85](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/domains/claimcache.go:85), [claims.go:936](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/domains/claims.go:936). Purge then removes the marker and app row at [lifetimes_purge.go:258](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/lifetimes_purge.go:258). |
| +- **Failure:** With a cold cache, one GET for a valid, verified bought-domain claim fails. Purge skips it and completes. After storage recovers, the claim still names the deleted app; pointing at another app is refused by [claims.go:758](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/domains/claims.go:758). The overview filters out the deleted app, so it misleadingly offers pointing. |
| +- **Invariant:** Spec §11.7 C2: purge releases the addresses before relinquishing the marker and row, allowing another app to use them. |
| +- **Fix:** Require a complete claim inventory before completing purge; retain the marker and row when completeness cannot be established. Add a cold-cache, single-GET-failure witness followed by recovery and successful pointing. |
| +- **History:** This repeats Task 6’s claim-completeness fault family. The ledger’s skip-all ruling causes a concrete spec failure, which is why it is reported. Apply stopping rule 2: choose a conservative refusal gate or one durable cleanup invariant, rather than another ownership-cache patch. |
| + |
| +**P2 — A pending or partial Point loses its browser retry action.** |
| + |
| +- **Evidence:** [domainpoint.go:121](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainpoint.go:121) requires another Point call after proof becomes visible. The browser is redirected to app settings, but [accountdomainspage.go:268](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/accountdomainspage.go:268) only offers Point when there are **zero** addresses. Pending and partially attached claims already count as addresses. |
| +- **Failure:** An ordinary DNS propagation delay leaves pending claims. The owner is told to point again, but returning to the domain page provides only Detach. The existing test retries by constructing another POST directly, bypassing this missing UI. |
| +- **Invariant:** The planned partial/pending flow must be completable through the browser. |
| +- **Fix:** Preserve a retry action targeting the same app while pointing is pending or incomplete. Keep admission in the existing attach core. |
| + |
| +**P2 — The destructive first-route cleanup paths lack their deferred witnesses.** |
| + |
| +- **Evidence:** [lifetimes_purge_test.go:467](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/lifetimes_purge_test.go:467) creates aliases or instance catch-alls, never an ordinary first-route claim. [domainbuy_account_test.go:182](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainbuy_account_test.go:182) exercises claim-delete failure, not first-route retirement failure. Production branches differ at [domainattach.go:465](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/domainattach.go:465). |
| +- **Failure scenario left untested:** Record retirement fails after partial purchase attachment or during purge. Releasing the claim or marker prematurely would leave a route behind an available hostname. |
| +- **Invariant:** Retire the first-route record before releasing its claim; retain durable retry state on failure. |
| +- **Fix:** Add the deferred first-route purchase-cleanup and purge witnesses, including legacy purge and demo retry branches. Assert retirement, claim deletion and marker deletion order. |
| + |
| +**P2 — An open purchase card retains obsolete app steps after switching to unpointed cleanup.** |
| + |
| +- **Evidence:** [domain_buy.html:78](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/console/templates/domain_buy.html:78) changes each existing row’s state but never hides the last two rows or switches their labels. The no-app stages supply only two populated states. |
| +- **Failure:** A card opened before the app disappears switches to the no-app lede while still displaying the app’s DNS/HTTPS steps with empty states. |
| +- **Invariant:** The purchase card must accurately describe the current workflow. |
| +- **Fix:** Update row visibility and labels when `noApp` changes; cover the transition on an already-open card. |
| + |
| +**P2 — One explicitly deferred copy-review join remains unresolved.** |
| + |
| +- **Evidence:** The ledger identifies the rewritten CLI introduction as unreviewed. It remains at [cli.md:1772](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/site/cli.md:1772). The subsequent [join review](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/docs/superpowers/specs/LUNA-COPY-RESULT-DOMAINS-2A-JOIN.md:1) covers the buy help only. |
| +- **Failure:** This sentence ships without the required review. |
| +- **Invariant:** Spec §7.3’s copy-review gate. |
| +- **Fix:** Review that sentence or remove the redundant introduction. No new branch-review round is needed for that correction alone. |
| + |
| +**P3 — The Route 53 preservation test reads its expected SOA/NS values after the operation.** |
| + |
| +- **Evidence:** [route53_test.go:327](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/internal/zonehost/route53zones/route53_test.go:327) builds `want` from the resulting records. |
| +- **Failure:** Incorrect changes to the surviving SOA/NS values can satisfy the assertion. |
| +- **Invariant:** Unpointing leaves unmanaged records unchanged. |
| +- **Fix:** Snapshot those records before `SetManaged`. Follow-up; this does not establish a production defect. |
| + |
| +**Census verdicts** |
| + |
| +| Entry | Verdict and evidence | |
| +|---|---| |
| +| Removed `domains_buy_cli.go:readDomainContact` | **APPROVE.** The declaration was renamed, not silently discarded. Its reads are accounted for by the new unit below; no validation disappeared. | |
| +| New `domains_buy_cli.go:readContactFile`, `legacy / accepted-legacy` | **APPROVE.** Read [lines 251–276](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/domains_buy_cli.go:251): caller-selected file, bounded read, strict JSON, non-null object and trailing-input rejection. Only error wording is parameterized. New callers at [domains_account_cli.go:364](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/domains_account_cli.go:364) supply the CLI user’s `--file`; no tenant-, app- or agent-selected root path is introduced. | |
| +| Re-pinned envelope `.` | **APPROVE.** Reviewed the changed CLI dispatch/list functions at [domains_cli.go:105](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/domains_cli.go:105) and [371](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/domains_cli.go:371), account commands and API calls throughout [domains_account_cli.go](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/domains_account_cli.go:48), buy selection/confirmation and completion at [domains_buy_cli.go:129](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/domains_buy_cli.go:129), request serialization at [apimode.go:5011](/home/paulca/.cache/tmp/claude-1001/domains-plan-2/apimode.go:5011), and copy constants. These extend authenticated CLI operations without introducing privileged filesystem reads, execution, or weakening root validation. | |
| + |
| +These are source-review approvals for tip `58830d44bf17f09ba517789bedb8d66ab880a628`; the census test was not executed here. |
| + |
| +**Deferred-minor triage** |
| + |
| +| Task | Disposition | |
| +|---|---| |
| +| **1** | Shipped code resolves the stacked country form, short-list filter and DNS-guidance concerns. Mockup-only layout, repeated notes, apostrophes and Not-yet wording can follow up. | |
| +| **2** | Whole-branch deployment resolves the intermediate backfill hazard; registration snapshots are now supplied. Stale migration prose, repeated empty-registrant lookup and missing `Touch` witness can follow up. Malformed database JSON failing startup is not evidence of failure on valid Plan 1 data. | |
| +| **3** | **Delete ordering is not a verified blocker.** The batch includes both apex and alias deletions. AWS documents transactional batches, and its bulk-delete guidance says aliases need no special handling: [https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html), [https://repost.aws/articles/ARutEr_b3iQD2TGsJ6ViNpAA/backup-and-bulk-deletion-of-route-53-records](https://repost.aws/articles/ARutEr_b3iQD2TGsJ6ViNpAA/backup-and-bulk-deletion-of-route-53-records). No live witness was run. SOA/NS assertion and explicit nil-apex test can follow up. Canonical pointed construction is now used. | |
| +| **4** | **Fix first-route coverage before merge**, as above. Unpointing lede is resolved. Concurrent captured passes remain the explicitly excluded existing race; restored-app cleanup follows the accepted durable-Unpointing decision. | |
| +| **5** | Blank-state fallback and registrable-path validation are resolved. One-render Trash skew can follow up. | |
| +| **6** | **Fix first-route and legacy/demo retry coverage before merge.** Logging, account-zero audit attribution, comments and the test wrapper can follow up. `finishDemoClaimAbort` is not a demonstrated new leak: destination mutations are refused while its reservation is active. The unread-claim ruling separately fails under the P1 scenario above. | |
| +| **7** | Resolved: `domains-point` is `both` in parity. | |
| +| **8** | Singular/today expiry wording is resolved. The empty-app `#point` link needs explanatory UI but can follow up. Repeated guidance, context plumbing and guidance-composition coupling can follow up. Pending-point retry is the separate P2 above. | |
| +| **9** | **Fix stale app rows before merge.** Currency-change reconfirmation is safe. Historical no-app cards, prepayment timing wording and redirect comments can follow up; the purchase card retains ownership wording. | |
| +| **10** | Foreign-contact API witness, stderr prefix and duplicate label formatting can follow up; account scoping is enforced in the shared selection code. CLI introduction review remains the P2 above. | |
| +| **11** | Buy-help join is resolved. **Resolve the CLI introduction’s review before merge.** Brief post-capture payment wording and draft mockup copy can follow up. | |
| + |
| +No additional defect found in frozen-contact write-back, valid Plan 1 migrations, SQL classification, payment ordering, registrar auto-renew suppression, account-deletion exclusion, or the steady-state/per-box request budget. |
| + |
| +NOT READY |
| \ No newline at end of file |