carlos / platform Public

plan: account subdomains, Astra final re-review (NOT READY, 2 Important)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d6bf9e332f25f865176b033b933643052f4da992 parent 3dc59c0
1 file changed, +34 −0
  • docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-final-R2.md +34 −0

CI failed — run details

Intent

Human

OK, go

Human

<task-notification> <task-id>bt0ycpdaj</task-id> <tool-use-id>toolu_01XLPSSc3rvLtrpWwCTHMhoq</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/709ac745-ee81-4971-97b8-321e18b19cf6/tasks/bt0ycpdaj.output</output-file> <status>completed</status> <summary>Background command "Retry Astra's final re-review until its usage limit resets" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 29.5 g CO₂e (3,832,994 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-account-name-hosts, 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/plans/CODEX-FINDINGS-account-subdomains-final-R2.md b/docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-final-R2.md
new file mode 100644
index 000000000..09c2a5a03
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-final-R2.md
@@ -0,0 +1,34 @@
+- **P1: Remove-then-reassign race** — **NOT ADDRESSED.** Normal removal now retires the claim, but rollback restores its previous retirement timestamp at `internal/domains/namespace.go:341`, bypassing the cooldown after a transient assignment. See Important finding 1.
+- **P2-2: Owner’s namespace blocked regional placements** — **ADDRESSED.** `internal/console/apiplacements.go:921` accepts only the requesting account’s trusted, active schema-1 namespace; foreign, retired, malformed and unread claims still refuse. Coverage: `internal/console/subdomain_placements_test.go:22` and `:45`.
+- **P2-3: Rollback could delete a successor** — **NOT ADDRESSED.** Rollback now uses its Put’s ETag (`internal/console/apisubdomain.go:578`), but same-second unretirement can recreate that ETag (`internal/domains/namespace.go:288`). See Important finding 2.
+- **P2-4: check_host from eligible Platform routes** — **ADDRESSED.** Registry fallback applies account and derivation eligibility checks at `internal/console/apisubdomain.go:273`; covered by `internal/console/subdomain_finalfix_test.go:21`.
+- **P2-5: Instance-list q matches public_host** — **ADDRESSED.** Filtering and the response reuse the canonical public host at `internal/console/apiinstances.go:1328`; covered by `internal/console/instancelist_publichost_test.go:16`.
+- **P2: Memoize display namespace reads only; reset on writes** — **ADDRESSED.** Five-second memo with generation-aware invalidation at `internal/console/canonical.go:116`; writes reset it at `internal/console/apisubdomain.go:329`. Doors and occupancy walks retain fresh reads. Coverage: `internal/console/subdomain_finalfix_test.go:46`.
+- **P2: Merge main and rewire both censuses** — **ADDRESSED.** Both sides survive: the write-census gate selects account-subdomains at `internal/provision/plan9_b8_census_test.go:369`, layered on member-backups-2a at `internal/provision/account_subdomains_census_test.go:138`; both root overlays remain ordered at `internal/provision/testdata/plan14-root-reads-chain.tsv:179`.
+- **P3: Hermetic canonical test** — **ADDRESSED.** `internal/console/canonical_test.go:57` installs the in-process instance-report transport.
+
+### New Breakage in the Fix Diff
+
+- **Important 1 — Namespace ownership: rollback bypasses the cooldown.** `internal/domains/namespace.go:341` restores the old retired claim verbatim. Concrete interleaving: an expired retirement is replaced by account B; B’s create reads that active namespace and pauses on its body; the assignment’s post-write walk fails; rollback restores the expired retirement; account C successfully assigns the name before B’s create lands. This reproduces the cross-account race within minutes, without exceeding any timeout. Rollback must preserve a cooldown covering the latest exposed ownership, or fence the admitted creates. `TestSubdomainRetiredRollbacks` at `internal/console/subdomain_retire_test.go:234` checks restoration but omits this interleaving.
+- **Important 2 — Rollback ownership: same-second ETag ABA remains.** `internal/domains/namespace.go:288` formats `created_at` to whole seconds. With the same operator, create → retire → unretire within that second reproduces the original bytes and content-derived ETag; an older rollback can therefore delete or overwrite the successor. This is deterministic under that ordering, not a negligible hash-collision risk. Use a unique mutation revision. The successor test deliberately changes both time and operator at `internal/console/subdomain_retire_test.go:332`, so it does not cover this case.
+
+### Census ruling
+
+- **APPROVE — Write-census classifications and pins.** `AttachAccountNamespace` remains `nonrecord / sel:Put`, `putNamespace` is correctly `nonrecord / sel:Put`, and `Server.handleAPIInstanceList` remains `key-site / lit:instances`. Source evidence: `internal/domains/namespace.go:159`, `:369`, and `internal/console/apiinstances.go:1328`. These classification approvals do not clear the functional blockers above.
+- **Check — Independently hashed all three declarations:** `c405dc14…`, `4c78aa1d…`, and `533e9bbe…` match their recorded pins.
+- **APPROVE — Root-read merge integration and envelope delta.** The supplied diffs preserve the unit entries and dispositions, retain main’s chain, and carry seal `b130b2d6… → 165bf116…`. The changed envelopes are `internal/host` at `internal/provision/testdata/plan14-root-reads-account-subdomains.tsv:36` and `internal/domains` at `:34`; this wave introduces no additional root read source.
+
+### Checks
+
+- **Wall-time concern — VALID, bound unproven.** `internal/console/httpserver.go:20` bounds body reads to five minutes, not the entire authorization-to-write interval. Placements start a separate store timeout after decoding (`internal/console/apiplacements.go:501`); DirStore ignores context cancellation (`internal/release/store.go:503`). The reported interleaving does not establish an end-to-end bound. Important finding 1 requires no hour-long stall.
+- **Test-report check — INCOMPLETE EVIDENCE.** `final-fix-report.md:220` names covering commands and asserts success, but includes no captured passing output. The added tests match the ordinary fixes; neither blocking ordering above is covered.
+- **Execution check —** No tests rerun, git commands executed, checkout mutations made, or subagents dispatched.
+
+### Out-of-Scope Observations
+
+- **None.**
+
+### Verdict
+
+- **Fix round: Findings remain open** — P1 namespace reassignment safety and P2-3 successor-safe rollback.
+- **NOT READY** for merge.
\ No newline at end of file