carlos / platform Public

instances set-environment says 'not found: check --account' for a box route with no instance record, so binding an environment needs root on the box Feature Request closed

Claimed by claude~paul@keymail.dev 2 weeks ago

What happened (titogo, 2026-10-08). Vicky (Tito, product) needed one account to get a per-account config value: TITO_MAX_PROMO_BATCH=10000 for stripeyste.go.tito.io and its sb-stripeyste.go.tito.io sandbox. She did the half the CLI allows remotely, carlos env set --app titogo --account tito --environment stripeyste ..., using carlos 0.21.0. Then she had to ask an engineer to bind the routes, because the only verb that worked for these hosts was carlos route --host <h> --environment stripeyste, run on the box as root over SSM. It also needs AWS_REGION, CARLOS_DEPLOYMENT_BUCKET and CARLOS_RELEASE_PUBKEY exported there.

v0.25.1 has a remote verb for this, but it refused these hosts:

$ carlos instances set-environment --app titogo --account tito --host stripeyste.go.tito.io --environment stripeyste
instances set-environment: not found: check --account and --app, and that your token's address is a member

Account, app and membership were all correct. carlos routes --app titogo --account tito --match stripeyste lists both hosts. The real cause is that they are box-registry routes with no console instance record. They are titogo's legacy controld (titogo@) instances, mirrored into /data/registry.db by titogo's route-sync.

The ask, in two parts:

  1. Fix the error message (small, worth doing on its own). When set-environment or set-channel names a host that carlos routes knows but that has no instance record, say that. Something like "<host> is a box route with no instance record; bind it on the box with carlos route --host <h> --environment <e>, or adopt it as an instance". The current message sends the reader to check their account and membership, which were fine.
  2. Remote binding for these hosts comes from adoption, not from a new verb. Paul's direction (2026-10-08) is that every controld instance converts to platform-run, and that nothing new gets built for the old kind. Once #261 (schedule the adoption door) lands, stripeyste gets an instance record and set-environment works with no further change. Please add this case to #261's acceptance: an adopted controld host keeps its route's environment binding (stripeyste→stripeyste, demo→demo, connect→relay, platform.ie→router), and carlos instances set-environment works on it afterwards.

Also worth knowing: carlos route -h says nothing about set-environment. Someone holding an older CLI (Vicky's 0.21.0) only finds the box-side verb. A line in carlos route -h pointing remote users to carlos instances set-environment would have answered her question ("can a newer carlos bind routes remotely?").

Part 1 and the help line are on main as 04aaa23 (squash of setenv-box-route-error). Part 2 is already on #261's acceptance.

  • When instances set-environment or set-channel gets the membership 404, the CLI now asks the app's route list, which sits behind the same gate. A listed host gets "<host> is a box route with no instance record ... bind it on its box: carlos route --host <h> --environment <e>" (or --channel <c>). A platform canary gets its own message, because carlos route refuses those. An unlisted host gets "no instance named X, and this console's box has no route by that name. your account and app are fine". If the route list also refuses, the old message stays.
  • --host is lowercased before the request.
  • carlos route -h points remote users at carlos instances set-channel / set-environment.
  • The console's routes door gains an additive platform_canary field. The canary message needs a console release; until then canaries get the box-route message.
  • The console's byte-identical 404 for no-record and not-yours is unchanged.

Not released or rolled. Users get it with the next CLI release.