carlos / platform Public

Sidecar create with the home region code (-region ie) is refused with S4 once the hostname history is active open

Found during Task 14 on dev (2026-10-27, v0.28.28), right after the hostname history went active.

carlos sidecars create -region ie -app shop-t14 shopt14ie is refused with S4: "New instances can't be created on ie yet. Choose another region." ie is dev's home region code (CONSOLE_HOME_REGION=ie).

The instance door maps the home code to the home placement before its checks (instances create --region ie worked and showed Dublin (IE)). The sidecar door (internal/console/apisidecars.go, around line 274) keeps req.Region as typed and passes it to hostsTargetRefusal, which looks up region:ie. Activation examined only region: and region:uk, so the lookup fails.

The same sidecar created with no -region lands in Dublin (IE) and is accepted. So the workaround is to leave out -region for the home region. A sidecar with an explicit home code was accepted before activation. I haven't checked whether boxes ever served such a record.

CONSOLE_APP_REGIONS doesn't change this: the sidecar door reads only the request's region or the app's fleet placement, never the app region.

Suggested fix: normalise the home code in the sidecar door the way the instance door does, before the S4 check, with a witness through the HTTP door. Not fixed here (Task 14 is operator work only).

Fixed on main as 50c0cb14 (branch nearest-region-followups, squash; not released).

The sidecar create door (internal/console/apisidecars.go) now normalises the home's name with homeRegionIn before any validation, as the instance door has since #346. So -region ie on a deployment with CONSOLE_HOME_REGION=ie is a home create: S4 sees the examined region:, the leftover rail runs for the home, and the record is stored with region "", which the home's boxes serve. Before this, a pre-activation sidecar created with -region ie was stored as ie, and no dev box serves that region, so it would never have run. Any such records still on dev or flagship are worth a look.

The instance door already normalised. Its path is in the same witness (internal/console/hostsused_homecode_test.go: real activation with home placement "" and uk, then sidecar and instance creates through the HTTP doors with and without -region ie, lifetimes off and on; mutation-checked). The allow-list keeps the instance door's existing rule: a manifest allow-list naming the home's name does not admit the home (pinned by C17). The sidecar door now matches that, and its refusal names the home as ie instead of an empty string.