carlos / platform Public

design-nearest-region

New apps get a region of their own. The console guesses the nearest one from the person's timezone (an embedded IANA zone.tab), then from GeoIP (an operator mmdb with DB-IP attribution), then falls back to home. It picks the great-circle nearest region that is positively eligible. Instances created without --region inherit the app's region, except fleet, pooled, static and replica instances. The CLI gains carlos apps create --region, carlos deploy --region and canary --region. /regions gains app_default. scripts/region-service-gate.sh is the rollout gate.

Automatic eligibility, after the final review, requires every live box in a region that reconcile would admit to be fully eligible: hibernation configured, serving the shared pool, accepting inbound, and holding the matching CARLOSSECRETSKEY fingerprint. Liveness comes from fresh status snapshots. Any incomplete or unmatched evidence makes automatic placement home-only for that request.

Copy: 123 strings in docs/superpowers/plans/2026-10-02-nearest-region-copy.json, approved by Paul on 2026-10-02 (121) and 2026-10-03 (D4 corrected, plus C15/C25 no-home fallbacks). TestApprovedCopyIsApplied pins them.

Rollout: follow README "Turning app regions on". Merge and roll with CONSOLEAPPREGIONS OFF (Paul, 2026-10-03). With the switch off, behaviour is unchanged. Turning it on waits for two things:

  • the host-lifecycle claim (#199), because automatic non-home placement is outside the leftover-data rail;
  • #213, so that a box without the secrets key refuses instances. Console-side checks cannot prove what reconcile admits. Boxes must hold CARLOSSECRETSKEY before they are eligible (R9). All four flagship boxes do. Related: #212 (box label collisions).

Gate at 853a3b2c, root re-run at 7d31c145: build, vet and gofmt clean; five cross-compile targets; go test ./... all ok; launchctx ok.

Human

Nearest-region default: new apps get the region nearest their owner, behind CONSOLEAPPREGIONS (off by default). Built and final-reviewed; ready to merge with the switch off.

Commits 73
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity