plan: account subdomains, Astra final re-review (READY)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-final-R3.md+29 −0
Intent
<task-notification> <task-id>a0b449ae6ab46e7ca</task-id> <tool-use-id>toolu_01MKkuR8FphEUYEFi3DTxHCh</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/709ac745-ee81-4971-97b8-321e18b19cf6/tasks/a0b449ae6ab46e7ca.output</output-file> <status>completed</status> <summary>Agent "Final-review fix wave" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>**Status:** DONE. Both Important findings and both Fable minors are fixed; nothing is pushed. The round-2 section, with the pasted test output, is appended to `.superpowers/sdd/2026-11-11-account-subdomains/final-fix-report.md`. **Commits:** - `b47061fd` subdomains: rollback restarts the cooldown; each write has a revision - `31e74850` census: account subdomains final fix round 2 **What changed:** - **Rollback (item 1):** undoing an unretire or a replace now re-retires the name at the clock's now, so the hour restarts. In a replace, the retired claim now belongs to the account whose write was undone, not the old holder. A fresh create is still deleted at its own ETag. - **Revision (item 2):** every namespace write now carries a random 128-bit `Claim.Revision`, so a create, retire and unretire in the same second by the same operator no longer repeat the ETag. - **Fable minors:** the census file header now names `memberBackups2aWriteCensusInventory` with a 2a merge note, and the stray `%!v(<nil>)` log line is gone. **Tests:** All pass at `31e74850`: - the console run (112 PASS, 0 FAIL); - the domains, host class census and edge tests; - both censuses; - the root CLI and copy tests; - `go vet` for darwin and windows. The new `TestSubdomainRollbackRestartsCooldown` (Astra's interleaving) and `TestSubdomainRollbackSparesASuccessor/same_second` both fail with their fix reverted. On the round-1 rollback, C got the name at once and B's late write landed under it. With no revision, the successor's ETag repeated the create's and the rollback deleted it. **Census items needing a ruling:** 1. **Write census:** - `AttachAccountNamespace` re-pinned to `93653b4a…`. - `putNamespace` re-pinned to `de037943…`. - Both stay nonrecord / sel:Put; the only change is that each now stamps `Revision`. 2. **Root-read overlay:** - One new unit, `internal/domains/namespace.go:newNamespaceRevision`. Its `+file:Read` is the `crypto/rand.Read` of 16 bytes, not a path or tenant input. - The `internal/domains` envelope moved. - Seal `b130b2d6… → bc306a42…`. - The claim line for the new unit is only in my local `.superpowers/.../census-claims.txt`, which git ignores; the proposal card in `docs/superpowers/notes/census-proposal-account-subdomains.md` carries it. **Concerns:** - **Who holds a re-retired name:** after a failed replace, the old holder can no longer retake the name at once; it waits the hour like everyone else. It had already been out for more than an hour, so this costs nothing the spec promises. - **No end-to-end time bound:** Astra noted that nothing proves how long an admitted create can take to land. Every exposure now restarts the hour, which closes this interleaving without relying on that bound, but the bound itself is still unproven. - **Repo lock:** the stale `.git/packed-refs.lock` from 06:59 (not mine) is still there.</result> <usage><subagent_tokens>412107</subagent_tokens><tool_uses>25</tool_uses><duration_ms>1103916</duration_ms></usage> </task-notification>
<task-notification> <task-id>bqxrgf3in</task-id> <tool-use-id>toolu_01TxRzmKzBfaANuqekz612Pm</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/709ac745-ee81-4971-97b8-321e18b19cf6/tasks/bqxrgf3in.output</output-file> <status>completed</status> <summary>Background command "Push fix round 2 and run Astra re-review" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 17.0 g CO₂e (2,224,039 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-R3.md b/docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-final-R3.md| new file mode 100644 |
| index 000000000..6d5ba9f5e |
| --- /dev/null |
| +++ b/docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-final-R3.md |
| @@ -0,0 +1,29 @@ |
| +- **Important 1: rollback bypassed the cooldown** — **ADDRESSED**. `internal/console/apisubdomain.go:583` re-retires both activation paths at `subdomainClock()`, conditional on their own ETag; fresh-create rollback still deletes at its own ETag (`:585`). `internal/domains/namespace.go:266` stamps the new retirement time. Coverage: `TestSubdomainRetiredRollbacks` (`internal/console/subdomain_retire_test.go:237`) and `TestSubdomainRollbackRestartsCooldown` (`:571`). |
| +- **Important 2: same-second ETag ABA** — **ADDRESSED**. Both namespace Put paths stamp a fresh Revision (`internal/domains/namespace.go:149`, `:349`), generated from 16 random bytes (`:369`). The fixed-clock, same-operator sequence and stale rollback are covered at `internal/domains/namespace_retire_test.go:136` and `internal/console/subdomain_retire_test.go:330`. |
| +- **Minor: census header and nil-error logging** — **ADDRESSED**. `internal/provision/account_subdomains_census_test.go:5` names `memberBackups2aWriteCensusInventory` and explains the merge. `internal/console/apisubdomain.go:517` supplies a descriptive error. |
| + |
| +### New Breakage in the Fix Diff |
| + |
| +- **Minor — interleaving test synchronization can race**, `internal/console/subdomain_retire_test.go:551`. `claimsListed` closes before the admitted request reads the claim body; the waiting callback returns at `:624`, allowing rollback to retire the claim first. `ClaimCache.listWithHosts` reads bodies after List (`internal/domains/claimcache.go:139`), so an unlucky schedule can reject the placement and fail the test despite correct production behavior. Follow-up: signal after capturing the active claim body, or when the request reaches its body read. No new Critical/Important breakage. |
| + |
| +### Out-of-Scope Observations |
| + |
| +- None. |
| + |
| +### Census ruling |
| + |
| +- **APPROVED — AttachAccountNamespace `93653b4a…`**, `internal/provision/account_subdomains_census_test.go:200`: remains `nonrecord / sel:Put`; same create-only claim key, now with Revision (`internal/domains/namespace.go:149`, `:165`). |
| +- **APPROVED — putNamespace `de037943…`**, `internal/provision/account_subdomains_census_test.go:201`: remains `nonrecord / sel:Put`; same ETag-conditional claim key, now with Revision (`internal/domains/namespace.go:349`, `:358`). |
| +- **APPROVED — newNamespaceRevision**, `internal/domains/namespace.go:369`: `legacy / accepted-legacy` is appropriate. `+file:Read` is `crypto/rand.Read` into a fixed 16-byte buffer; no tenant-selected path or new root input. |
| +- **APPROVED — internal/domains envelope and seal**, `internal/provision/testdata/plan14-root-reads-account-subdomains.tsv:36` and `internal/provision/testdata/plan14-root-reads-chain.tsv:180`. The envelope covers the reviewed changes; the card records base `b130b2d6…` → `bc306a42…`. |
| + |
| +### Checks |
| + |
| +- Checked the appended output at `.superpowers/sdd/2026-11-11-account-subdomains/final-fix-report.md:396`: named regression tests and write/root-read/group-name census guards report PASS. Their test bodies cover the amended behavior, subject to the synchronization finding above. |
| +- Read-only source and supplied-diff inspection; no tests rerun and no git commands or mutations performed. |
| + |
| +### Verdict |
| + |
| +**Fix round: All findings addressed, no new Critical/Important breakage.** No original findings remain open; the Minor test synchronization issue is a non-blocking follow-up. |
| + |
| +**READY** |
| \ No newline at end of file |