carlos / platform Public

docs: promote a tested release from staging to production

Adds the two-job CI recipe (releases pull, then ship --from-release and
promote) for #1389, and says a deploy runs the release command once per
instance, not once per copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev af7db08f57146952f7218f53334e648632c1b6c6 parent 429e663
2 files changed, +31 −1
  • docs/site/cli.md +30 −0
  • docs/site/stateless-replicas.md +1 −1

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-T6wgCI
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/net v0.62.0
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/mathutil v1.7.1

amadan: job cancelled — a newer push superseded it

Intent

Human

<task-notification> <task-id>a6ec5c81d011f6c87</task-id> <tool-use-id>toolu_014BcrBo65ukgFbskrEQwSPk</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a88005ac-72e4-481c-884f-581940b8c2c5/tasks/a6ec5c81d011f6c87.output</output-file> <status>completed</status> <summary>Agent "Implement Task 4: ship --from-release" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE. Both review findings are fixed. Commit: 429e6636 `cli: ship --from-release checks the asset folders the console echoes` - **Missing assets check:** `--from-release` now checks the asset folders the console sends back, using the existing `checkAssetsEcho`, alongside the other checks in a new `checkFromReleaseAnswer`. If the console's answer leaves the folders out or changes them, the ship fails. The new test `TestCheckFromReleaseAnswerAssets` covers both cases, and it fails when that check is removed. - **Unsafe-name test:** `TestLoadReleaseDirRefusesUnsafeNames` now puts a real `../x` that matches the manifest next to the directory, and checks for the exact unsafe-name refusal. - **One behaviour change:** an answer that is not valid JSON now fails first, as "ship: malformed response". Tests: all 10 targeted tests pass; darwin and windows test builds ok; `make code-health` fails only on the two known counts (handleAPIShip, server.go). Concerns: none new. The known packed-refs.lock warning appeared again, and the commit landed. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/release-copy-across-consoles/.superpowers/sdd/2026-11-25-release-copy-across-consoles/task-4-report.md (fix round 1 added at the end)</result> <usage><subagent_tokens>140514</subagent_tokens><tool_uses>7</tool_uses><duration_ms>127481</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>blijv1oh4</task-id> <tool-use-id>toolu_01KttAPVwD94zAwTVNJRN64J</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/a88005ac-72e4-481c-884f-581940b8c2c5/tasks/blijv1oh4.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.paseo/zerosub/homes/claude-37fe90ef3f56/plugins/cache/claude-plugins-official/superpowers/7.0.2/skills/subagent-driven-development; W=$PWD/.superpowers/sdd/2026-11-25-release-copy-across-consoles; bash $S/scripts/review-package docs/superpowers/plans/2026-11-25-release-copy-across-consoles.md 32bedc1d HEAD | tail -1; cat &gt; $W/task-4-rereview-scope.md &lt;&lt;EOF SCOPED RE-REVIEW (round 1). Follow the fenced block of $S/re-review-prompt.md instead of the full task review. Findings to verdict ADDRESSED / NOT ADDRESSED: the Important and the Minor finding in $W/task-4-review-r1.md. Flag only new breakage in this fix diff. EOF git push -q 2&gt;&amp;1|tail -1; $W/astra-review.sh "Task 4 (re-review round 1)" $W/task-4-brief.md $W/task-4-report.md $W/review-32bedc1d..429e6636.diff $W/task-4-review-r2.md $W/task-4-rereview-scope.md &gt; $W/task-4-review-r2.log 2&gt;&amp;1; echo exit=$?; cat $W/task-4-review-r2.md" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 12.6 g CO₂e (1,472,733 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on release-copy-across-consoles, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/site/cli.md b/docs/site/cli.md
index 938f38506..168387ca3 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -618,6 +618,36 @@ removes destinations, so you don't need to edit the file yourself.
`--target` is unrelated: it names the platform (GOOS-GOARCH) a binary was
built for.
+#### Staging tests X, production promotes X
+
+To run in production the exact build that staging tested, copy the release
+from one console to the other instead of building it twice. Use two CI jobs,
+each with its own deploy credential (`CARLOS_SERVICE_TOKEN`) for `shop`.
+
+Job 1 runs against the staging console. It ships, runs your tests, then
+pulls the release into a directory and keeps that directory as a CI artifact:
+
+```sh
+export CARLOS_CONSOLE=https://staging.example.com
+carlos ship ./bin/server --app shop
+# run your tests against staging here
+carlos releases pull v12 --app shop --out release
+```
+
+Job 2 runs against the production console. It downloads the artifact, ships
+the same release and promotes it:
+
+```sh
+export CARLOS_CONSOLE=https://carlos.example.com
+carlos ship --from-release release --app shop
+carlos promote --app shop v12 edge
+```
+
+The bytes are identical on both consoles. Each console writes and signs its
+own manifest, and production refuses any file whose digest differs from the
+release's, storing nothing. A deploy credential can promote to `canary`,
+`edge` and `beta`, but not `stable`.
+
### carlos canary
Deploy onto a host and a channel belonging to this branch alone, so nothing
diff --git a/docs/site/stateless-replicas.md b/docs/site/stateless-replicas.md
index 6e1ec8535..f7b7a5a34 100644
--- a/docs/site/stateless-replicas.md
+++ b/docs/site/stateless-replicas.md
@@ -26,7 +26,7 @@ More than one copy needs an always-on release. Set --copies 1 and wait for remov
## Deploys
-A deploy runs the release command once per instance, then switches its copies one box at a time. Your migrations must allow old and new code to serve together. Each copy runs every declared worker.
+A deploy runs the release command once per instance, not once per copy, then switches its copies one box at a time. Your migrations must allow old and new code to serve together. Each copy runs every declared worker.
When a copy switches, its old build stops once the new one serves. A response still streaming from the old build when it stops is cut, as when a box stops. Websockets on the old build disconnect and their clients reconnect to a healthy copy.