carlos / platform Public

Merge pull request #295 from carlosframework/console-as-an-app

The console is an app: carlos deploy -app console, and a rollback that leaves the box running.

Ten TDD tasks, each reviewed and fixed, then a whole-branch review. Gate run
locally against the merge result (there are no GitHub checks any more —
.amadan/ci.d is the only CI): make test clean of anything this branch causes,
all five cross-compiles green.

The fix that matters most is not about the console. Every unit-backed route
had this: a failed named-unit restart rolled the symlink back but never
STARTED the unit, and try-restart is a no-op on a stopped unit — so the next
pass exited 0 and stamped a version over a service that was down. An honest
failure became the exact lying header the mechanism exists to prevent.

Runbook R0 is done (both boxes surveyed, both stop conditions clear). R1-R8
are owed and start from a clean checkout at this merge commit.
Paul Campbell pushed by paul@keymail.dev fd4b8f4a1dda715c7344773e897a47e1cdd27598 parent 0489037parent 5ee4d51
30 files changed, +6632 −159
  • apimode.go +42 −11
  • apimode_test.go +11 −11
  • apps.go +89 −11
  • apps_test.go +52 −0
  • cli.go +15 −11
  • cmd/console/main.go +18 −2
  • cmd/console/sdnotify.go +46 −0
  • cmd/console/sdnotify_test.go +65 −0
  • deploy.go +143 −7
  • deploy_test.go +414 −2
  • docs/site/cli.md +10 −0
  • docs/superpowers/plans/2026-08-23-console-as-an-app.md +1992 −0
  • docs/superpowers/specs/2026-08-23-console-as-an-app-design.md +563 −0
  • internal/console/apicli.go +214 −11
  • internal/console/apicli_test.go +105 −1
  • internal/console/apiretention.go +16 −0
  • internal/console/apps_claim_test.go +262 −0
  • internal/console/appsettings.go +50 −0
  • internal/console/controlplane.go +436 −0
  • internal/console/controlplane_test.go +866 −0
  • internal/console/migrate_test.go +73 −0
  • internal/console/ownership.go +27 −0
  • internal/console/server.go +108 −11
  • internal/console/server_test.go +40 −5
  • internal/console/store.go +68 −12
  • internal/console/templates/app_settings.html +35 −1
  • internal/host/agent.go +247 −51
  • internal/host/agent_test.go +253 −2
  • internal/release/adopt.go +136 −10
  • internal/release/adopt_test.go +236 −0
apimode.go

Loading diff…

apimode_test.go

Loading diff…

apps.go

Loading diff…

apps_test.go

Loading diff…

cli.go

Loading diff…

cmd/console/main.go

Loading diff…

cmd/console/sdnotify.go

Loading diff…

cmd/console/sdnotify_test.go

Loading diff…

deploy.go

Loading diff…

deploy_test.go

Loading diff…

docs/site/cli.md

Loading diff…

docs/superpowers/plans/2026-08-23-console-as-an-app.md

Loading diff…

docs/superpowers/specs/2026-08-23-console-as-an-app-design.md

Loading diff…

internal/console/apicli.go

Loading diff…

internal/console/apicli_test.go

Loading diff…

internal/console/apiretention.go

Loading diff…

internal/console/apps_claim_test.go

Loading diff…

internal/console/appsettings.go

Loading diff…

internal/console/controlplane.go

Loading diff…

internal/console/controlplane_test.go

Loading diff…

internal/console/migrate_test.go

Loading diff…

internal/console/ownership.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/server_test.go

Loading diff…

internal/console/store.go

Loading diff…

internal/console/templates/app_settings.html

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/agent_test.go

Loading diff…

internal/release/adopt.go

Loading diff…

internal/release/adopt_test.go

Loading diff…