spec rev 3.1: console secrets, Save requests no restart
Applies Paul's cut for Astra round 3: the restarted-by-Carloku class is empty, the button is plain Save, managed sidecars update themselves and unknown or unmanaged ones say check Running. Drops the sidecar arm.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/specs/2026-11-08-console-secrets-design.md+63 −57
CI cancelled — superseded by a newer push — run details
Intent
<paseo-system version="1" kind="agent-message" source-agent-id="0c43522f-abd7-4e8b-a287-4ece2f0919cf" message-id="6856eb41-26cc-4add-8591-404eae6f2d7a" source-agent-title="Console secrets spec rev 3 + Astra round 3 (design)"> Console secrets round 3 (the last): NOT READY, so I've stopped as the brief says. Rev 3 is 8ef4189a and the findings are 59b6ee71 (CODEX-FINDINGS-console-secrets-R3.md), both committed locally and not pushed. Round 2's absence family is now CLOSED: there is no 'unused' outcome, and remote copies show as 'can't see'. The restart-scope family is still OPEN, with one P1 and one P2, and both come from one cause: treating every sidecar as 'restarted by Carloku'. P1: once the rollout manager is armed, a managed sidecar already restarts when its config is delivered (syncexec.go:635, rollout ConfigDelivered), so an explicit request from Save would restart it a second time. P2: writeRestartScope takes one host or environment, not a list of hosts, so naming several sidecars means several requests, which can partly fail and then double-restart on retry. Astra says leaving the 'restarted by Carloku' class empty fixes both. That was already the spec's named alternative. Decision for Paul: accept that cut. Save would then request no restart at all. Every route would fall in one of: updates itself, restart it yourself, asleep, or can't see. Sidecars would say 'updates itself' when managed, and otherwise 'check Running and restart the app if needed'. With that ruling the fix is a small edit to the spec and the mockup (the 'Restart requested' row goes), so no new round. The v2 mockup is up with Paul's tidy-up. </paseo-system>
<paseo-system version="1" kind="agent-message" source-agent-id="55f1f6a4-252a-4d89-af7b-a8a460b2b81d" message-id="71a96834-785c-4a64-812c-32aaa32e5006"> Coordinator 55f1f6a: Paul ACCEPTED the cut: Save never requests a restart; the 'restarted by Carloku' class is empty; every route is 'updates itself', 'restart it yourself' (with how), 'asleep' or 'can't see'; managed sidecars say 'updates itself', others 'check Running and restart the app if needed'. Rename the button to plain 'Save' (it no longer restarts anything itself) unless the copy reads better otherwise. Apply as the round-3 fix (no new round), update spec rev 3.1 and the mockup (new filename settings-secrets-v3.html so Paul's tab refreshes), commit, PUSH the branch (8ef4189a and 59b6ee71 are unpushed), then tell me and stop. </paseo-system>
Attributed to this commit: 29.6 g CO₂e (3,637,643 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-console-secrets, 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/superpowers/specs/2026-11-08-console-secrets-design.md b/docs/superpowers/specs/2026-11-08-console-secrets-design.md| index 8ba22e306..23e674645 100644 |
| --- a/docs/superpowers/specs/2026-11-08-console-secrets-design.md |
| +++ b/docs/superpowers/specs/2026-11-08-console-secrets-design.md |
| @@ -1,13 +1,17 @@ |
| # Settings and secrets in the console (slice 2) |
| -Status: rev 3 for Paul, 2026-11-08. Astra round 1: |
| +Status: rev 3.1 for Paul, 2026-11-08. Astra round 1: |
| `CODEX-FINDINGS-console-secrets.md` (NOT READY, P1 x3, P2 x6), all |
| accepted, marked **(codex N)**. Round 2: |
| `CODEX-FINDINGS-console-secrets-R2.md` (NOT READY, P1 x1, P2 x1, both |
| recurring families); answered by Paul's ruling (one button, one shared |
| delivery classification with guard tests), marked **(codex R2-N)**. Slice 2 |
| of "agent-first onboarding and console parity" (slice 0 agent login by |
| -link, v0.34.27; slice 1 Getting started checklist, v0.34.28). |
| +link, v0.34.27; slice 1 Getting started checklist, v0.34.28). Round 3: |
| +`CODEX-FINDINGS-console-secrets-R3.md` (NOT READY: P1 managed sidecars |
| +already restart on delivery, P2 one scope per request, one cause). Paul |
| +accepted the cut Astra named: Save never requests a restart, and the button |
| +is plain **Save**. Rev 3.1 applies it, marked **(codex R3-N)**; no new round. |
| ## Why |
| @@ -25,7 +29,9 @@ you to use the CLI. |
| section, one card per environment, ordinary settings and secrets |
| together, because `carlos secrets` is "the same shape as `carlos env`, |
| sealed" and both write the same per-environment bundle. |
| -- Saving applies **immediately**: the app restarts on save. |
| +- Saving applies **immediately**: the app restarts on save. (Rev 3.1: |
| + what CARLOS runs restarts by itself when the config lands; the page says |
| + plainly which routes need you.) |
| ## What |
| @@ -41,11 +47,11 @@ read-only view): |
| - Add a variable: name, value, and a "Secret" checkbox, ticked by default |
| when the name looks like a credential (contains KEY, TOKEN, SECRET, |
| PASSWORD, PASS, PRIVATE, DSN, or the value looks like one). |
| -- Changes are staged on the page and applied together with one **Save and |
| - restart** button, in a bar that appears only while something is staged: |
| - one config write, then at most one restart request, for only the routes |
| - Carloku can actually restart (see "How Save applies"), so no route cycles |
| - twice. The page then shows, per route, which of the shared delivery |
| +- Changes are staged on the page and applied together with one **Save** |
| + button, in a bar that appears only while something is staged: one config |
| + write and nothing else. Save requests no restart **(codex R3-1, R3-2)**: |
| + every route either restarts by itself on delivery or cannot be restarted |
| + from here. The page then shows, per route, which of the shared delivery |
| classes it falls in, in plain words **(codex R2-1, R2-2)**. |
| - Layout (rev 3, Paul's 390 px review): one compact row per variable (name, |
| then the value or a quiet "Sealed", then one trailing Edit that opens |
| @@ -78,9 +84,10 @@ opens with the Go `Open` (v2 bound) and fails for the wrong app. |
| - Everything `carlos env set|unset` and `carlos secrets set|unset` can do |
| for an app's environments can be done here, with the same refusals. |
| - The console still never handles a secret's plaintext. |
| -- At most one restart per route per save, requested only where Carloku can |
| - perform it, with an honest per-route outcome that never claims a restart |
| - it can't perform or an absence it can't establish **(codex R2-1, R2-2)**. |
| +- Save restarts nothing itself and never claims a restart it can't |
| + perform or an absence it can't establish; each route's outcome is an |
| + honest expectation from one shared classification **(codex R2-1, R2-2, |
| + R3-1)**. |
| - Existing console components only (docs/console-styleguide.md; mockups |
| with docs/console-mockup-kit); checked at 390 px. |
| @@ -103,11 +110,11 @@ CSRF on every mutation (the star handler pattern), the same role gates as |
| the CLI doors, copy through the Luna pass (house rules), census and Astra |
| reviews as usual, console-only release through the agent manager. |
| -## How Save applies (rev 3; replaces rev 2's section) **(codex R2-1, R2-2)** |
| +## How Save applies (rev 3.1; replaces rev 2's section) **(codex R2-1, R2-2, R3-1, R3-2)** |
| -Paul's ruling after round 2: keep ONE "Save and restart" button, and sort |
| -every route the write reaches with ONE shared classification, guarded by |
| -tests. Rev 2's rule ("request a host-scoped restart for whatever |
| +Paul's ruling after round 2: one button, and sort every route the write |
| +reaches with ONE shared classification, guarded by tests. His ruling after |
| +round 3: Save requests no restart at all, so the button is plain "Save". Rev 2's rule ("request a host-scoped restart for whatever |
| `configRestartNotice.Hosts` lists") is withdrawn: those hosts are exactly the |
| routes CARLOS cannot restart. |
| @@ -118,7 +125,7 @@ routes CARLOS cannot restart. |
| | carlos-app@ unit (`Backing == BackingUnit`) | root `Sync` | `Sync`, on a content change | `sync.go`, `unitDelivered` | |
| | Stamped named unit (`stampedForDelivery`) | root pass | root pass (`applyStamped`), unless the rails block it | `stamped.go`, `BlockedStamps` | |
| | Socket exec (`execSyncable`) | agent `SyncExec` | `SyncExec`'s bounce (or the scheduler's config attempt when `Managed`); a no-op on a sleeping instance, which execs fresh on wake | `syncexec.go` inScope | |
| -| Sidecar (`execSidecarCandidate`) | agent `SyncExec` | nobody on delivery (bounce without a wake would strand it). Only the APP-WIDE restart cycles it (`cycleWorkers`, stop then wake, never waking a sleeper); the narrowed restart reaches no sidecar (`scopedHosts` gates on `release.Adoptable`) | `restart.go` ~886 | |
| +| Sidecar (`execSidecarCandidate`) | agent `SyncExec` | when the box's rollout manager manages it: the scheduler's config attempt (`SyncExec` keeps `Delivered` for a managed sidecar, `rollout.Manager.ConfigDelivered`; `host/rollout_test.go` ~925). Otherwise nobody on delivery (bounce without a wake would strand it); only the APP-WIDE restart cycles it (`cycleWorkers`, stop then wake, never waking a sleeper); the narrowed restart reaches no sidecar (`scopedHosts` gates on `release.Adoptable`) | `restart.go` ~886 | |
| | TCP addr, opted in (`execAddrCandidate` + `exec_delivery: file`) | agent `SyncExec`, as a file | nobody: CARLOS neither spawns nor owns the process; the agent's bounce has no child for it and the root fallback tries `carlos-app@<host>`, not the app's supervisor | `awaitingrestart_test.go:25`, `restartscope.go:419`, `rootrestart.go:551` | |
| | TCP addr, not opted in | nobody | nobody | `AwaitingRestart` Undelivered | |
| @@ -133,15 +140,22 @@ table (it calls `unitDelivered`, `stampedForDelivery`, `execSyncable`, |
| console page are the same computation. Every route the write reaches lands in |
| exactly one bucket: |
| -1. **Updates itself** (unit, stamped and not blocked, socket exec). Delivery |
| - restarts it; nothing is requested. Reported as an expectation ("restarts |
| - with the new settings by itself"), never as an observed restart. |
| -2. **Restarted by Carloku** (sidecars only, see below). Save requests a |
| - restart for exactly these hosts and nothing else. |
| -3. **Needs restarting by you** (opted-in TCP addr). The settings file is |
| - delivered; the page says so and says CARLOS can't restart it: "restart it |
| - the way you started it". Save requests nothing for it, and the page shows |
| - no Restart button for it, because none would work. |
| +1. **Updates itself** (unit, stamped and not blocked, socket exec, and a |
| + sidecar whose box manages it, see below). Delivery restarts it; nothing |
| + is requested. Reported as an expectation ("restarts with the new |
| + settings by itself"), never as an observed restart. |
| +2. **Restarted by Carloku: empty in this slice (codex R3-1, R3-2).** Kept |
| + as a named, always-empty bucket so the guard tests pin that Save |
| + requests nothing. Filling it later needs its own design: per-box |
| + knowledge of delivery mode and a batch restart request with defined |
| + partial failure. |
| +3. **Needs restarting by you**, with how: |
| + - opted-in TCP addr: the settings file is delivered and CARLOS can't |
| + restart it: "restart it the way you started it"; |
| + - a sidecar whose box is not known to manage it: "check Running and |
| + restart the app if it hasn't picked this up" (the app-wide restart is |
| + the one path that cycles a sidecar on an unmanaged box). |
| + The page shows no per-route Restart button. |
| 4. **Picks it up when it starts** (asleep or not running). Only when a |
| source establishes it: the box status report for that host (the |
| `appFacts.host` join the Running page uses: tenant known, same account |
| @@ -170,45 +184,36 @@ incomplete or stale; incomplete means unknown, never asleep). All three are |
| read at Save time only; a settings page view reads none of them beyond what |
| it reads today (the "Used by" line uses the routes the page already has). |
| -### The sidecar arm (a box change, flagged for Paul) |
| +### Sidecars: managed or not (codex R3-1) |
| -Bucket 2 needs one box change: the narrowed restart gains a sidecar arm that |
| -is `cycleWorkers`' rule with the scope applied (stop then wake as one |
| -operation, never wake a sleeper), selected by a new `scopedHosts` keep |
| -function rather than by widening `release.Adoptable`. Release gate: the |
| -console starts putting sidecars in bucket 2 only in a release after every box |
| -runs the arm (roll order: boxes first). Until then, and on any console that |
| -cannot tell, sidecars are classified in bucket 3 with the wording "restart |
| -the app from the Running page to pick this up" (the app-wide restart is the |
| -one path that cycles a sidecar today). **Alternative if Paul prefers no box |
| -change in this slice:** keep sidecars in that bucket-3 wording permanently |
| -and bucket 2 is empty; nothing else in this section changes. |
| +Whether a sidecar updates itself depends on the box's delivery mode, which |
| +the console's registry does not hold. A sidecar is classified "updates |
| +itself" only when a source establishes that its box's rollout manager is |
| +armed and manages it (the box status report, if it carries that fact; the |
| +builder adds it there if not, additively). Missing, stale or old-format |
| +reports mean unknown, and unknown goes to bucket 3 with the "check Running" |
| +wording, never to bucket 1. No box change is needed for the narrowed |
| +restart; rev 3's sidecar arm is dropped. |
| ### Save, step by step |
| 1. One config write, conditional on the displayed bundle version. |
| 2. `ClassifyWrite` over the write's touched keys. |
| -3. One narrowed restart request (`writeRestartScope`, host scopes) naming |
| - bucket 2's hosts, if any. No other restart is requested, so no route |
| - cycles twice: buckets 1 restart on delivery, 3 and 5 can't be restarted |
| - from here, 4 picks it up on start. |
| -4. The page renders the buckets as the mockup's "After you save" shows: |
| - Updates itself, Restart requested, Restart it yourself, Asleep / Not |
| - running, Can't see from here, plus the exceptions. Every word is an |
| - expectation from the classification; observed state is the Running |
| - page's, linked. |
| -5. Config saved but the bucket 2 request failed: "Saved, restart not |
| - requested", with a Restart button that sends the same host scopes again. |
| - It never appears for bucket 3. |
| +3. The page renders the buckets as the mockup's "After you save" shows: |
| + Updates itself, Restart it yourself (with how), Asleep / Not running, |
| + Can't see from here, plus the exceptions. Every word is an expectation |
| + from the classification; observed state is the Running page's, linked. |
| + No restart is requested, so no route cycles twice and there is no |
| + "saved, not restarted" state. |
| ### The CLI uses the same result |
| The config door's `restart` object gains additive fields (`self`, |
| -`requested`, `yours`, `starting`, `unseen`), each omitted when empty, filled |
| +`yours`, `starting`, `unseen`), each omitted when empty, filled |
| from `ClassifyWrite`; the existing fields keep their meaning as projections, |
| so older CLIs read exactly what they read today. The CLI's notice prints the |
| new buckets when present. The CLI write itself requests no restart (as |
| -today); its notice names bucket 2 hosts with "run `carlos restart --host`". |
| +today). |
| ### Guard tests |
| @@ -220,12 +225,13 @@ today); its notice names bucket 2 hosts with "run `carlos restart --host`". |
| - **Bucket 1 matches delivery.** For every row, bucket 1 holds iff the |
| delivery code would restart it: asserted by calling the same predicates the |
| passes use and by a `SyncExec`/`Sync` fake run that records bounces. |
| -- **Bucket 2 matches the box.** The hosts bucket 2 names equal the hosts the |
| - narrowed restart's sidecar arm cycles for the same routes (shared keep |
| - function), and bucket 2 never holds a route `execBounceable` and the root |
| - arm cannot reach. |
| -- **Bucket 3 is never restarted.** Save's restart request never names a |
| - bucket 3 host; the page shows no Restart button for it. |
| +- **Bucket 2 is empty and Save requests nothing.** For every generated |
| + row, bucket 2 is empty, and the Save handler makes no restart-scope or |
| + restart-generation write (a store fake that fails the test on either). |
| +- **Sidecars by mode.** A managed sidecar is bucket 1; an unmanaged one and |
| + one whose mode is unknown (no report, stale, old format) are bucket 3. |
| +- **Bucket 3 shows how, never a button.** Every bucket 3 route renders |
| + its "how" sentence and no per-route Restart control. |
| - **No absence claims.** With an empty local registry and records present, |
| every record lands in bucket 5; with neither, the page says "nothing on |
| this box uses it" plus the other-boxes line, never "unused". |