plan: account subdomains, round 3 findings (Astra NOT READY, Fable RAF)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-plan-R3.md+85 −0docs/superpowers/plans/FABLE-FINDINGS-account-subdomains-plan-R3.md+91 −0
CI failed — run details
Intent
<task-notification> <task-id>br69ormf3</task-id> <tool-use-id>toolu_01FuXmTwpefRDGg5yYmG4BoN</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/709ac745-ee81-4971-97b8-321e18b19cf6/tasks/br69ormf3.output</output-file> <status>completed</status> <summary>Background command "Run Astra round-3 review of the plan" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>bp5rbjqlx</task-id> <tool-use-id>toolu_01MB3Csf4FXLRjyQ88uNu5k4</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/709ac745-ee81-4971-97b8-321e18b19cf6/tasks/bp5rbjqlx.output</output-file> <status>completed</status> <summary>Background command "Run Fable 5.2 round-3 review of the plan" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 10.1 g CO₂e (1,214,293 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-plan-R3.md b/docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-plan-R3.md| new file mode 100644 |
| index 000000000..3aac1f5c3 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/CODEX-FINDINGS-account-subdomains-plan-R3.md |
| @@ -0,0 +1,85 @@ |
| +- Astra R2-1, P1: **partly** — unmaterialized records are covered; pending allocations remain invisible. |
| +- Astra R2-2, P1: **resolved** — cache boundaries now use `ParseNamespaceHost`. |
| +- Astra R2-3, P1: **resolved** — HA eligibility uses the production projection’s fields. |
| +- Astra R2-4, P1: **resolved** — infrastructure checks include descendants, console hosts and demo reservations. |
| +- Astra R2-5, P1: **resolved** — census instructions update the active inventories and require final-diff approval. |
| +- Astra R2-6, P1: **resolved** — runnable commands receive parity rows and CLI documentation. |
| +- Astra R2-7, P2: **partly** — canary links and deploy announcements are covered; the routes CLI still loses `public_host`. |
| +- Astra R2-8, P2: **partly** — serving-console responses become canonical; the linking-console fallback remains unchanged. |
| +- Fable R2 P1-1: **resolved** — remote registry branches, dispatch and round-trip coverage are specified. |
| +- Fable R2 P1-2: **resolved** — foreign `notFound` namespace drops no longer make unrelated fleet passes incomplete. |
| +- Fable R2 P1-3: **resolved** — HA eligibility and unavailable entries have separate rules. |
| +- Fable R2 P2-1: **resolved** — infrastructure overlap checks are complete as planned. |
| +- Fable R2 P2-2: **partly** — strict record scanning and `created=false` handling are specified; pending declarations remain uncovered, overlapping Astra R2-1. |
| +- Fable R2 P2-3: **resolved** — one request-scoped namespace view feeds pure rewriting. |
| +- Fable R2 P2-4: **resolved** — Task 3 requires initial DNS status, preservation through `StampHealth`, and publication coverage. |
| +- Fable R2 P2-5: **resolved** — the approved-copy test and command now use the root package. |
| + |
| +Reviewed rev 3 at `35394c39`. Checkout HEAD adds only the review brief. No files changed, subagents spawned or tests run. |
| + |
| +1. **P1 — Tasks 5–6: pending allocations can materialize after assignment.** |
| + **Carried from Astra R2-1; also the remaining evidence gap in Fable R2 P2-2.** |
| + |
| + [Task 5:249](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/docs/superpowers/plans/2026-11-11-account-subdomains.md:249) concludes that claims and record keys cover foreign routes. But console creation persists an allocation **before** writing its record ([lifetimes_create.go:197](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/lifetimes_create.go:197)). Recovery subsequently calls `allocRecordLocked` without another create request ([lifetimes_recovery.go:233](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/lifetimes_recovery.go:233)); that function writes the record directly ([lifetimes_create.go:484](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/lifetimes_create.go:484)). |
| + |
| + **Failure scenario:** before rollout, B’s console request leaves a pending allocation for `shop.harbour.apps.test`, with no claim or record yet. After rollout, both assignment scans find nothing and grant `harbour` to A. Recovery later publishes B’s record. Choice B’s new-request checks never run. |
| + |
| + **Fix:** include pending allocation ownership in assignment evidence and the post-write reread, failing closed on query errors. Coordinate the allocation-to-record transition so the combined scan cannot miss both representations. Add a witness that pauses allocation before its record write, attempts assignment, then resumes recovery. `PendingAllocations` already provides the source ([lifetimes_store.go:196](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/lifetimes_store.go:196)). |
| + |
| + **Fault family:** held namespaces must never serve another account. |
| + |
| +2. **P1 — Task 5: the existing-claim exemption permits new catch-all coverage.** |
| + |
| + [Task 5:246](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/docs/superpowers/plans/2026-11-11-account-subdomains.md:246) says changing an existing claim is never refused. That includes capability changes: an owned first-route claim reaches `setDomainCapabilities` directly ([apidomains.go:501](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/apidomains.go:501)). The false-to-true catch-all transition currently checks regional conflicts, then writes the capability ([apidomains.go:741](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/apidomains.go:741)). The box turns it into a new `*.<parent>` alias ([aliases.go:749](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/domains/aliases.go:749)). |
| + |
| + **Failure scenario:** on a self-hosted deployment, B holds `harbour.apps.test` with `Wildcard=true`, `Catchall=false`; `harbour` is unassigned. B re-attaches with `catchall=true`. The blanket exemption admits the change, creating service for new names beneath a label B does not own. An already-enabled wildcard avoids another wildcard-enabling DNS check. |
| + |
| + **Fix:** distinguish unchanged serving coverage from expanded coverage. Apply namespace ownership to false-to-true catch-all transitions inside `setDomainCapabilities`, using the current claim read under its existing lock. Preserve ordinary re-attachment and already-enabled coverage. Give the predicate the requested/current capabilities; its proposed host/account-only signature cannot express this distinction. |
| + |
| + **Fault family:** namespace ownership must govern newly created serving coverage. |
| + |
| +3. **P2 — Tasks 6–7: the routes CLI discards the new canonical host.** |
| + **Carried from the incomplete-display inventory finding.** |
| + |
| + Task 6 adds `public_host` to route answers, but [Task 7:320](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/docs/superpowers/plans/2026-11-11-account-subdomains.md:320) updates only the instance decoder. The independent route decoder has only `Host` ([apimode.go:4001](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/apimode.go:4001)), and `carlos routes` prints that field ([routes_cli.go:67](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/routes_cli.go:67)). |
| + |
| + **Failure scenario:** the API returns the canonical name, but the CLI silently discards it and continues presenting only the sqid host. |
| + |
| + **Fix:** add `PublicHost` to `apiRouteRow` and include canonical presentation in `routes_cli.go`, retaining `Host` for matching and operational identity. Add an API-backed display witness. |
| + |
| + **Fault family:** canonical presentation without changing operational identity. |
| + |
| +4. **P2 — Task 6: the linking-console fallback is still noncanonical.** |
| + **Carried from Astra R2-8.** |
| + |
| + [Task 6:274](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/docs/superpowers/plans/2026-11-11-account-subdomains.md:274) explicitly leaves the fallback unchanged. When serving-console status fails, no publication URLs populate the map; the handler falls back to `homeLinkPublicURL` ([homelink.go:467](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/homelink.go:467), [homelink.go:488](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/homelink.go:488)). That helper constructs the sqid URL ([homelink.go:152](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/console/homelink.go:152)). |
| + |
| + **Failure scenario:** a named account’s publication reverts to a sqid link whenever the status request fails. |
| + |
| + **Fix:** specify fallback behavior that preserves the canonical contract. For example, omit the public link when a current serving-console URL cannot be obtained, using the existing serving-error state. Test different home/serving domains and a failed status request. |
| + |
| + **Fault family:** canonical URL propagation across deployment boundaries. |
| + |
| +5. **P2 — Task 5: the declared-host result cannot carry ownership.** |
| + |
| + [Task 5:248](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/docs/superpowers/plans/2026-11-11-account-subdomains.md:248) specifies `(hosts []string, err error)` while requiring each result “with its account.” Assignment must distinguish same-account from foreign records; inventory must report holders. A hostname does not encode its owning account for legacy custom names. The existing parser obtains ownership from the **record key**, returning account, app and host separately ([provision.go:434](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/internal/provision/provision.go:434)). |
| + |
| + **Failure scenario:** the caller receives `shop.harbour.apps.test` but cannot determine whether to allow assignment or which account to report. |
| + |
| + **Fix:** return structured declarations containing at least `Host`, `Account` and `App`, preserving multiple declarations of the same host. Update assignment, inventory and tests to consume them. |
| + |
| + **Fault family:** declared-host evidence must preserve ownership. |
| + |
| +6. **P2 — Task 8: the pre-release inventory requires the unreleased API.** |
| + |
| + [Task 8:336](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/docs/superpowers/plans/2026-11-11-account-subdomains.md:336) requires running inventory against dev and flagship **before release**. Task 7’s command calls the system inventory endpoint introduced by Task 6. That endpoint is absent from the current route declarations. |
| + |
| + **Failure scenario:** the new local CLI calls an old deployed console and receives 404, so the required pre-release inventory cannot complete. |
| + |
| + **Fix:** provide an inventory path supported before rollout, or explicitly move the inventory after the approved console rollout and before assignments. State which ordering is intended. |
| + |
| + **Fault family:** rollout prerequisites must be executable against the deployed version. |
| + |
| +The two P1s share the namespace-ownership fault family: existing state can authorize new serving names outside the planned admission check. Refusing assignment over pending allocations and refusing catch-all expansion under unowned labels would remove these cases. Cutting catch-all expansion removes P1-2 only; P1-1 still requires an assignment gate. This is the exhausted third round, not authorization for another review round. |
| + |
| +**NOT READY** |
| \ No newline at end of file |
diff --git a/docs/superpowers/plans/FABLE-FINDINGS-account-subdomains-plan-R3.md b/docs/superpowers/plans/FABLE-FINDINGS-account-subdomains-plan-R3.md| new file mode 100644 |
| index 000000000..efbb99f64 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/FABLE-FINDINGS-account-subdomains-plan-R3.md |
| @@ -0,0 +1,91 @@ |
| +**Verdict: READY AFTER FIXES.** No P1. Five P2s, two of them carried from round 2. Nothing was edited and no tests were run; findings come from reading the plan, spec rev 3 and the code at 35394c39. |
| + |
| +## Round 2 status |
| + |
| +| Finding | Sev | Status | |
| +|---|---|---| |
| +| Astra 1, foreign declared instance missed | P1 | Resolved for the stated scenario (choice B plus the strict record walk). Pending allocations are still unseen; I rate that narrower case P2 (P2-3), not a carried P1. | |
| +| Astra 2, key or host parser | P1 | Resolved. | |
| +| Astra 3 / Fable P1-3, HA eligibility | P1 | Resolved. | |
| +| Astra 4 / Fable P2-1, infrastructure descendants | P1/P2 | Resolved. | |
| +| Astra 5, census | P1 | Resolved. The tip is `linkedDeploymentsSlice1WriteCensusInventory` (`plan9_b8_census_test.go:369`) and `make census-propose` exists. | |
| +| Astra 6, parity | P1 | Resolved. | |
| +| Astra 7, display inventory | P2 | Resolved (`view.go:809` and `deploy.go:647` match). | |
| +| Astra 8, homelink | P2 | Resolved. | |
| +| Fable P1-1, remote registry | P1 | Resolved. | |
| +| Fable P1-2, `notFound` on fleet boxes | P1 | Resolved; the exception it added has a new gap (P2-2). | |
| +| Fable P2-2, route read and `created=false` | P2 | Partly, carried as P2-3. | |
| +| Fable P2-3, per-request view | P2 | Resolved. | |
| +| Fable P2-4, DNS status of derived rows | P2 | Partly, carried as P2-1. | |
| +| Fable P2-5, approved-copy test location | P2 | Resolved; a step-order problem remains (P2-5). | |
| + |
| +## P2 |
| + |
| +**P2-1. Task 3 rule 8: the stamp pass will unpublish derived rows (carried, Fable P2-4).** |
| +- **Problem:** "make the stamp pass keep it" names no mechanism. The seed only covers the first pass. |
| +- **Evidence:** |
| + - `UpsertAlias` never rewrites `dns_status` after insert (`registry.go:3609-3611`). |
| + - `StampHealth` looks up every alias and stamps an authoritative not-found as `""` (`reconcile.go:536-543`). |
| + - The edges file withholds any alias that is not `pointing`, with no apps-domain exemption (`host/edgesfile.go:830`). |
| + - Routes publish whatever their DNS says (`edgesfile.go:726-733`), so the sqid twin is unaffected. |
| +- **Failure:** while `*.harbour.<apps>` is issued or renewed, the `_acme-challenge.harbour` TXT makes `harbour.<apps>` an empty non-terminal (spec §4.7). A sweep in that window stamps every derived row `""`, and the canonical URL fails on every non-home edge until the next sweep. |
| +- **Fix:** have `StampHealth` skip alias rows whose label under the apps domain is in `ListAccountNamespaces`, or exempt them from the publisher's pointing bound. Add a second-pass test with a not-found resolver. |
| +- **Also:** the edges-file half of `TestDerivedRowPublishedAtOnce` cannot live in `internal/domains`, because the writer is in `internal/host`, which imports `domains`. Move it and add `go test ./internal/host -run …` to Step 2. |
| +- **Fault family:** a name gets exactly what its sqid gets. |
| + |
| +**P2-2. Task 3 rule 5: a reassigned name sticks on the old holder's fleet box.** |
| +- **Problem:** a `notFound` drop keeps rows and marks the pass incomplete whenever the box holds a table row for that name. |
| +- **Evidence:** the fleet store door answers 404 only for a missing, foreign or pending body (`storedoor.go:943-964`); real store errors go to `storeFailed`. So `notFound` is always a decision, never a failed read (`claimcache.go:139-143`). |
| +- **Failure:** the operator removes `harbour` from `bdq` and gives it to `bcd` before `bdq`'s fleet box runs a pass (or while it is offline). That box then sees the key listed, the body 404 and its own table row. It keeps `shop.harbour…` pointing at `bdq` and reports incomplete on every pass, indefinitely. |
| +- **Fix:** a `notFound` namespace body always drops its rows and table row. Only non-`notFound` drops keep them. Add the reassignment case to `TestForeignNamespaceOnFleetBoxIsComplete`. |
| +- **Fault family:** a name never serves an account other than its holder. |
| + |
| +**P2-3. Task 6: the re-read, `show` and DELETE do not use the Task 5 walk (carried, Fable P2-2).** |
| +- **Problem:** Task 5 drops the route fold, but Task 6 still says "foreign claim or route" for the re-read and GET, and "claims or routes" for DELETE. It names no source for routes, no failure rule, no instance records and no one-label claim at `<name>.<apps>`. |
| +- **Evidence:** the only route read the console has is permissive on failure (`apidomains.go:1795-1801`). Pending allocations are queried by exact host only (`lifetimes_store.go:402-409`), and recovery writes their record later without passing any door (`lifetimes_create.go:480-489`). |
| +- **Failure:** |
| + - `bdq` holds a record but no claim or route under `harbour`. Remove succeeds, and the name's hosts are orphaned until the next set refuses. |
| + - A stuck allocation under the name has no record yet. Remove, then set to `bcd`, passes the walk. Recovery then writes `bdq`'s record and its route beats the derived alias. |
| + - Both need a store-mode manifest domain under the name, which is why this is P2. |
| +- **Fix:** the re-read and `show` run `subdomainRefusal`'s walk again (claims including the apex, records, plus a new pending-allocation query by suffix), and any failure is `SubdomainUnreadable`. DELETE also refuses on the account's own records and pending allocations. |
| +- **Fault family:** reads that fail refuse; one walk, every caller. |
| + |
| +**P2-4. Task 5: three interfaces cannot do what their text says.** |
| +- **Problem and evidence:** |
| + - `createRefusal(v, host, account)` has no context or store, yet must never refuse "a claim the account already holds". `namespaceView` carries names only. Each door needs a claim read, and the plan does not say where or what a failed read does. |
| + - `RecordHostDeclaredUnder` returns `[]string` but `subdomainRefusal` and the inventory need each host's account. |
| + - `loadNamespaces` returns an error, and the plan defines it only for display ("leaves hosts unchanged"). |
| +- **Failure:** at a door, an empty view still refuses multi-label creates, but `otherAccountsNamespace` then lets `bcd` attach the one-label `harbour.<apps>` while `bdq` holds the name (`domainpolicy.go:186-203` is the only guard on that host). |
| +- **Fix:** |
| + - State that a `loadNamespaces` error refuses every attach or create under the apps domain with a retryable answer. |
| + - Return `(host, account)` pairs from the record walk. |
| + - Give `createRefusal` the existing-claim answer as an argument, read by the door, with a failed read refusing. |
| +- **Fault family:** fail-closed namespace enforcement. |
| + |
| +**P2-5. Task 6 Step 4 cannot pass: the copy test reads files Task 7 creates.** |
| +- **Evidence:** `checkApprovedCopy` reads every entry's `File` and fails if it is missing (`approved_copy_test.go:113-116`). The record includes CLI strings in `accounts_subdomain.go`, which is created in Task 7. |
| +- **Fix:** move `approved_account_subdomains_copy_test.go` and its selector to Task 7, or pin console IDs in Task 6 and extend the list in Task 7. |
| +- **Fault family:** a test command must be able to pass at its own step. |
| + |
| +## P3 (follow-up list) |
| + |
| +1. **Capability door:** `setDomainCapabilities` (`apidomains.go:740-776`) is not in the Task 5 Step 1 list. Turning Catchall on over an existing claim serves new names under an unassigned label. It is not tenant-reachable, because enabling needs a delegation CNAME in the platform's zone (`apidomains.go:857-870`). Wire the predicate into the false-to-true transition anyway. |
| +2. **Placements under a held name:** the holder is refused, because `regionalOverlapRefusal` refuses on any object at `domains/*.P.json` and the namespace claim is one (`apiplacements.go`, the §6.7 table). Say so, or exempt `AccountNamespace` claims. |
| +3. **HA rule 3:** it applies `add`'s checks but not rule 2's `listed` check, so an exact claim on the derived name does not beat the HA derivation. |
| +4. **Test placement:** `TestForeignNamespaceOnFleetBoxIsComplete` goes "through the fleet store door" from `internal/domains`, but the door is in `internal/edge`, which imports `domains`. Use a 404-ing store wrapper, or put it in `internal/edge`. |
| +5. **Cap overflow:** past `maxInstanceAliases` (1000, `aliases.go:55`) the console still shows a name URL with no alias row behind it. Log it per account, or have `show` report it. |
| +6. **Listing cost:** `loadNamespaces` adds one bucket LIST to every display request, including deploy-watch polls. |
| +7. **Line reference:** `wildcardManager.refresh` is at `wildcard.go:244`; `:276` is the `parentsFor` call inside it. |
| + |
| +## Checked and sound |
| + |
| +- **Choice B doors:** every console record or claim creator goes through a door on the Step 1 list. |
| + - **Record creators:** `apiinstances.go:2593/2600`, the seed path inside the same handler, and `domainattach.go:282/704`. |
| + - **Demo doors:** the demo config refuses any overlap with the apps domain (`apidemo.go:99`), and demo claim targets must equal `apexHost`. |
| + - **Instance catch-alls:** already refused anywhere at or under the apps domain (`domaincatchall.go:71-73`). |
| +- **Namespace claim is inert elsewhere:** the main alias loop and `deriveHAIngressAliases` skip it, and `ForeignInstanceCatchall` ignores it because `Instances` is false. |
| +- **Store door:** returns the body only to its own account and keeps `account_namespace`. |
| +- **Selectors and fixtures:** every `-run` regex matches its named tests, and the fixtures, guard tests, the `-record` flag and the parity files exist. |
| +- **Line references:** `remote.go:298`, `routedecls.go:982` and `accounts.go:85-88` match. |
| + |
| +**READY AFTER FIXES** (P2-1 to P2-5, fixed without another round). |