carlos / platform Public

Regional domains (#447): Astra findings Tasks 7+8 round 2 (READY AFTER FIXES, 2 P2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev db92de14ea521faff7a32df8f20c1d1de33ead48 parent 962d319
1 file changed, +37 −0
  • docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T7T8-R2.md +37 −0
diff --git a/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T7T8-R2.md b/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T7T8-R2.md
new file mode 100644
index 000000000..60c7e2e87
--- /dev/null
+++ b/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T7T8-R2.md
@@ -0,0 +1,37 @@
+R1 P1 — **Resolved:** stale capability requests now decide under `regionalMu` and write against that read’s ETag.
+R1 P2-1 — **Resolved:** placement validation rejects both `Addr` and `Addrs` targets.
+R1 P2-2 — **Resolved:** unchanged catch-all-only updates use stored capabilities and avoid the creation-time 422.
+
+Reviewed `04464e34..5eb57d71` at `f7f3a00ca46b52ad40cf4a4701099628dab360bf`, Tasks 7+8, round 2 of 3. No new P1 findings.
+
+1. **P2 — A claim disappearing during the mutex wait gets 502 instead of the neutral 404.**
+
+ **Location and verified evidence:** [apidomains.go:698](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/apidomains.go:698) maps every initial read error, including `os.ErrNotExist`, to 502. The later CAS-conflict classification correctly maps disappearance to `http.NotFound` at lines 772–791.
+
+ **Failure scenario:** A capability request completes its attach checks and waits for `regionalMu`. Another request detaches the claim. After acquiring the mutex, the capability request reads the missing claim and returns 502. Previously, disappearance during this wait reached the capability writer’s missing-claim check and returned the neutral 404. Nothing is written, but the response now depends on when disappearance occurred.
+
+ The existing [disappearance test](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/apidomains_test.go:875) deletes during the DNS lookup, after the initial read, so it exercises only the repaired CAS-conflict path.
+
+ **Fix:** Map `os.ErrNotExist` from the read under the mutex to the same byte-identical 404. Add a deterministic disappearance-during-wait test checking response bytes and absence of writes, audit and serial changes.
+
+ **Fault family:** neutral gone-claim responses.
+
+2. **P2 — Ruling 8’s serialization requirement remains incomplete for writes preserving catch-all.**
+
+ **Location and verified evidence:** [claim_alias.go:22](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/claim_alias.go:22) calls `AttachClaimProven` without `regionalMu`. Its convergence path copies the current claim at [claims.go:766](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/domains/claims.go:766) and writes it at line 783, preserving `Catchall=true`. The paths door likewise calls `SetClaimPaths` without the mutex at [apidomains.go:981](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/apidomains.go:981); that writer copies the claim and preserves catch-all at `claims.go:1162–1175`.
+
+ **Failure scenario:** Repoint an ordinary claim with catch-all enabled, omitting capability fields, or update its paths. The console writes a claim leaving catch-all on without taking `regionalMu`, contrary to ruling 8’s explicit requirement covering every such write.
+
+ Both writers bind preservation to their read’s ETag, which prevents the demonstrated stale-restoration race. This is a missing serialization requirement, classified P2.
+
+ **Fix:** Put these console write paths under `regionalMu` before their authoritative reads, retaining ETag-bound writes and the app → hostname → regional lock order.
+
+ **Fault family: covering routes.** No new covering-routes P1 was found.
+
+No P3 findings. No lock inversion was found in the changed path. DNS now runs while holding `regionalMu`, using the existing 15-second request context.
+
+The deterministic sequence test, CAS-conflict test and P2 tests were inspected. Mutation failures are documented in the fix report; they were not independently rerun. Targeted tests could not start because the read-only sandbox denied Go’s temporary build directory. `GOCACHE` remained unset. No files changed, subagents spawned or full suites run. Task 9 and deferred census failures were excluded.
+
+Under the stopping rules, apply the P2 fixes without reopening this review.
+
+**READY AFTER FIXES**
\ No newline at end of file