spec: Equipo release plan rev 3 (Astra round 2 fixes, summary)
The executor drops carlos deploy for ship, promote and read primitives, each behind its own authorizeRelease. Terminal evidence per primitive, with the lock held until then; C5 asks for a digest-bound promote with a status read. Rollback proof adds new-data-old-reader and two-way runner state tests. Production verification is Paul's durable [Works] card; production never rolls back on its own. Adds a summary for Paul.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+170
−44
docs/superpowers/specs/2026-11-11-equipo-release.md+170 −44
CI failed — run details
diff --git a/docs/superpowers/specs/2026-11-11-equipo-release.md b/docs/superpowers/specs/2026-11-11-equipo-release.md| index 90c334ba..0f86a150 100644 |
| --- a/docs/superpowers/specs/2026-11-11-equipo-release.md |
| +++ b/docs/superpowers/specs/2026-11-11-equipo-release.md |
| @@ -1,8 +1,9 @@ |
| # Equipo release, thin v1: plan for approval |
| -Status: 2026-11-11, revision 2, plan only, nothing built. Drafted by |
| +Status: 2026-11-11, revision 3, plan only, nothing built. Drafted by |
| Claude (Opus 5.5) on `release-plan` from main d4b1414. Revision 1 |
| -(339c9e8) drew NOT READY from Astra round 1; §9 maps each finding. Every |
| +(339c9e8) drew NOT READY from Astra round 1; revision 2 (1e00aea) drew |
| +READY AFTER FIXES from round 2; §9 maps every finding. Every |
| security-sensitive slice gets its own spec and Astra review before it is |
| built. Builds on merge |
| authority (`2026-11-11-equipo-merge-authority.md`), thin v1 §3 and §8, |
| @@ -12,6 +13,73 @@ Goal: a narrow release path that Equipo runs itself. A change goes |
| Written, Checked, Reviewed, Merged, Deployed, Verified, and nothing is |
| called shipped until production is verified. |
| +## Summary for Paul |
| + |
| +**What v1 does.** After a merge, Equipo releases main to staging by |
| +itself: |
| +- a build in the offline sandbox, with no credentials; |
| +- a ship, then a promote, each authorized just before it runs; |
| +- a health check, then the runners update, then the smoke checks. |
| + |
| +A failure on staging rolls back on its own only when the release proves |
| +the previous build still works on the new data. Production takes one |
| +approval from you per release and gets exactly the bytes staging |
| +verified. You update the production runner with the existing recipe, |
| +then tap [Works] to mark it verified. Nothing says "shipped" before |
| +that, and production never rolls back without you. |
| + |
| +**What you do or grant:** |
| +- answer D1 to D7; |
| +- run the thin cutover of `equipo`. Production still serves `26ac471`, |
| + from before thin; |
| +- mint the staging `deploy` credential. Mint the production one at your |
| + first production approval; |
| +- approve the Release specialist card; |
| +- switch the staging runner units once (slice 6); |
| +- update production runners by hand; |
| +- tap [Works] or [Something's wrong] after each production release; |
| +- resolve any `uncertain` card; |
| +- for a breaking release, make the backup and restore evidence first. |
| + |
| +**Decisions** (Astra's recommendations; I recommend all seven): |
| +- **D1:** you run the cutover, after a verified staging release, a |
| + backup and a recovery rehearsal. |
| +- **D2:** hosted CI's exact-SHA result is the checks for projects that |
| + have it. |
| +- **D3:** staging releases run automatically once fencing and the |
| + contained build are in. Production takes one approval per release. |
| +- **D4:** automatic rollback on staging only, with proof. Production |
| + rollback is yours. |
| +- **D5:** no production test person yet. Your [Works] is the |
| + verification. |
| +- **D6:** signing before any production runner self-update. |
| +- **D7:** a fixed capability menu with scoped, revocable, audited |
| + grants. |
| + |
| +**Platform requests:** |
| +- **A1** (amadan): per-run hosted CI artifacts, so builds can move to |
| + single-use machines. |
| +- **C4** (Carloku): a `deploy` scope without assets purge and gate |
| + pass. |
| +- **C5** (Carloku): a digest-bound promote with a status read. Until |
| + then, you resolve an uncertain promote. |
| +- Also C1 (a replica position read), C2 (owner instance restore) and C3 |
| + (confirm that `--swap hold` works with a `deploy` credential). |
| + |
| +**Slices.** "Needs you" means your approval: |
| +1. Hosted checks (needs you: the policy). |
| +2. Lifecycle line (copy). |
| +3. Specialists as data (the card). |
| +4. Contained build. |
| +5. Release to staging (the staging credential). |
| +6. Staging runner self-update (the unit change). |
| +7. Production (every release, and the credential). |
| +8. CLI pin bumps (each one). |
| + |
| +Slices 1 and 3 to 8 each get their own spec and Astra review. Today, main |
| +is red and the rename task needs another fix round. Once both are fixed, |
| +the rename task is the end-to-end demo (§5). |
| + |
| ## 1. Current state, verified |
| Checked 2026-11-11 about 15:10 UTC: three read-only `carlos db query` |
| @@ -123,7 +191,7 @@ using Paul's owner login. |
| | Reviewed | `approve` on that SHA | `chat_steps.verdict` | |
| | Merged | the hub merged it | `chat_tasks.merged_sha`, `chat_merge_audit` | |
| | Deployed | a target serves a release containing the merge, with the recorded version and instance digest | `chat_release_targets` (new) | |
| -| Verified | that target passed every release step of §2.4 | `chat_release_targets` (new) | |
| +| Verified | that target passed every step of §2.4: smoke on staging, Paul's [Works] on production | `chat_release_targets` (new), with who and when | |
| Task stage `done` keeps meaning merged; no new stages. Cards show a |
| derived line ("Merged, not released yet", "On staging, verified", "Live, |
| @@ -148,19 +216,35 @@ target. Copy goes through copy review. |
| and JSON fields) made as the staging suite person. The executor |
| interprets this fixed format, against the staging origin only, and |
| runs nothing from the repository. |
| -- **The executor** runs only these commands, built from fixed templates |
| - with the release record's values: `carlos deploy --app <target> |
| - --account oficina --target linux-arm64 --swap hold --version <v> |
| - --timeout 5m --no-prompt <artifact>`, `carlos promote --app <target> |
| - <v> edge`, `carlos channels`, `carlos releases`, and GETs of |
| - `/api/version`, `/healthz` and a new `/api/version/digest` (the |
| - instance's own executable digest). Never assets purge, gate pass, env, |
| - secrets or anything else, though the `deploy` role admits the first |
| - two (request C4 narrows it). |
| +- **The executor never runs `carlos deploy`.** That verb bundles an |
| + optional env apply, a ship and a promote under one call |
| + (`deploy.go:490-505`), and its watch fetches gate passes |
| + (`deploywatch.go:707`). The executor uses three primitives, each one |
| + mutation and each preceded by its own `authorizeRelease`: |
| + 1. **Ship** (uploads, serves nothing): `carlos ship --app <target> |
| + --account oficina --kind binary --target linux-arm64 --swap hold |
| + --version <v> --no-prompt <artifact>`, one POST to `/releases`. |
| + Versions are immutable on the platform: shipping different bytes |
| + under a shipped version is refused, and identical bytes are |
| + answered "already shipped". |
| + 2. **Promote** by version: `carlos promote --app <target> --no-prompt |
| + <v> edge`, one POST to `/promote`, with no watch and no gate pass. |
| + The platform promotes by version, not by release ID or digest, so |
| + digest binding comes from version immutability plus the instance |
| + digest read after promote. Request C5 asks for a digest-bound |
| + promote with a status read. |
| + 3. **Reads**: `carlos releases`, `carlos channels`, and GETs of |
| + `/api/version`, `/healthz` and a new `/api/version/digest` (the |
| + instance's own executable digest). |
| + |
| + It never purges assets, takes gate passes, or touches env, secrets or |
| + anything else, though the `deploy` role admits the first two (request |
| + C4 narrows it). Rollback is the promote primitive with the last |
| + known-good version. |
| **One door.** `authorizeRelease(release, target, action)` runs in the |
| -write transaction immediately before every external mutation (deploy, |
| -promote, rollback, runner update announcement), like `authorizeMerge` |
| +write transaction immediately before every external mutation (ship, |
| +promote, rollback promote, runner update announcement), like `authorizeMerge` |
| (`mergeauth.go:401`). It rebuilds the inputs and writes one audit row. |
| It requires, all at once: |
| - this release holds the project's release lock (§2.3); |
| @@ -173,7 +257,9 @@ It requires, all at once: |
| - the Release grant is active at the revision the approval names, the |
| approver is still an owner, nothing was revoked; |
| - for production, an approval bound to target (app, account, host, |
| - instance id), artifact digests, release id and grant revision. |
| + instance id), artifact digests, release id and grant revision; |
| +- for promote, the version is listed in `carlos releases` for the |
| + target, and the ship that put it there was this release's. |
| Any difference refuses the action and the release stops where it is. |
| No model output reaches this function. |
| @@ -184,9 +270,13 @@ No model output reaches this function. |
| holder_kind merge|release, holder_id, taken_at)`. Merge dispatch and |
| release dispatch both take it in their dispatch transaction and refuse |
| when another holds it. A merge holds it until the merge step settles; a |
| -release holds it from its first mutation until it ends `verified`, |
| -`failed`, `rolled_back`, or until Paul resolves an `uncertain` one. The |
| -lock replaces "no merge in flight" (merge authority §10a). |
| +release holds it from its first mutation until terminal evidence (below) |
| +rules out any later mutation from that release, and it is at a final |
| +state: `verified`, `failed` or `rolled_back`, or `deployed, not |
| +verified` on production, where only Paul's confirmation remains (§2.4). |
| +An `uncertain` release keeps it until Paul resolves it. No new production |
| +release starts while one awaits confirmation. The lock replaces "no |
| +merge in flight" (merge authority §10a). |
| **Release record** (additive migration): `chat_releases` (project, SHA, |
| version, contained tasks, hosted CI repository, run and result, merge |
| @@ -200,14 +290,16 @@ seed record, made by hand once from `staged-artifacts.py record`, makes |
| 42a31cb staging's first known-good. Production gets its own after the |
| cutover. |
| -**Unknown outcomes.** A deploy whose answer is lost, times out or is |
| -unclear is never retried. The executor reconciles by reading `carlos |
| -channels` and the instance's `/api/version` and digest. |
| -- Both show the new version and digest: continue. |
| -- Both show the previous one: `failed`, nothing changed, the lock is |
| - released. |
| -- Anything else, or reads that fail: `uncertain`. The lock is held and |
| - Paul gets a card with what each read said. |
| +**Unknown outcomes.** A primitive whose answer is lost, times out or is |
| +unclear is never retried blindly. Seeing the previous channel and |
| +executable does not prove that a timed-out request will not still land, |
| +so the lock is held until terminal evidence for that primitive: |
| + |
| +| Primitive | Terminal evidence | Until then | |
| +|---|---|---| |
| +| Ship | the version appears in `carlos releases`. A late duplicate cannot change it (immutable) and serves nothing | `uncertain`; one re-ship of the same bytes is allowed, because it is answered "already shipped" or lands the same release and serves nothing | |
| +| Promote, rollback | the channel shows this promote's version, and `/api/version` and digest agree. A late duplicate writes the same pointer | the previous version showing is not terminal. `uncertain`, lock held, Paul's card with every read. Until C5 gives a promote status read, a person resolves it | |
| +| Runner update announcement | an instance transaction, so it committed or it didn't | none | |
| A person's Retry is a new `authorizeRelease`, never a replay. |
| @@ -218,10 +310,24 @@ starts only after the earlier passed. |
| | Step | Passes when | Limit, then | |
| |---|---|---| |
| -| 1 Instance health | after promote, `/api/version`, digest and `/healthz` match | 2 min, then rollback or `uncertain` (§2.6) | |
| +| 1 Instance health | after promote, `/api/version`, digest and `/healthz` match | 2 min, then on staging rollback or `uncertain` (§2.6); on production Paul's rollback card | |
| | 2 Controller handoff | the release step ends on its runner and the instance takes over the release; nothing more runs on the releasing runner | immediate | |
| | 3 Runner convergence | every runner in the required set reports the version in its hello | 45 min, then `runners_behind` (not verified, Paul's card, no rollback) | |
| -| 4 Feature smoke | `release/smoke.json` passes against the target | 10 min, then rollback or `uncertain` | |
| +| 4 Feature check | staging: `release/smoke.json` passes. Production: Paul taps [Works] (below) | staging 10 min, then rollback or `uncertain`; production never times out to verified | |
| + |
| +**Production confirmation.** In place of production smoke, after steps 1 |
| +to 3 pass, an owner-only card goes to Paul: "Equipo production is |
| +serving 9f3c1a2 (version and health checked). Please check: <what the |
| +release record's tasks say to look at, for example rename a project and |
| +see the new title in the list>. [Works] [Something's wrong]". It is |
| +durable and answered once per release. Only an owner on the current |
| +roster can answer, on the current card revision. |
| +- **[Works]** records `verified`, with who and when, in |
| + `chat_release_targets` and the audit. |
| +- **[Something's wrong]** records the answer and opens the rollback |
| + decision card. Production rollback is never automatic in v1. |
| +- **No answer:** it stays "deployed, not verified", with no timeout to |
| + verified. |
| The required runner set is frozen in the record when the release starts: |
| the runners enrolled to the target that were connected in the previous |
| @@ -256,17 +362,28 @@ release, up or down. |
| ### 2.6 Rollback |
| -Automatic rollback (promote the last known-good, then steps 1 and 3 back |
| -at it, state `rolled_back`, once) happens only when the record proves |
| -backward compatibility. All three must hold: |
| +Automatic rollback is staging only in v1: promote the last known-good, |
| +run steps 1 and 3 back at it, and record `rolled_back`, once. It happens |
| +only when the record proves backward compatibility. Production rollback |
| +is always Paul's decision on a card, with the same proof shown on it. |
| +All four must hold: |
| 1. The migration class is `none`, or it is `additive` by an explicit |
| classifier. Only `CREATE TABLE`, `CREATE INDEX` and `ADD COLUMN` |
| count, with no new `NOT NULL` without a default and no new |
| constraint on an existing table. Anything else is `breaking`. |
| 2. A CI test boots the previous known-good build against the new schema |
| - and passes its smoke. The evidence is bound to both SHAs. |
| -3. The runner state version (a constant stamped on the runner's state |
| - directory) is unchanged. |
| + and passes its smoke. |
| +3. **New data, old reader:** a CI test runs the new build's headless |
| + scenarios (tasks, steps, cards, merges, releases), so the database |
| + holds rows the new build wrote. It then boots the previous build on |
| + that database and passes its read checks and smoke. |
| +4. **Runner state, both ways:** a CI test advances a runner state |
| + directory (outbox, sessions, accounts, step records) with the new |
| + runner, then starts the previous runner on it and checks that it |
| + connects, syncs, and resumes or settles its steps. It also does the |
| + reverse, which is the upgrade. |
| + |
| +Evidence for 2 to 4 is bound to both SHAs and recorded on the release. |
| Otherwise: |
| - **Breaking:** a release needs restore evidence before it goes out: |
| @@ -274,7 +391,7 @@ Otherwise: |
| integrity-checked. A failure goes to Paul and never rolls back |
| automatically. |
| - **Failed promotion or failed health:** boot migrations may already |
| - have run, so the outcome is `uncertain` unless items 1 to 3 hold. |
| + have run, so the outcome is `uncertain` unless items 1 to 4 hold. |
| - **Every report** says what failed, where it stopped, what is serving |
| now and what Equipo did. A fix is proposed as a task, never started on |
| its own. |
| @@ -355,6 +472,9 @@ Requests, filed as discussions: |
| - **C3 (Carloku):** confirm that a `deploy` credential may ship with |
| `--swap hold`. |
| - **C4 (Carloku):** a `deploy` scope without assets purge and gate pass. |
| +- **C5 (Carloku):** a promote bound to the shipped release's digest (or |
| + ID), with an idempotency key and a status read: landed, refused or |
| + expired. Until then, a person resolves an uncertain promote. |
| ## 4. Slices |
| @@ -368,9 +488,9 @@ Paul's approval. |
| | 2 Lifecycle line | cards and pages show the six states from rows | copy | no | |
| | 3 Specialists as data | Release approved on staging through the card; grant and audit rows exist; a widening is refused | the card | yes | |
| | 4 Prefetch and contained build | a release build of a main SHA comes out of the checks containment with digests and provenance; the host runs no repository code | no | yes | |
| -| 5 Release to staging | lock, `authorizeRelease`, record, the four steps (runners by hand, §2.4), smoke data, reconciliation; a forced smoke failure on an additive release rolls back | the staging credential | yes | |
| +| 5 Release to staging | lock, `authorizeRelease`, record, ship and promote as separate primitives, the four steps (runners by hand, §2.4), smoke data, reconciliation, the rollback proofs in CI; a forced smoke failure on a proven release rolls back | the staging credential | yes | |
| | 6 Staging runner self-update | after a staging release both staging runners update on their own, releasing runner last, no step interrupted | the unit change | yes | |
| -| 7 Production | after one approval, the staging-verified artifact file, digest rechecked, deployed to `equipo` (another app, so `carlos deploy`, never a rebuild); production runners updated by hand; Paul confirms the behaviour | each release, the credential | yes | |
| +| 7 Production | after one approval, the staging-verified artifact file, digest rechecked, shipped and promoted to `equipo` (never rebuilt); production runners updated by hand; Paul's [Works] records verified | each release, the credential | yes | |
| | 8 CLI pins | a pin bump goes through a security review, then a release | yes | yes | |
| Order: 1 and 2, then 3, 4, 5, 6, the staging demo, 7, 8. |
| @@ -415,8 +535,10 @@ one-line copy change through the same path. |
| - backup and restore evidence for breaking releases (until C1); |
| - any database restore (until C2); |
| - env and secret changes; |
| - - Paul's behaviour check on production (D5); |
| - - resolving every `uncertain` and `runners_behind` card. |
| + - Paul's [Works] confirmation on production (D5); |
| + - resolving every `uncertain` and `runners_behind` card (an uncertain |
| + promote until C5); |
| + - every production rollback decision. |
| - **Not covered:** the Mac worker is not connected, so its update path is |
| untested live. |
| @@ -429,10 +551,10 @@ one-line copy change through the same path. |
| - **D3:** staging releases run automatically, once authority fencing |
| (slice 5) and build isolation (slice 4) are in. Production takes one |
| approval per release. |
| -- **D4:** rollback is automatic only with the backward-compatibility |
| - proof of §2.6. Otherwise it is your card. |
| -- **D5:** the production test person is deferred. Your behavioural |
| - confirmation stays. |
| +- **D4:** rollback is automatic only on staging, with the four proofs of |
| + §2.6. Production rollback is always your card in v1. |
| +- **D5:** the production test person is deferred. Your [Works] card is |
| + production's verification. |
| - **D6:** signing is required before production self-update. The keys |
| must be inaccessible to builds, and the verification keys installed |
| independently of the instance. |
| @@ -448,7 +570,7 @@ one-line copy change through the same path. |
| - Mac worker updates driven by releases (it keeps `macUpdater`). |
| - A per-release migration rehearsal, and restore by Equipo (after C2). |
| -## 9. Round 1 findings and where they went |
| +## 9. Review findings and where they went |
| | Finding | Where | |
| |---|---| |
| @@ -460,3 +582,7 @@ one-line copy change through the same path. |
| | Important: rollback safety | §2.6 three proofs, seed record, restore evidence, boot migrations uncertain | |
| | Important: checks and slices | §2.7; slice 5 has a manual runner bridge; pins security-reviewed (slice 8) | |
| | Minor: Engineering claim, deploy role reach | §1 corrected; executor allowlist and request C4 | |
| +| Round 2 Critical: `carlos deploy` bundles mutations | §2.2 ship, promote and read primitives, each authorized; C5 | |
| +| Round 2: uncertain outcomes | §2.3 terminal evidence per primitive; lock held until then | |
| +| Round 2: rollback proof | §2.6 items 3 and 4 | |
| +| Round 2 Important: production verification | §2.4 production confirmation card | |