carlos / platform Public

agent-start-demo-1

Written by claude agent, operated by paul@keymail.dev — this branch has no commits of its own to compare against, so how current this is cannot be said

Where it stands

DONE on dev. Plan 1 on main 6be08467 (merge commit, -squash omitted by mistake), holding tool on main 3487d6f6 (squash). Dev runs v0.34.1/v0.34.2 (both contain them). Witnesses 2026-11-04: build-unit and dev/purge PASSED; deny-all FAILED at stop only (pre-existing PrivatePIDs stop behaviour, Paul accepted as (a), #528). Smoke check PASSED over HTTPS 18:31-18:32Z (create to live 17 s, SQLite value survives the token update, expiry unchanged). Anonymous demos ON on dev (console drop-in demo-apps.conf on sophie). All resources and teardown in ~/.cache/agent-start-demo-dev/RESOURCES.md (tofu state there).

Next

Short follow-up branch: starter must read --socket/--db (and e2e runner pass flags); demo-mode root control unit must not require /var/lib/carlos-release/private; wildcard loop 1 h retry after an order error; README: housekeeper-capable boxes need the tuple + DNS grant (dennis not covered); superseded job status says failed; brief 503 after console restart. Then Plans 2-4 (edge protections, claim, /start + homepage). Carloku switch-on only when /start ships.

Recently

Human

<paseo-system version="1" kind="agent-message" source-agent-id="32157efb-ed29-443f-b428-8c9e3320fa50" message-id="7839f717-1491-434a-9721-0e3a9d2b27fa"> From the design session (platform-f6): Paul chose option 1 on #527 (&quot;1 is good&quot;, 2026-11-03 ~23:45Z). Build it as one short branch off current main: `console member remove` on the console box may remove the LAST owner only of the account named by CARLOS_DEMO_ACCOUNT, only once that account owns its configured demo fleet, and only when demo settings are valid; every other account keeps the last-owner guard unchanged. Astra implements, one Opus review (security gate), census if the guard inventory needs it, CI green on the exact tip. You may merge it yourself, and you MUST pass `-squash` this time: `amadan branch merge carlos/platform &lt;branch&gt; -squash -expect &lt;full sha&gt;`, subject under 80 characters (Paul&apos;s rule: one atomic commit per branch on main). Then create the holding account, its fleet, remove the owner, revoke any tokens, and switch admission on only if the three witnesses passed. Report on #527. </paseo-system>

Human

<task-notification> <task-id>bcjmhrnem</task-id> <tool-use-id>toolu_01RqjqHbqgwFP2bdBCheW6YE</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/bcjmhrnem.output</output-file> <status>completed</status> <summary>Background command "Peek at witness progress on the box" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bdqzh0yi6</task-id> <tool-use-id>toolu_01EMFFhVb3TCRmHV9jnoGMYC</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/bdqzh0yi6.output</output-file> <status>completed</status> <summary>Background command "Wait for second merge" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bz9bvt9o2</task-id> <tool-use-id>toolu_0188FCXzqef4gMghvv5YjuSb</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/bz9bvt9o2.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on merge tip" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>b64lwnpfm</task-id> <tool-use-id>toolu_01KDnTB5cMzLVhD5fC5krQ7U</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/b64lwnpfm.output</output-file> <status>completed</status> <summary>Background command "Wait for merge resolution" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>acfff640a1c48b8f7</task-id> <tool-use-id>toolu_017ZgUAnHMK5Dduo4wSpn5s6</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/acfff640a1c48b8f7.output</output-file> <status>completed</status> <summary>Agent "Final scoped check of R26 fix" 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>- **P3-1: ADDRESSED** (`internal/instancectl/demo_policy.go:26`, `internal/host/egress_source.go:262`, `internal/instancectl/egress.go:222`, `internal/host/claimstop_run.go:194`). - **No extra read:** on a box never in demo mode, `/start` makes no `HostDemo` read and spawns no registry child. - **No new refusal:** ordinary rows carry no demo markers, so their egress and runtime answers are unchanged. - **Read failures:** a failed read falls back exactly as before the branch, because the new refusal needs `err == nil`. - **Marker:** none. The fix keeps no flag and writes no file; it reads the row's demo columns from the registry snapshot root already reads for egress. So there is nothing to create, protect or remove when demo mode is uninstalled. - **Former-demo box:** a successful read of a marked row still gets `DEMO-POLICY` before systemctl start, on the legacy, sidecar, gen and `/cmd` paths. Rootfs is refused through `instanceRegistryHostRuntime`. - **P3-3: ADDRESSED** (`internal/console/apidemo.go:345`, `:420`, `:437`). Create and update both return the stored `life.ExpiresAt`. - **New in the fix diff:** no P1 and no P2. Three P3s, none needing a fix now: - **P3-5** (former-demo containment): a former-demo start that hits a registry read failure is not refused by root. R26 requires this. The agent's `demoDisabledFor` still blocks that wake first. - **P3-6** (refuse before acting): the refusal now comes after `setTier`, which already wrote the slice's CPU and IO settings. Nothing harmful follows: the unit never starts, and the gen path still cleans up. - **P3-7** (clarity): a start-path refusal skips `remember` and `record`, so GET /egress shows the host's previous report until the next sweep. - **Census:** APPROVE for every changed root unit and envelope: - `Server.demoHandler` (demo_policy.go:19-38): reads less, one fewer `whole:Route` site. - `instanceRegistryHostRuntime` (claimstop_run.go:181-198): adds a refusal only, still 2 read sites. - `registrySource.policyFrom` (egress_source.go:245-266): adds a refusal only, still 12 read sites. - The `instancectl` envelope (egress.go:209-233) and the `host` envelope. Seal ccf8a0e5…2fa8. I ran `TestPlan14RootReadCensus` and `TestCensusScopeIsTheRootBinary` at 6bafbb33: both pass (ok, 7.0 s). - **Verdict: READY.** CI at 6bafbb33 is the one thing I couldn't verify. The review is in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/agent-start-demo-1/.superpowers/sdd/2026-11-02-agent-start-demo-1-anonymous-apps/branch-review-r3.md`.</result> <usage><subagent_tokens>109969</subagent_tokens><tool_uses>17</tool_uses><duration_ms>206996</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>b04h4eq8d</task-id> <tool-use-id>toolu_01SGsqicJhda46PnTHieTiAD</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/b04h4eq8d.output</output-file> <status>completed</status> <summary>Background command "Wait for P3 fix and check CI" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a1054b381ea1d0884</task-id> <tool-use-id>toolu_01RHoRNuCEsSPDEam6apo1ai</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/a1054b381ea1d0884.output</output-file> <status>completed</status> <summary>Agent "Scoped re-review of whole-branch fix wave" 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>All ten round-1 items are addressed and the fix diff has no new P1 or P2, so the verdict is READY. The one open item is CI: no run of 2eec87e9 has happened yet. The full report is at `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/agent-start-demo-1/.superpowers/sdd/2026-11-02-agent-start-demo-1-anonymous-apps/branch-review-r2.md`. - **console P2-1** (serial bump every pass): ADDRESSED. The bump now runs only after `delivered=1` commits, plus once after the purge commits (demo_expiry.go, inside `if !r.Delivered`, and `finishDemoPurge`). - **console P2-2** (live checks fatal at boot): ADDRESSED. The fleet and claims checks moved to `validateDemoLiveConfig` (apidemo.go:118-158), which runs inside the cached admission verdict (apidemo.go:173) with a 10 s timeout. Failures are cached and refuse admission. Boot ignores the error (server.go:1806-1810). The static checks stay fatal. Admission stays fail-closed. - **console P2-3** (budgets charged before worker/lease readiness): ADDRESSED. `demoPublishReady` (apidemo.go:674-723) runs before `SpendDemoCreate` and `SpendDemoUpdate`. It only reads, and the charge still always follows it. So a pre-check cannot be raced into real work that charges nothing. The checks after validation remain. - **console P2-4 / R25** (reply contract, client header): ADDRESSED. Create and update return `jobId`, `name`, `statusUrl` and `expiresAt`. Create alone adds `claimAvailable:false`, `claimToken` and `claimUrl`. Status returns `jobId` and `state`. `X-Carlos-Client` is stored, trimmed to 100 bytes (demo_store.go:248-251), with no User-Agent fallback. The README matches. - **root P2-1** (agent and root demo mode can disagree): ADDRESSED on both sides. - Agent: `demoPolicyHook` calls root `ReadyDemo` on every demo-mode spawn. It refuses without `Carlos-Demo-Box: 1`, on a stale build, or when root is not ready (client.go:460-473). That is one control-socket GET per spawn, not polling. - Root: in ordinary mode, a `/start` for a host whose row has any demo marker, or whose row can't be read, gets a 409 (instancectl/demo_policy.go:31-36). - Ordinary boxes: the agent side is unchanged. The root side changes slightly; see P3-1 below. - **wire P2-1** (README lacks the ingress tuple): ADDRESSED. README.md:637 now covers the ingress tuple. The e2e test now proves an ingress without the tuple refuses the demo host. - **Task 8 P3-10** (stale readiness on reconnect): ADDRESSED. `clearReady` runs when Connect starts and as its last cleanup (host/demo_jobs.go). The console accepts the empty readiness message (apidemobox.go:120,158). - **Task 8 P3-11** (retirement on the read loop, 30 s budget): ADDRESSED. Retirements now run on their own one-at-a-time worker, with one queue entry per verified demo ID. The budget is 60 s, and Connect waits for the worker before returning (host/demo_jobs.go, demo_cleanup.go). - **CI R24** (DEMO-CHECK-FAILED copy): ADDRESSED. The text is now "Could not check this demo. Try again shortly." and the copy deck notes the change (apidemo.go:49). - **CI R23b** (e2e private-closure download): ADDRESSED in code. The test downloads the locked modules online, checks both sums against the lock, then builds offline (demo_e2e_test.go:512-531, 1078-1090). It has not passed CI on a cold module cache yet. New P3s from the fix diff: - **P3-1:** an ordinary root now starts a registry read child on every `/start`. A read error shows as `DEMO-POLICY` for an ordinary app. - **P3-2:** when another console holds the writer lease, or the lease read fails, an anonymous request that is refused costs one S3 GET and no budget. Nothing limits how often that can repeat. The read error is also not logged. - **P3-3:** `expiresAt` is computed as `CreatedAt + 86400` instead of read from the app's stored expiry. The two agree today. - **P3-4:** `demoPolicyHook` takes `control any` and checks for `ReadyDemo` at runtime, so a wrapped control client would silently refuse every demo spawn. **Census:** APPROVE `runAgent`, `demoPolicyHook` and `Server.demoHandler` (its two route reads only refuse). APPROVE the re-pinned `internal/host` and `internal/instancectl` envelopes. The overlay seal is 39197c39…5033 and the chain tail is updated. `TestPlan14RootReadCensus` and `TestCensusScopeIsTheRootBinary` pass at 2eec87e9; I ran them. **Verdict:** READY</result> <usage><subagent_tokens>202406</subagent_tokens><tool_uses>53</tool_uses><duration_ms>621923</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>b81na1em1</task-id> <tool-use-id>toolu_01YRVcDQ5VVc672bqx8Rmspt</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/b81na1em1.output</output-file> <status>completed</status> <summary>Background command "Wait for wave, then launch R23b follow-up" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bs7kuuqqo</task-id> <tool-use-id>toolu_011LwMRUGz1dJPy9wejnwNtn</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/bs7kuuqqo.output</output-file> <status>completed</status> <summary>Background command "Wait for fix wave" completed (exit code 0)</summary> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="32157efb-ed29-443f-b428-8c9e3320fa50" message-id="38b1ed47-82ea-4bf3-be7e-cad8fec1b3e7"> From the design session (platform-f6), correcting Ruling R23&apos;s premise: Rastrillo is NOT private. amadan.net/rastrillo/rastrillo serves a go-import meta tag, anonymous git ls-remote works, and proxy.golang.org + sum.golang.org already serve v0.30.2 and money/v0.1.0 (checked 2026-11-03 18:05Z). So the CI failure of TestDemoSourceToLiveAndUpdate is an empty module cache under the deliberately offline build (GOPROXY=off), not access. Please replace the R23 stdlib stand-in: before the offline build, the test (or a CI pre-step) populates the module cache from the locked closure with a normal online &apos;go mod download&apos; (default proxy and sumdb, verifying the lock&apos;s sums), then the real starter builds offline as in production. If the download fails, the test fails loudly; no substitute fixture. Fold this into the current fix wave or the next commit; ledger it as R23b. </paseo-system>