Regional domains (#447): Astra findings Tasks 4+5 R1 (NOT READY, 1 P1 covering routes: partial regional row write; work stops per ruling 6) and Task 6 R1 (READY AFTER FIXES)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+70
−0
docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T4T5-R1.md+51 −0docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T6-R1.md+19 −0
CI failed — run details
Intent
Attributed to this commit: 38.6 g CO₂e (1,111,910 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/reviews/regional-domains-447/CODEX-FINDINGS-T4T5-R1.md b/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T4T5-R1.md| new file mode 100644 |
| index 000000000..78c0cd002 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T4T5-R1.md |
| @@ -0,0 +1,51 @@ |
| +Reviewed `d1ec32cc625146065125a670c3a47d1c94232da2`: Tasks 4+5, round 1, including ruling 6’s designated design re-check. Design rounds R1–R4 remain part of the history. |
| + |
| +**P1-1 — A failed star write leaves a known regional catch-all unprotected** |
| + |
| +Location: [aliases.go:863](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/domains/aliases.go:863). |
| + |
| +The apex and star are committed separately. `writeRegional` continues after an upsert fails; [UpsertRegional:3535](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/registry/registry.go:3535) executes each statement independently. Consequently, a failed star insert followed by a successful apex insert contradicts ruling 6’s assertion that a box holding the apex also holds the star. |
| + |
| +The existing [failure test:356](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/domains/regional_derive_test.go:356) injects precisely this failure, but checks only that the report is incomplete. An in-memory SQLite reproduction using the production DDL and upsert SQL confirmed that only `shop.example.com` remains. |
| + |
| +Failure scenario: after claim creation, a UK box acquires a hand route at `*.shop.example.com` pointing to an Irish TCP backend through the permitted skipped-check path. Its first derivation reads the claim successfully, fails to insert the regional star, and inserts the apex. [Reload:118](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/regional.go:118) overrides only keys represented by regional rows. `alice.shop.example.com` therefore resolves to the ordinary wildcard; [regionalGate:65](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/regional.go:65) permits it, and TCP dispatch reaches the other region. Subsequent unreadable claims preserve this partial state. |
| + |
| +This box **has read the current claim**. It is outside the specified never-read-the-claim residual. |
| + |
| +Concrete correction: make the claim’s enforcement state indivisible, and fail closed for its affected keys when persistence fails. Add a production-wired witness combining the existing star-write failure with the counting hand-route backend, including restart and subsequent unreadable claims. Merely marking the pass incomplete does not gate routing. |
| + |
| +Fault family: **cross-region isolation through covering routes**, recurring from R2–R4. Ruling 6’s stop-and-report instruction applies; no fix cycle should begin. |
| + |
| +**P2-1 — Retained regional routing loses its wildcard certificate coverage** |
| + |
| +Location: [aliases.go:773](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/domains/aliases.go:773). |
| + |
| +An unreadable claim retains its regional rows but contributes nothing to `desiredWild`, so its existing wildcard parent is deleted. The edges writer consequently withdraws the cert-only publication. |
| + |
| +Failure scenario: the claim becomes unreadable on every bound box while their targets remain eligible. After publication and home-map refresh, neither local wildcard rows nor remote publications supply the parent. The wildcard manager replaces its parent set at [wildcard.go:279](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/wildcard.go:279), and [certFor:318](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/wildcard.go:318) stops returning even an already-loaded, valid wildcard certificate. Invented children cannot obtain fallback certificates through `Allowed`. HTTPS fails before reaching the retained regional entry. |
| + |
| +Concrete fix: retain an existing regional wildcard parent during an unreadable-claim pass when its retained binding still passes `RegionalTarget`, preserving tenancy and cap checks. Add a witness using the real wildcard manager and refreshed edges publications; W1’s supplied certificates cannot detect this loss. |
| + |
| +Fault family: **TLS continuity during unreadable-claim retention**. |
| + |
| +**P2-2 — The detach/recreate residual has an incorrect recovery bound** |
| + |
| +Location: [spec §10.5:979](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/docs/superpowers/specs/2026-10-28-regional-domains-447-design.md:979). |
| + |
| +The residual does belong to the **never-read-the-new-claim** class: an old apex row conveys no knowledge that the recreated claim requires a star. However, “the same end” incorrectly includes adoption as sufficient recovery. |
| + |
| +Failure scenario: a current box retains the old apex, lacks the new star, and continues failing claim reads. Restarting or adopting another current binary reloads those same rows. [foldRegional:118](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/internal/edge/regional.go:118) cannot synthesize the missing star, so ruling 5(b) still cannot override a hand route there. |
| + |
| +Concrete fix: state that this residual ends when successful derivation installs the missing policy, or the conflicting route is removed. Adoption alone is insufficient. This corrects the stated bound without rejecting the accepted residual. |
| + |
| +Fault family: **recovery-bound accuracy for covering routes**. |
| + |
| +The R4 pending-allocation design fix is sufficient for the reported race: `PendingForHost` includes durable pending allocations, recovery uses the same hostname exclusion, and creation rechecks before `BeginAllocation`. |
| + |
| +The gate ordering, target revalidation, path-map exclusion, ordinary W2 publication, and W9 admission checks match the brief. The recorded mutations exercise their stated guards, but do not cover P1-1. |
| + |
| +There is one P1, caused by partial persistence of regional enforcement. Refusing regional catch-all creation upfront, or cutting regional catch-alls, removes this demonstrated case. Otherwise, the recurring fault family requires Paul’s decision before further fixes. |
| + |
| +No files changed or subagents spawned. The targeted edge test command could not start because the read-only sandbox prevented creation of Go’s build directory. No full suites ran; `GOCACHE` remained unset. |
| + |
| +NOT READY |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T6-R1.md b/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T6-R1.md| new file mode 100644 |
| index 000000000..c77d4e933 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/regional-domains-447/CODEX-FINDINGS-T6-R1.md |
| @@ -0,0 +1,19 @@ |
| +Reviewed `d1ec32cc..b53764c4` at `782a301d`, Task 6 round 1. No P1 findings. |
| + |
| +1. **P2 — Trailing-dot hostnames miss the regional claim.** |
| + **Location:** [cli.go:181](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/cli.go:181). |
| + **Evidence:** `regionalClaimHost` lowercases and removes `*.`, but retains a trailing dot. `NormalizeAliasHost` removes that dot (`internal/domains/claims.go:954`), and the claim writer requires canonical names (`claims.go:250`). `GetClaim` reads the supplied key without normalization (`claims.go:604`). |
| + **Failure scenario:** With a regional claim on `shop.example.com`, adding `shop.example.com.` or `*.shop.example.com.` reads `domains/shop.example.com..json`. Not-found permits the add despite the readable canonical claim. Verified by tracing these functions. |
| + **Fix:** Normalize the claim host after removing the wildcard prefix. Preserve existing add behavior when normalization fails. Cover trailing dots, mixed case, and normalization failures in tests. |
| + **Fault family:** Consistent hostname identity between claim writes and refusal reads. |
| + |
| +2. **P2 — The binary test does not isolate deployment configuration.** |
| + **Location:** [cli_add_regional_test.go:47](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/regional-domains-447/cli_add_regional_test.go:47), lines 53 and 103. |
| + **Evidence:** `carlosTestEnv` inherits deployment variables (`scopedkeys_e2e_test.go:29–51`). `run(nil, claimed)` therefore does not unset the store or public key. The configured-store cases also leave `CARLOS_DEPLOYMENT_BUCKET` inherited; that variable takes precedence over the fixture directory (`cli.go:2058–2065`). |
| + **Failure scenario:** Running from a configured deployment shell can read its bucket instead of the fixture, or make the “no store” assertion fail. Verified from environment construction and store selection. |
| + **Fix:** Explicitly clear `CARLOS_DEPLOYMENT_BUCKET`, `CARLOS_DEPLOYMENT_DIR`, and `CARLOS_RELEASE_PUBKEY` before applying each case’s overrides. |
| + **Fault family:** Test isolation from operator deployment state. |
| + |
| +Targeted tests could not start because the read-only sandbox prevented Go from creating its work directory. `GOCACHE` remained unset. No files were edited; no full suites or subagents were run. Apply these P2 fixes without reopening review. |
| + |
| +READY AFTER FIXES |
| \ No newline at end of file |