carlos / platform Public

deploy-credential: a rung-scoped deploy credential so CI promotes through the console (#229)

A `deploy` service role with a rung scope (canary, edge, beta; never
stable). CI ships, promotes and rolls back through the console with no
more authority than a scoped release key, and can run `carlos deploy`
(R6). Each deploy promote is signed by a request-local scoped grant, so
boxes still verify the rung limit. The scope check runs in the handlers
and, authoritatively, inside the release primitives between the pointer
read and the conditional write (G1/G2; the in-flight gap accepted, R5).
The CLI reads CARLOS_SERVICE_TOKEN with CARLOS_CONSOLE. README and CLI
docs point CI at the console; direct-bucket mode is the operator's path.

Spec docs/superpowers/specs/2026-10-05-deploy-credential-design.md
(rev 5.2, five Astra rounds); plan docs/superpowers/plans/
2026-10-05-deploy-credential.md. Every task reviewed; Astra whole-branch
review fixed and re-reviewed; full gate and CI green on 91026571.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from design-deploy-credential into main.
claude agent, operated by paul@keymail.dev d1dab9a91fbe716a9f7fc9343fa92ca1c81ea33e parent aadb860
38 files changed, +5630 −77
  • README.md +22 −6
  • apimode.go +46 −9
  • apimode_test.go +194 −0
  • docs/site/cli.md +8 −2
  • docs/superpowers/plans/2026-10-05-deploy-credential.md +2247 −0
  • docs/superpowers/specs/2026-10-05-deploy-credential-design.md +719 −0
  • docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R1.md +43 −0
  • docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R2.md +34 −0
  • docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R3.md +50 −0
  • docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R4.md +40 −0
  • docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R5.md +10 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-DEPLOY-CREDENTIAL.md +157 −0
  • e2e_test.go +11 −1
  • internal/console/apicli.go +61 −3
  • internal/console/apiservices.go +42 −3
  • internal/console/authcli.go +13 −13
  • internal/console/authstore.go +10 −3
  • internal/console/deploycred_test.go +154 −0
  • internal/console/deploydoors_test.go +80 −0
  • internal/console/deploymint_test.go +138 −0
  • internal/console/deploymixed_test.go +95 −0
  • internal/console/deployscope.go +170 −0
  • internal/console/deployscope_test.go +181 −0
  • internal/console/deploysign_test.go +251 −0
  • internal/console/server.go +1 −0
  • internal/console/svcpage.go +53 −3
  • internal/console/svcprincipal.go +62 −13
  • internal/console/templates/account_settings.html +5 −2
  • internal/release/authorize.go +14 −0
  • internal/release/authorize_sim_test.go +189 −0
  • internal/release/authorize_test.go +329 −0
  • internal/release/release.go +56 −1
  • internal/svcrole/svcrole.go +8 −2
  • internal/svcrole/svcrole_test.go +20 −0
  • main_test.go +16 −0
  • scopedkeys_e2e_test.go +11 −1
  • services.go +28 −10
  • services_cli_test.go +62 −5

CI passed — run details

README.md

Loading diff…

apimode.go

Loading diff…

apimode_test.go

Loading diff…

docs/site/cli.md

Loading diff…

docs/superpowers/plans/2026-10-05-deploy-credential.md

Loading diff…

docs/superpowers/specs/2026-10-05-deploy-credential-design.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R1.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R2.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R3.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R4.md

Loading diff…

docs/superpowers/specs/CODEX-FINDINGS-DEPLOY-CREDENTIAL-R5.md

Loading diff…

docs/superpowers/specs/CODEX-REVIEW-BRIEF-DEPLOY-CREDENTIAL.md

Loading diff…

e2e_test.go

Loading diff…

internal/console/apicli.go

Loading diff…

internal/console/apiservices.go

Loading diff…

internal/console/authcli.go

Loading diff…

internal/console/authstore.go

Loading diff…

internal/console/deploycred_test.go

Loading diff…

internal/console/deploydoors_test.go

Loading diff…

internal/console/deploymint_test.go

Loading diff…

internal/console/deploymixed_test.go

Loading diff…

internal/console/deployscope.go

Loading diff…

internal/console/deployscope_test.go

Loading diff…

internal/console/deploysign_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/svcpage.go

Loading diff…

internal/console/svcprincipal.go

Loading diff…

internal/console/templates/account_settings.html

Loading diff…

internal/release/authorize.go

Loading diff…

internal/release/authorize_sim_test.go

Loading diff…

internal/release/authorize_test.go

Loading diff…

internal/release/release.go

Loading diff…

internal/svcrole/svcrole.go

Loading diff…

internal/svcrole/svcrole_test.go

Loading diff…

main_test.go

Loading diff…

scopedkeys_e2e_test.go

Loading diff…

services.go

Loading diff…

services_cli_test.go

Loading diff…