plan: Tito nesting and self-serve offline moves, skeleton
Program plan skeleton with W0, W4-W6, parking and order; W1-W3 left for Fable 5.2 to draft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+89
−0
docs/superpowers/plans/2026-11-13-tito-nesting-and-self-serve-moves.md+89 −0
CI cancelled — superseded by a newer push — run details
Intent
Attributed to this commit: 41.3 g CO₂e (5,089,174 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on plan-tito-nesting-moves, 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/2026-11-13-tito-nesting-and-self-serve-moves.md b/docs/superpowers/plans/2026-11-13-tito-nesting-and-self-serve-moves.md| new file mode 100644 |
| index 000000000..8ec75c01e |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-11-13-tito-nesting-and-self-serve-moves.md |
| @@ -0,0 +1,89 @@ |
| +# Tito onto nested hosting, and self-serve offline moves: program plan |
| + |
| +> **For agentic workers:** this is a program plan. It orders workstreams, names their gates and who decides, and says which workstreams get their own implementation plan (superpowers:writing-plans) before any code is written. Execute a workstream only through its own plan or runbook. Steps use checkbox (`- [ ]`) syntax for tracking. |
| + |
| +**Goal:** convert every controld-run titogo instance on Tito's deployment to a platform-run instance on the nested layout (#261), then give Tito's customers self-serve offline moves, without a repeat of PRO-5460 (nesting broke titogo's router, Stripe webhooks and PDFs on staging). |
| + |
| +**Architecture:** prove nesting on Tito staging first; nest production in a window; convert titogo instances through the seeded-instances import door (f97898f, shipped dark) after Paul's open #261 decisions and the seeds floor; land self-serve offline moves as a cut that reuses the live operator offline move, rather than the stale plans 2-4 as written. |
| + |
| +**Spec:** none single. Authorities, all on main: `docs/superpowers/specs/2026-10-08-seeded-instances-design.md` (import door, §10 schedule), `docs/superpowers/specs/2026-10-21-self-serve-offline-moves-design.md` (rev 16), `docs/superpowers/plans/2026-10-21-offline-move-runbook.md`, titogo `docs/superpowers/specs/2026-09-24-moves-on-the-platform-design.md` §4. Assessment: Fable 5.2, 2026-11-13 (summarised in Appendix A). |
| + |
| +**Collaboration:** Opus (this session) owns the plan and the small fixes. Fable 5.2 drafts and reviews the delicate parts: W1 (nesting Tito), W2's conversion runbook and W3 (self-serve offline moves). Astra reviews implementation branches. Stopping rules from AGENTS.md apply to every workstream, including this plan: three review rounds, then cut or ask Paul. |
| + |
| +## Global Constraints |
| + |
| +- Production changes on Tito's deployment (carlos.tito.io, carlos-tito-ie, standby-ie) need Paul's explicit go per step (AGENTS.md "Production infrastructure needs scoped approval"). |
| +- The seeds floor (`carlos system seeds-floor publish`) is irreversible: publish only after Paul settles #261's open decisions, and only at or above the first release carrying the doors on every box in the region. |
| +- Nothing is nested on carlos-tito-ie until the staging rehearsal (W1) passes every check in its exit list. |
| +- One nesting or conversion at a time on a box; batches watch box memory (carlos-tito-ie ran out of memory on 2026-11-03, see [wake storms] memory). |
| +- No tenant names in platform copy, tests or comments; amadan discussions may name Tito. |
| +- Every platform change lands through a reviewed, CI-green branch on amadan, squash-merged with an explicit `-message` built in the same command as the merge. |
| + |
| +## Review Focus |
| + |
| +1. A webhook or callback that arrives while an instance is mid-nest or mid-conversion: the sender retries and the order lands; nothing is charged without an order. |
| +2. An instance that calls its own box's public address (root domain, relay by hostname) after nesting (#990, #367): it either works or is found in the rehearsal, never in production. |
| +3. An alias or custom domain on an instance that nests or moves (#338, fixed in d3c5601b): it answers 2xx after the change; confirm the release carrying the fix is on Tito's boxes. |
| +4. A move whose target box holds an old live link (#339) or whose region has a box outside the shared pool (#413): refused before the instance goes offline, never after. |
| +5. A customer who starts a self-serve move and walks away: the move finishes or returns on its own, and the customer can see which happened. |
| + |
| +--- |
| + |
| +## W0. Decisions Paul owes (first, they gate W2 and W3) |
| + |
| +- [ ] **D1. #261's open decisions** (recorded on #261, 2026-10-10): data sealed with the source's instance key; the deviations (async `--from`, import upload, abort on failed integrity, reservation order); GET-only verify vs what titogo's conversion tool sends; the rollout gates (operator way out of a held rollback, noncurrent-version expiry on data buckets, S3 permissions for console and box roles, one console per deployment). Recommendation for each: drafted by Fable in W2. |
| +- [ ] **D2. The self-serve cut** (W3): thin slice now, or plans 2-4 as designed. Recommendation: W3. |
| +- [ ] **D3. The production nesting window** for carlos-tito-ie, and the customer notice (runbook §9's stop of seconds, about an hour after). |
| + |
| +## W1. Prove nesting on Tito staging, then nest production *(Fable drafts)* |
| + |
| +<!-- FABLE: draft this section. The rehearsal on Tito staging (remove CARLOS_LAYOUT_DEFAULT=flat from scripts/bootstrap-box.sh:62-76 for staging only, `carlos layout migrate`, then the checks), its exit list (PRO-5460 cases: router, relay socket, Stripe webhooks, PDFs; #990-style calls to the box's own addresses; aliases and custom domains; memory), the rollback, and then the production window steps on carlos-tito-ie with Paul's go points. Cite Tito's staging RUNBOOK-bringup.md and the offline-move runbook where they already hold the steps; don't repeat them. --> |
| + |
| +## W2. Convert titogo instances to platform-run (#261) *(Fable drafts the runbook; titogo builds its half)* |
| + |
| +<!-- FABLE: draft this section. Recommendations for each D1 decision with reasons; the titogo-side work (adopt/retire in titogo's repo, ensureSandbox, mirrored hosts) as a hand-off to the Tito session, not built here; the gates before the seeds floor (release on every box, region nested, one box in region: check standby-ie); the canary (convert, abort on purpose, convert again); batches with memory watch; how to verify each instance (verify path, webhooks, admin token carried). --> |
| + |
| +## W3. Self-serve offline moves *(Fable drafts)* |
| + |
| +<!-- FABLE: draft this section. Options for D2 with your recommendation: (a) thin slice on today's main (console job driving the existing operator doors, app-scoped request door, #339 checks as refusals, #413 fix, single-box regions), (b) rebase plans 2-4 (sizes from your trial merge), (c) other. For the recommendation: the slices in order, each with what a user or Paul can see when it merges (stopping rule 6), the review budget, and what is deferred and why. Note the dependency on W4. --> |
| + |
| +## W4. Move fixes every later path needs *(Opus builds, Astra reviews; small)* |
| + |
| +- [ ] **#413** — offline flip waits forever when the destination region has a box outside the shared pool. Fix: the target set counts only boxes that can take the row; refuse at stage when none can. Own branch, own plan (one task, TDD). |
| +- [ ] **#339** — refuse at stage (before the instance goes offline) when the target holds an old live link; correct `status` after a staged abort. Own branch, own plan. |
| +- Exit: both merged, released to dev, one dev offline move run end to end with the runbook. |
| + |
| +## W5. Instance memory alert (#996) *(design small, then build)* |
| + |
| +- [ ] Short design on #996: signal (`memory.events` high and oom_kill, `memory.current`), cadence (the box's existing report), where it shows (`carlos instances list` REASON, console instance page, fleet-alerts engine). Paul approves, then writing-plans. |
| +- Why here: it is the trigger for "move a busy customer" (W3 and the parked #992), and it helps watch memory during W2's batches. |
| + |
| +## W6. Same-box calls between apps (#990) |
| + |
| +- [ ] Decide after W1: if the rehearsal shows titogo needs calls to its own box's addresses, #990 moves ahead of W2. Otherwise it stays queued after W3 (it also blocks the hub pattern in docs/site/one-instance-per-customer.md). |
| + |
| +## Parked, with reasons |
| + |
| +- **#992** (one instance onto an owner's fleet and back): no named user or switch-on date (stopping rule 5), and it sits on moves code W3 changes (rule 4). Revisit after W3 with the cheaper pool-box variant first (Appendix A). |
| +- **#993** (instance identity for hubs): nobody waiting; depends on #990 and #155 half 2. |
| + |
| +## Order and gates |
| + |
| +| Week | Work | Gate to start | Who decides | |
| +|---|---|---|---| |
| +| now | W0 D1-D3 asks; W4 #413 and #339 branches; W5 design | none | Paul (D1-D3) | |
| +| weekend 11-14/15 | W1 staging rehearsal only | Paul's go for staging | Paul | |
| +| after W1 passes | W1 production window | D3, rehearsal exit list green | Paul | |
| +| after production nested | W2 canary, then batches | D1 settled, floor published, titogo half merged | Paul per batch | |
| +| after W4 merged | W3 first slice | D2 | Paul | |
| + |
| +## Appendix A. Fable 5.2 assessment, 2026-11-13 (summary) |
| + |
| +- **Tito is flat on purpose.** `scripts/bootstrap-box.sh:62-76` (Tito carlos-infrastructure) sets `CARLOS_LAYOUT_DEFAULT=flat` until PRO-5614, because nesting broke titogo's router, Stripe webhooks and PDFs on staging (PRO-5460). The titogo fix merged (952fb18d, 2026-10-20); the staging re-migration that proves it is still to do (`staging/RUNBOOK-bringup.md:118`). |
| +- **Titogo's half is unbuilt.** `titogo control adopt` and `retire` do not exist on titogo main a047187a. |
| +- **The import door is shut** until the seeds floor is published (irreversible), which waits on D1. It also needs every box in the region nested and exactly one box there (`internal/console/seedfloor.go:21-29,98`). Whether standby-ie counts as a second IE box: unknown. |
| +- **Self-serve offline moves:** only plan 1 is on main (953b9fd). Plans 2-4 are on `self-serve-moves-2/3/4`, last touched 2026-10-24/25: 394 commits and about 81k added lines from a 10-21 merge base. A trial merge of branch 4 conflicts in 112 files (67 non-test; 33 add/add from plan 1 sitting unsquashed). Plan 4 is about 4 of 20 tasks built after 12 review rounds. |
| +- **Offline-move limits today:** exactly one target box (`apiinstancemove_offline.go:403`); no fleet or pool records (`apiinstancemove.go:92-99`); off under claims or Phase 1 (`:105`); #413 and #339 open. |
| +- **Nested sources move fine;** landing is flat and the layout pass nests about an hour later (runbook §9). #338 is fixed in d3c5601b. |
| +- **#992** is larger than first sized: `FleetPlacement` has 129 call sites in 77 non-test files. Cheaper variant: target an operator-run pool box in the same deployment (same key, buckets and edges discovery); lift moveGate's pool refusal and fix #413. |
| +- **Most likely failure this weekend:** nesting production without the staging proof. Last time it broke root-domain admin and Stripe webhooks (buyers charged, no order; titogo `internal/relay/deliver_test.go:220`). Reverting five instances took 200 s. |