README: the hostname history, its window, floor and restores; Turning app regions on gains step 0 and new probe hostnames (Task 13)
Approved text applied verbatim (docs/superpowers/notes/copy/nearest-region-never-reuse-b.md, F). The new section sits just before "Turning app regions on", whose new step 0 refers to it as above.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+60
−1
README.md+60 −1
CI cancelled — superseded by a newer push — run details
diff --git a/README.md b/README.md| index 555a4283e..6d8f241ee 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -334,8 +334,65 @@ own rollback: it stops new non-home regions and keeps existing ones in force. |
| The first release that understands app regions is v0.23.0. |
| +**The hostname history.** Once app regions are on, a hostname that has |
| +held an app's data is never given to a new instance again, in any region. |
| +Its old data may still sit in a bucket or on a box, and a new instance with |
| +the same name would read it. The console keeps a history of every hostname |
| +that may hold data, under `control/hosts-used/`, and refuses to create one |
| +again. Static sites and services hold no data and are not recorded. |
| + |
| +The history has four modes, which `carlos system hosts-used status` shows: |
| + |
| +- incomplete, from the release until the history is completed. New |
| + hostnames are recorded and nothing is refused. App regions stay off. |
| +- activating, while the maintenance window below is open. New instances, |
| + moves and placement changes are paused. |
| +- active. A recorded hostname is refused everywhere, and app regions can |
| + be turned on. |
| +- invalidated, when the console finds a record the history does not |
| + cover, or an operator invalidates it. New instances are refused until |
| + the window is run again. |
| + |
| +**Completing the history.** Complete it once per deployment, starting in |
| +dev. It needs a maintenance window. Announce it because new instances, |
| +moves and placement changes are refused while it is open. |
| + |
| +1. Run `carlos system hosts-used begin`. The console fixes its list of |
| + regions, pools, fleets and boxes from this moment. |
| +2. Run `carlos system hosts-used status` until every count is 0. Work |
| + admitted before the window finishes on its own. |
| +3. Scan every target on the list with `scripts/hosts-used-scan-aws.sh` |
| + (in infra) and run `carlos system hosts-used import <file>`. Every |
| + target needs a listing that imports successfully. |
| +4. A fleet that cannot be scanned can be closed instead, with |
| + `carlos system hosts-used close-fleet <fleet>`. A closed fleet takes no |
| + new instances. Regions and pools cannot be closed. |
| +5. Run `carlos system hosts-used complete`. It refuses while anything is |
| + unsettled, unscanned or unreadable, and reports the problem. On success |
| + the mode is active and the floor is written. |
| +6. Or run `carlos system hosts-used cancel` at any point. Nothing is lost: |
| + the hostnames recorded so far stay recorded. |
| + |
| +Two limits. A deployment runs one console process; a second console would |
| +not see the first one's mode. And a region, pool or fleet added after |
| +completion takes no new instances until its own listing is imported. |
| + |
| +**The history's floor.** Completing writes the floor to |
| +`control/hosts-used/@floor`. The floor is the release that completed the |
| +history, and `status` shows it. From then on, never run a console or |
| +`carlos accounts migrate` older than the floor: an older build creates |
| +records without recording them. The roll script refuses a console below |
| +the floor, and `carlos accounts migrate` refuses to run below it. |
| + |
| +**Restores.** Restoring the console's database alone is safe. A restore of |
| +the control bucket must keep every object under `control/hosts-used/`. If |
| +any objects may have been dropped, run `carlos system hosts-used |
| +invalidate` and complete the history again. |
| + |
| **Turning app regions on.** In order: |
| +0. Complete the hostname history (above). Until it is active, |
| + turning the switch on has no effect. |
| 1. Stage the deployment's `CARLOS_SECRETS_KEY` on every box in every region |
| that should take placed instances, and set `CARLOS_SECRETS_PUBKEY` on the |
| console. A box without the key refuses to mint or wake placed exec instances |
| @@ -350,7 +407,9 @@ The first release that understands app regions is v0.23.0. |
| 5. On production, with the switch still off, create one probe instance per |
| eligible region with an explicit `--region`, deploy a known build, and run |
| `scripts/region-service-gate.sh <probe-host> <build> <every other edge EIP>` |
| - for each. Every region must pass. Delete the probes. |
| + for each. Every region must pass. Delete the probes. Use new probe |
| + hostnames every run. A probe hostname is recorded once created, so it |
| + can never be created again. |
| 6. Turn the switch on. Re-run step 5 after any period with the switch off, |
| and whenever a new region becomes eligible. |