carlos / platform Public

Regional domains (#447): Astra round 4 findings on spec rev 4 (NOT READY, 1 P1, 1 P2; final round, work stops)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 9d6424e47b70e0887c910ccfbcaa3648c989fcd8 parent c553ab6
1 file changed, +45 −0
  • docs/superpowers/specs/CODEX-FINDINGS-regional-domains-447-R4.md +45 −0

CI passed — run details

Intent

Human

<task-notification> <task-id>af17d5e1dbe1fd0b0</task-id> <tool-use-id>toolu_01BKV3GUWxAcfFjUBuME3PUe</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/c2acaf22-306d-491b-b2b6-addbf33b8e87/tasks/af17d5e1dbe1fd0b0.output</output-file> <status>completed</status> <summary>Agent "Controller: build regional domains #447" is waiting on its own background work</summary> <note>This agent stopped with background work of its own still running. It may resume on its own when that work completes or reports, and the same task-id notifies again if it does; the result below may be interim.</note> <result>Astra round 4 is running with reasoning effort high, reviewing only the rev 4 diff. I'll read its findings when the waiter reports that it has finished.</result> <usage><subagent_tokens>183402</subagent_tokens><tool_uses>7</tool_uses><duration_ms>791468</duration_ms></usage> </task-notification>

Attributed to this commit: 8.47 g CO₂e (1,072,771 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on regional-domains-447, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/specs/CODEX-FINDINGS-regional-domains-447-R4.md b/docs/superpowers/specs/CODEX-FINDINGS-regional-domains-447-R4.md
new file mode 100644
index 000000000..acaf5074d
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-FINDINGS-regional-domains-447-R4.md
@@ -0,0 +1,45 @@
+| Round 3 finding | Round 4 assessment |
+|---|---|
+| P1-1: failed alias reads count as complete evidence | **Resolved.** The proposed flag is carried through collection and decoding; absent/false refuses PUT and readiness. |
+| P1-2: hand route replaces the regional wildcard | **Partly resolved.** An existing regional star row wins, but enabling `Catchall` can expose a star key without that row. Carried below. |
+| P2-1: declared ownership and concurrent creation | **Partly resolved.** Committed records and synchronous creates are covered; pending lifetime allocations are not. Carried below. |
+| P2-2: `heldElsewhere` exceeds the request budget | **Resolved.** Removed; the replacement record walk and its reads are counted. |
+| P2-3: ineffective path-map mutation | **Resolved.** The direct assertion and combined mutation address both independent guards. |
+| P2-4: two-label apex skips `*.X` | **Resolved.** That GET is unconditional, with an explicit witness. |
+
+Reviewed only the specified rev 4 diff, `1db58695..f809b79e`, against worktree commit `c553ab61a7005a1c0082e2d5491a6dc65e7561b7`. No files changed, tests run, or subagents spawned.
+
+**R4-P1-1 — §§7.3, 7.4, 10.5: the wildcard deny is absent before a capability change converges**
+
+The new safety argument assumes that a current box lacking the regional key has never read the claim. That is false for the star key: a box can have successfully derived the regional apex while `Catchall` was off.
+
+Evidence:
+
+- [Spec:552](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/docs/superpowers/specs/2026-10-28-regional-domains-447-design.md:552) derives `*.X` only with `Wildcard && Catchall`. The rev 4 override at [spec:571](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/docs/superpowers/specs/2026-10-28-regional-domains-447-design.md:571) processes existing regional rows.
+- Rev 4 permits `carlos add` to proceed without a readable claim, then asserts that only a box unable to read claims since creation lacks the guard ([spec:623](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/docs/superpowers/specs/2026-10-28-regional-domains-447-design.md:623)).
+- The capability door writes the change at [apidomains.go:740](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/apidomains.go:740). Its specified additional check scans descendant claims, not real star routes ([spec:477](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/docs/superpowers/specs/2026-10-28-regional-domains-447-design.md:477)).
+- A real star route matches children at [edge.go:1370](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/edge.go:1370) and can use a TCP backend at [edge.go:855](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/edge.go:855).
+
+Failure scenario: current UK box B has derived regional apex X with wildcard certificates enabled but `Catchall` off. A root shell without the deployment variables runs `carlos add '*.X'` pointing to an Irish TCP backend; the new check skips. The owner then enables `Catchall`. Until B reads that update, B has no regional star row, so a request for `alice.X` reaches the unmarked Irish backend. A failed read of the changed claim prolongs this; B can remain fresh and current throughout. Adoption does not itself install the missing row.
+
+This is outside the stated stale-box/old-binary case and contradicts rev 4’s “claims unreadable since creation” classification.
+
+Concrete fix: reserve `*.X` with a persistent deny entry from regional claim creation, even while `Catchall` is off; permit regional serving there only after the enabled capability is derived. Add the capability-transition case to W12/W1. Alternatively, cut regional catch-alls from this slice.
+
+Fault family: **cross-region isolation through covering routes**, carried from R3-P1-2.
+
+**R4-P2-1 — §§6.2–6.3: pending lifetime allocations escape the ownership walk**
+
+The new lock order is consistent, but a lifetime create can release those locks before its durable intent becomes a record.
+
+Evidence: [lifetimes_create.go:128](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/lifetimes_create.go:128) persists the allocation before the record write. A failed record write leaves it pending ([lifetimes_create.go:420](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/lifetimes_create.go:420)). Recovery later calls `allocRecordLocked` directly ([lifetimes_recovery.go:233](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/lifetimes_recovery.go:233)), bypassing the proposed recheck in `createRecordWithLifetimeLocked`. The PUT’s new walk sees only record keys ([spec:317](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/docs/superpowers/specs/2026-10-28-regional-domains-447-design.md:317)).
+
+Failure scenario: creation passes its claim check, persists an allocation, then fails before writing the record. The PUT acquires the released locks, finds no record, and creates the regional claim. Recovery subsequently writes the colliding record. The new Reload deny contains serving on boxes holding the regional row, but admission has still accepted conflicting ownership.
+
+Concrete fix: while holding the hostname exclusion, refuse the PUT when `PendingForHost(host, "")` is nonzero; fail closed on its read error. The existing helper covers durable pending operations ([lifetimes_store.go:345](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/console/lifetimes_store.go:345)). Extend W11 with a failed record write followed by recovery.
+
+Fault family: **route-collision precedence**, carried at R3-P2-1’s severity.
+
+The single outstanding P1 stops this final round. The two findings have different immediate causes: missing wildcard enforcement during capability convergence, and deferred record creation escaping admission. Cutting regional catch-alls removes the demonstrated P1; refusing pending allocations upfront addresses the P2. No fifth round is proposed.
+
+NOT READY
\ No newline at end of file