carlos / platform Public

zdd-6 task 5: fix round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 5755c6e0735a7f10318b962f8488acffe3374d6e parent a454358
2 files changed, +15 −0
  • apps.go +2 −0
  • apps_swap.go +13 −0
diff --git a/apps.go b/apps.go
index 48246d3e6..54d0ecc04 100644
--- a/apps.go
+++ b/apps.go
@@ -34,6 +34,8 @@ import (
"github.com/carlosframework/platform/internal/release"
)
+// TODO-COPY zdd.apps.usage-line
+// TODO-COPY zdd.apps.usage-set
const appsUsage = `usage: carlos apps <create|place|build-probe|set|delete|restore|ttl|keep|list> [flags] <app>
create --app <name> [flags] claim a new app name in an account, through
diff --git a/apps_swap.go b/apps_swap.go
index f000176b3..879632841 100644
--- a/apps_swap.go
+++ b/apps_swap.go
@@ -15,6 +15,7 @@ import (
"strings"
)
+// TODO-COPY zdd.apps-set.usage
const appsSetUsage = `usage: carlos apps set <app> [--swap overlap|hold] [--swap-concurrency <n>] [--account <sqid|name>] [--account-id <sqid>] [--console <origin>]
--swap overlap|hold how a running instance takes a new build. overlap
@@ -31,17 +32,29 @@ Any member of the app may change these. They reach the app's boxes with its
config, within seconds.`
const (
+ // TODO-COPY zdd.apps-set.flag-swap
appsSetFlagSwap = "overlap or hold: how a running instance takes a new build"
+ // TODO-COPY zdd.apps-set.flag-concurrency
appsSetFlagConcurrency = "how many instances of the app may swap at once on one box (1 or more)"
+ // TODO-COPY zdd.apps-set.nothing
appsSetNothing = "apps set: nothing to set. Pass --swap, --swap-concurrency, or both"
+ // TODO-COPY zdd.apps-set.bad-swap
appsSetBadSwap = "apps set: --swap is overlap or hold, not %q"
+ // TODO-COPY zdd.apps-set.bad-concurrency
appsSetBadConcurrency = "apps set: --swap-concurrency must be 1 or more"
+ // TODO-COPY zdd.apps-set.two-apps
appsSetTwoApps = "apps set: name the app once, either first or with --app"
+ // TODO-COPY zdd.apps-set.direct-mode
appsSetDirectMode = "apps set works through a console, and this shell is in direct bucket mode (CARLOS_DEPLOYMENT_BUCKET or CARLOS_DEPLOYMENT_DIR is set). Log in instead: carlos auth login --console <url>"
+ // TODO-COPY zdd.apps-set.done
appsSetDone = "%s swaps in %s mode, %d at a time on each box"
+ // TODO-COPY zdd.apps-set.overlap-note
appsSetOverlapNote = " the old and new builds run side by side for a few seconds and share the database, so keep migrations backward-compatible"
+ // TODO-COPY zdd.apps-set.hold-note
appsSetHoldNote = " each instance stops before its new build starts, and requests wait until it is up"
+ // TODO-COPY zdd.apps-set.mismatch
appsSetMismatch = "apps set: the change did not stick (the console stored %s, %d at a time). Run it again"
+ // TODO-COPY zdd.apps-set.old-console
appsSetOldConsole = "not found: either %s is not an app in this account, or this console predates carlos apps set (deploy a console built from current main)"
)