carlos / platform Public

copy: apply delegated copy pass for anonymous demos

codex agent, operated by paul@keymail.dev pushed by claude agent, operated by paul@keymail.dev 3247de438e50e876bf7ad1847c6bbf3fd2f9dc43 parent 8d81b6b
13 files changed, +321 −119
  • README.md +15 −15
  • docs/superpowers/notes/copy-agent-start-demo-1.md +83 −71
  • docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-1.md +34 −0
  • docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1.md +139 −0
  • internal/console/apidemo.go +19 −17
  • internal/console/demo_data.go +2 −3
  • internal/console/demo_e2e_test.go +13 −4
  • internal/console/demo_expiry.go +4 −0
  • internal/console/demo_review_test.go +2 −2
  • internal/console/demo_settlement_test.go +5 −5
  • internal/demobuild/diagnostics.go +3 −2
  • internal/host/demo_cleanup.go +1 −0
  • internal/instancectl/demo_versions.go +1 −0

CI failed — run details

Intent

Human

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

Human

<task-notification> <task-id>ada2e9e10872a0656</task-id> <tool-use-id>toolu_01LCwrJUmXfNbMUr1PxhC7xy</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/cd1b6de2-ac77-426f-a77d-fc5436969c88/tasks/ada2e9e10872a0656.output</output-file> <status>completed</status> <summary>Agent "Re-review Task 8 fix round 1" 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>- P2-1 ADDRESSED: `internal/host/demo_jobs.go:423` and `internal/host/demo_cleanup.go:128-157` (per-demo backoff that survives reconnects, checked before any bucket read). `internal/console/apidemobox.go:175-187` replays retirements only on connect or wake. - P2-2 ADDRESSED: `internal/console/demo_retirement_http_test.go:19-161`, `internal/host/demo_retirement_stream_test.go`, `internal/instancectl/demo_cleanup_http_test.go:15-73`, and `internal/instancectl/demo_cleanup_test.go:21,54` (the "absent" case). - P2-3 ADDRESSED: `internal/console/demo_expiry.go:67,137,199-211,263`. DRAFT strings at `apidemo.go:31-33`, with no em dashes. - P3-1 ADDRESSED: `internal/demobuild/purge.go:17,42` and `internal/instancectl/demo_cleanup.go:97-102`. - `TestDemoPurgeBindsHost`: a wrong host makes no call to the only deletion path; the matching host makes one. - The "absent" case: a leftover directory is refused, and the DB file, siblings and the outside target survive. - `TestDemoPurgeHTTP`: every refused request returns before the registry read. - So root deletes nothing outside the named incarnation. The one case not tested, an absent registry row with job IDs, only touches scratch that root's own marker binds to this demo and host. - P3-2 ADDRESSED: `internal/instancectl/demo_versions.go:80-83` skips only ENOENT. Comment at `:34`. - P3-3 ADDRESSED: `demo_store.go:69-71`. The migration is removed. Commit 21cb71e1 was never deployed, so no live database has the old schema. - P3-4 ADDRESSED: `demo_expiry.go:301-305,335-337`. - P3-9 ADDRESSED. - Still connects: `host/demo_jobs.go:104-106`, and the console accepts an empty readiness message but refuses a partial one (`apidemobox.go:122,160`). - Still refuses builds: `apidemobox.go:47,221`, `host/demo_jobs.go:146-148`, and root's Build re-checks readiness. - No widening: the stream still needs box auth and the demo fleet identity. The worker still starts only on a demo build box. Retirements are filtered by fleet and assigned box (`demo_expiry.go:319`), the agent drops any receipt for another box, and the acknowledgment still requires the assigned box. New breakage (P1 none, P2 none): - P3-10 `host/demo_jobs.go:390-402`: on reconnect, the box advertises readiness left over from its previous connection before a fresh root check. A builder that went bad between connections can be sent a queued job, which then fails instead of staying queued. Root's re-check keeps it safe, so this costs a failed job, not data. Fault family: proof freshness. Fix: clear `w.ready` when `Connect` starts and ends. - P3-11 `host/demo_cleanup.go:146`: retirements run on the stream's read loop with a 30 s budget, the same as root's own wait budget. Root also waits, without a timeout, for any build in progress. Each slow retirement can hold up queued jobs for 30 s, and a slow stop can be cancelled on every attempt until conditions change. Fault family: stream liveness. Fix: deliver retirements in a separate serial goroutine, and give each attempt more time than root's budget. Census verdicts: - `Worker.PurgeDemo` (deletes): ACCEPT. Same reads; adds one host-match refusal, so it can delete less than before. - `Server.purgeDemoWithJobs` (deletes): ACCEPT. Same reads and deletion paths; only passes the root-validated host to the cleaner. - `Server.purgeDemoVersions` (deletes): ACCEPT. Skipping ENOENT cannot widen deletion, because a link that does not resolve cannot point at the file being removed. Every other error still refuses, and all pins are unchanged. - The overlay's reads are identical to before. No new root read, path or authority source. Verdict: READY. 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/task-8-review-r2.md`.</result> <usage><subagent_tokens>117824</subagent_tokens><tool_uses>23</tool_uses><duration_ms>316058</duration_ms></usage> </task-notification>

Attributed to this commit: 19.6 g CO₂e (2,497,802 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on agent-start-demo-1, 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/README.md b/README.md
index b6a9bfb14..4360b62a2 100644
--- a/README.md
+++ b/README.md
@@ -598,44 +598,44 @@ This release adds the app policy (#328, #329). A system operator can let an app'
- the console re-checks live allows against the boxes' addresses when a box's address list changes (with `CARLOS_CHANGE_INDEX=read`, and not under host claims), and otherwise every 30 to 33 minutes. it alerts through `CARLOS_ALERT_WEBHOOK` or `CARLOS_ALERT_SNS_TOPIC_ARN`, at most once a day per app and address. with neither set it only logs.
- memory never changes on a running instance. a larger size's memory applies at the instance's next start or deploy, and a smaller size waits for a cold start. cpu and io change at once. a size above standard is refused when a box the app can run on reports no memory total, or when it is more than a quarter of the smallest such box's memory.
-<!-- DRAFT DEMO-OPERATOR-DOCS: pending the controller's copy pass. -->
-### Anonymous demo apps on dev
+<!-- DEMO-OPERATOR-DOCS: approved by delegation, Luna copy pass, 2026-11-03 (R22). -->
+### Anonymous demo apps in development
-Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups or recovery after box loss. Demos cannot send mail, use object storage, schedules, sidecars or custom domains. Claiming is reserved for Plan 3 and is not available in this slice.
+Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups, and data is not recoverable after box loss. Demos cannot send mail, use object storage or schedules, run sidecars, or use custom domains. Claiming is not available in this release.
-Keep admission off until the designated dev witness and branch review pass. Local protocol tests do not prove systemd isolation, public DNS or TLS. Infrastructure work needs approval for its exact scope before you create or change anything.
+Keep admission off until the designated dev witness and branch review have passed. Local protocol tests do not prove systemd isolation, public DNS or TLS. Infrastructure work needs approval for its exact scope before you create or change anything.
-Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty on first enablement, with no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box, so do not share that fleet with ordinary apps.
+Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty when you first enable admission, with no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box. Do not share that fleet with ordinary apps.
Set these variables on the console:
| Variable | Setting |
| --- | --- |
-| `CARLOS_DEMO_APPS` | `1` enables admission; unset leaves it off. |
+| `CARLOS_DEMO_APPS` | `1` enables admission; leaving it unset keeps admission off. |
| `CARLOS_DEMO_ACCOUNT` | The dedicated holding account's sqid. |
| `CARLOS_DEMO_FLEET` | The fleet owned by that account. |
| `CARLOS_DEMO_DOMAIN` | Your bare demo domain, for example `demo.example.com`. It must not overlap the console, primary apps zone or another domain claim. |
-| `CARLOS_DEMO_CREATE_PER_IP_DAY` | Positive integer, default `30`. IPv6 callers share their /64 budget. |
-| `CARLOS_DEMO_CREATE_GLOBAL_DAY` | Positive integer, default `100`. |
-| `CARLOS_DEMO_MAX_LIVE` | Positive integer, default `20`. Failed and retiring demos retain their place until cleanup completes. |
+| `CARLOS_DEMO_CREATE_PER_IP_DAY` | Positive integer. Default `30`. IPv6 callers share their /64 budget. |
+| `CARLOS_DEMO_CREATE_GLOBAL_DAY` | Positive integer. Default `100`. |
+| `CARLOS_DEMO_MAX_LIVE` | Positive integer. Default `20`. Failed and retiring demos keep their place until cleanup completes. |
Put each demo box's settings in its root-owned `/etc/carlos/host.env`. Set `CARLOS_DEMO_BOX=1` and the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET` and `CARLOS_DEMO_DOMAIN` tuple as the console. Keep the box's existing `CARLOS_FLEET`, box identity, tunnel credentials and release public key consistent with that fleet. These are per-box authority settings. Preserve them through host.env rewrites, using the same per-box mechanism as `CARLOS_FLEET`; do not deliver them through shared or regional parameters.
-On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites too. Concurrency accepts `1` through `4`; each build needs a 1 GiB memory allowance, so keep `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting.
+On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites too. Concurrency accepts values from `1` through `4`; each build needs a 1 GiB memory allowance, so keep `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting.
Build the toolchain bundle on the operator side before enabling a worker. Use native linux-arm64 Go 1.26.10 and the Rastrillo v0.30.2 dependency closure in `internal/demobuild/toolchain.lock.json`. Copy the Go distribution into the bundle root, the complete module cache into `mod/`, and a cache prewarmed by an offline build of `internal/console/testdata/demo` into `cache/`. Include Fiesta as embedded starter assets when needed; it is not a Go module. The starter contract permits only standard-library and pinned Rastrillo imports, exact locked module requirements and sums, and no vendor tree, toolchain directive, generator or alternate dependency inputs.
Make the directory and its ancestors root-owned and safe from agent writes. Bundle files must be regular files with mode `0444` or `0555`; symlinks, hard links and unlisted files are refused. Write `MANIFEST` with LF endings and a final LF. Its first lines are `go<TAB>1.26.10` and `modules<TAB><Lock.ModulesDigest()>`. Follow them with one tab-separated row per file other than `MANIFEST`, sorted by relative path: relative path, four-digit octal mode, decimal size, lowercase SHA-256. `Lock.ModulesDigest()` hashes the canonical dependency lock; the worker's bundle digest separately hashes the exact manifest bytes. `host.CheckDemoToolchain` checks the entire bundle, then worker initialization must pass the nested isolation check and compile its trusted probe in the disposable offline service. There is no download fallback. To replace a bundle, drain builds, install a new immutable directory, update the per-box path and restart root control.
-For an approved rollout, point wildcard DNS for your demo domain at the existing ingress and install wildcard TLS using the deployment's existing certificate workflow. The edge includes `CARLOS_DEMO_DOMAIN` among its explicit wildcard parents. Roll the built boxes and ingress first, then the console. Confirm the box reports `anonymous-demo-v1` with the expected verified bundle digest, the policy writer can acquire its lease, and change delivery is working before enabling admission. Verify an ordinary app through its own hostname as well.
+For an approved rollout, point wildcard DNS for your demo domain at the existing ingress and install wildcard TLS through the deployment's existing certificate workflow. The edge includes `CARLOS_DEMO_DOMAIN` among its explicit wildcard parents. Roll out the built boxes and ingress first, then the console. Confirm the box reports `anonymous-demo-v1` with the expected verified bundle digest, the policy writer can acquire its lease, and change delivery is working before enabling admission. Verify an ordinary app through its own hostname as well.
-For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without login to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Poll `GET /api/demo/jobs/<jobID>` until it reports live, then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission.
+For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without logging in to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Poll `GET /api/demo/jobs/<jobID>` until it reports live. Then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify that a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission.
-Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins; the builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and the local protocol and durability checks. A skip is outstanding evidence, never a pass for rollout. Real DNS, TLS and fleet activation still need a separately recorded deployment check.
+Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins; the builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and the local protocol and durability checks. A skipped test is outstanding evidence, not a rollout pass. Real DNS, TLS and fleet activation still need a separately recorded deployment check.
-After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet and domain settings and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours; allow up to ten minutes for serving to stop. Local DB, WAL, SHM, runtime and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until reconnect; it must not restart the expired demo. Confirm the job is expired, the host no longer serves, and cleanup has completed before dismantling witness resources. Public demo hostnames are never reused, and minimal host tombstones remain after detailed history ages out.
+After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet and domain settings and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours. Allow up to ten minutes for serving to stop. Local DB, WAL, SHM, runtime and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until reconnect. It must not restart the expired demo. Confirm that the job is expired, the host no longer serves, and cleanup has completed before dismantling witness resources. Never reuse public demo hostnames. Keep minimal host tombstones after detailed history ages out.
-<!-- End DRAFT DEMO-OPERATOR-DOCS. -->
+<!-- End DEMO-OPERATOR-DOCS. -->
## App config & secrets
diff --git a/docs/superpowers/notes/copy-agent-start-demo-1.md b/docs/superpowers/notes/copy-agent-start-demo-1.md
index a33f8599d..ee9590ea8 100644
--- a/docs/superpowers/notes/copy-agent-start-demo-1.md
+++ b/docs/superpowers/notes/copy-agent-start-demo-1.md
@@ -1,76 +1,73 @@
# Anonymous demo copy deck
-DRAFT pending the controller's copy pass. This deck records current text, not approval. API status messages use the API category below even when they report success. Repeated keys on different surfaces retain separate rows. Operator format placeholders receive the values named by their call sites; diagnostic errors are sanitized before reaching API callers. Compiler output, protocol identifiers, JSON keys, SQL, test strings and prose consumed only by agents are excluded.
+Approved by delegation: Luna copy pass (gpt-5.6-luna), 2026-11-03, brief and result under .superpowers (controller ruling R22)
+
+API status messages use the API category below even when they report success. Repeated keys on different surfaces retain separate rows. Operator format placeholders receive the values named by their call sites; diagnostic errors are sanitized before reaching API callers. Compiler output, protocol identifiers, JSON keys, SQL, test strings and prose consumed only by agents are excluded.
Copy IDs added beyond the plan table: `DEMO-BUILD-FAILED`, `DEMO-BUILD-FINISHING`, `DEMO-BUILD-LIVE`, `DEMO-BUILD-STARTING`, `DEMO-BUILD-TIMEOUT`, `DEMO-CHECK-FAILED`, `DEMO-COMPILE-FAILED`, `DEMO-NOT-FOUND`, `DEMO-ROLLED-BACK`, `DEMO-STATUS-LIMIT`. `DEMO-OPERATOR-*` and numbered docs keys are collection labels for this deck, not new protocol IDs.
| key | kind (API refusal relayed to a person / operator log / docs) | current text | placeholders | where (file:line) |
| --- | --- | --- | --- | --- |
-| DEMO-EXPIRED | API refusal relayed to a person | This demo has expired and is being permanently removed. | none | internal/console/apidemo.go:31 |
-| DEMO-EXPIRED-CLEANUP | operator log | Demo cleanup failed. Its place stays reserved until cleanup succeeds. | demo ID, host, assigned box, error | internal/console/demo_expiry.go:expireDemos; internal/console/apidemo.go:demoCopy |
-| DEMO-EXPIRED-WAITING | operator log | Demo cleanup is waiting for its box. If the box is offline, cleanup resumes when it reconnects. Its place stays reserved. | demo ID, host, assigned box | internal/console/demo_expiry.go:expireDemoLocked; internal/console/apidemo.go:demoCopy |
-| DEMO-EXPIRED-PURGED | audit | The expired demo has been permanently removed. | none | internal/console/demo_expiry.go:finishDemoPurge; internal/console/apidemo.go:demoCopy |
-| DEMO-EXPIRED-AGENT | operator log | agent: DEMO-EXPIRED: cleanup failed demo=%s host=%s box=%s retry=%s: %v | demo ID, host, box, backoff, error | internal/host/demo_cleanup.go:demoWorker.deliverDemoRetirement |
-| DEMO-EXPIRED-DANGLING | operator log | instance-control: demo purge: skipping dangling live link %s | live link name | internal/instancectl/demo_versions.go:Server.purgeDemoVersions |
-| DEMO-POLICY | API refusal relayed to a person | This operation is not available for anonymous demos. Their restrictions and 24-hour expiry cannot be changed. | none | internal/console/apidemo.go:32 |
-| DEMO-CONFIG | API refusal relayed to a person | Demo settings are incomplete or inconsistent. Check the holding account, fleet and domain. | none | internal/console/apidemo.go:33 |
-| DEMO-CREATE-LIMIT | API refusal relayed to a person | The daily demo creation limit has been reached. Try again after 24 hours. | none | internal/console/apidemo.go:34 |
-| DEMO-LIVE-LIMIT | API refusal relayed to a person | All demo places are in use. Existing demos are kept. Try again later. | none | internal/console/apidemo.go:35 |
-| DEMO-TOKEN | API refusal relayed to a person | This demo credential is invalid or no longer available. | none | internal/console/apidemo.go:36 |
-| DEMO-UPDATE | API refusal relayed to a person | A build is already active or this demo has used its update limit. Updates do not extend expiry. | none | internal/console/apidemo.go:37 |
-| DEMO-BUILD | API refusal relayed to a person | Demo builds are unavailable. Try again later. | none | internal/console/apidemo.go:38 |
-| DEMO-BUILD-STARTING | API refusal relayed to a person | The demo is starting. | none | internal/console/apidemo.go:39 |
-| DEMO-BUILD-FINISHING | API refusal relayed to a person | The update is finishing. Try again shortly. | none | internal/console/apidemo.go:40 |
-| DEMO-BUILD-LIVE | API refusal relayed to a person | The demo is live. | none | internal/console/apidemo.go:41 |
-| DEMO-BUILD-FAILED | API refusal relayed to a person | The demo could not start. Submit another update with the same token. | none | internal/console/apidemo.go:42 |
-| DEMO-ROLLED-BACK | API refusal relayed to a person | The demo update failed; previous version still running. Submit another update with the same token. | none | internal/console/apidemo.go:43 |
-| DEMO-CHECK-FAILED | API refusal relayed to a person | Could not check whether this app is an anonymous demo. Try again shortly. | none | internal/console/apidemo.go:44 |
-| DEMO-COMPILE-FAILED | API refusal relayed to a person | The demo build failed. Submit another update with the same token. | none | internal/console/apidemo.go:45 |
-| DEMO-BUILD-TIMEOUT | API refusal relayed to a person | The demo did not become ready within 60 seconds. Submit another update with the same token. | none | internal/console/apidemo.go:46 |
-| DEMO-SOURCE | API refusal relayed to a person | Send a gzip tarball no larger than 5,000,000 bytes within 30 seconds. | none | internal/console/apidemo.go:47 |
-| DEMO-CLAIM-LATER | API refusal relayed to a person | Claiming is not available yet. | none | internal/console/apidemo.go:48 |
-| DEMO-STATUS-LIMIT | API refusal relayed to a person | Status requests are too frequent. Try again in two seconds. | none | internal/console/apidemo.go:49 |
-| DEMO-NOT-FOUND | API refusal relayed to a person | This demo job is not available. | none | internal/console/apidemo.go:50 |
-| DEMO-DATA | API refusal relayed to a person | Demo data stays on its assigned server and has no backup. This demo cannot be moved, copied or imported. If its local data is lost, it cannot be restored. | none | internal/console/demo_data.go:8 |
-| DEMO-SOURCE | API refusal relayed to a person | The source archive does not match the demo starter requirements. | none | internal/demobuild/diagnostics.go:15 |
-| DEMO-BUILD | API refusal relayed to a person | The demo build could not be completed. | none | internal/demobuild/diagnostics.go:16 |
+| DEMO-EXPIRED | API refusal relayed to a person | This demo has expired and will be removed permanently. | none | internal/console/apidemo.go:36 |
+| DEMO-POLICY | API refusal relayed to a person | Anonymous demos cannot use this operation. Their restrictions and 24-hour expiry cannot be changed. | none | internal/console/apidemo.go:37 |
+| DEMO-CONFIG | API refusal relayed to a person | Anonymous demos are not available right now. Try again later. | none | internal/console/apidemo.go:38 |
+| DEMO-CREATE-LIMIT | API refusal relayed to a person | The daily limit for creating demos has been reached. Try again after 24 hours. | none | internal/console/apidemo.go:39 |
+| DEMO-LIVE-LIMIT | API refusal relayed to a person | The maximum number of live demos has been reached. Try again later. Existing demos will keep running. | none | internal/console/apidemo.go:40 |
+| DEMO-TOKEN | API refusal relayed to a person | This demo token is invalid or no longer available. | none | internal/console/apidemo.go:41 |
+| DEMO-UPDATE | API refusal relayed to a person | This demo is already being updated or has reached its update limit. Updates do not extend its expiry. | none | internal/console/apidemo.go:42 |
+| DEMO-BUILD | API refusal relayed to a person | Demo builds are unavailable right now. Try again later. | none | internal/console/apidemo.go:43 |
+| DEMO-BUILD-STARTING | API refusal relayed to a person | The demo is starting. | none | internal/console/apidemo.go:44 |
+| DEMO-BUILD-FINISHING | API refusal relayed to a person | The update is finishing. Try again shortly. | none | internal/console/apidemo.go:45 |
+| DEMO-BUILD-LIVE | API refusal relayed to a person | The demo is live. | none | internal/console/apidemo.go:46 |
+| DEMO-BUILD-FAILED | API refusal relayed to a person | The demo could not start. Send another update with the same token. | none | internal/console/apidemo.go:47 |
+| DEMO-ROLLED-BACK | API refusal relayed to a person | The update failed, but the previous version is still running. Send another update with the same token. | none | internal/console/apidemo.go:48 |
+| DEMO-CHECK-FAILED | API refusal relayed to a person | The service could not check this demo. Try again shortly. | none | internal/console/apidemo.go:49 |
+| DEMO-COMPILE-FAILED | API refusal relayed to a person | The demo build failed. Send another update with the same token. | none | internal/console/apidemo.go:50 |
+| DEMO-BUILD-TIMEOUT | API refusal relayed to a person | The demo was not ready within 60 seconds. Send another update with the same token. | none | internal/console/apidemo.go:51 |
+| DEMO-SOURCE | API refusal relayed to a person | Send a gzip tar archive no larger than 5,000,000 bytes within 30 seconds. | none | internal/console/apidemo.go:52 |
+| DEMO-CLAIM-LATER | API refusal relayed to a person | Claiming is not available in this release. | none | internal/console/apidemo.go:53 |
+| DEMO-STATUS-LIMIT | API refusal relayed to a person | Status requests are too frequent. Try again in two seconds. | none | internal/console/apidemo.go:54 |
+| DEMO-NOT-FOUND | API refusal relayed to a person | This demo job is no longer available. | none | internal/console/apidemo.go:55 |
+| DEMO-DATA | API refusal relayed to a person | Demo data stays on its assigned server and has no backup. The demo cannot be moved, copied or imported. If that server loses the data, it cannot be restored. | none | internal/console/demo_data.go:7 |
+| DEMO-SOURCE | API refusal relayed to a person | The source archive does not match the demo starter requirements. | none | internal/demobuild/diagnostics.go:16 |
+| DEMO-BUILD | API refusal relayed to a person | The demo build could not be completed. | none | internal/demobuild/diagnostics.go:17 |
| DEMO-OPERATOR-024 | operator log | console: demo job recovery: %v | %v | cmd/console/main.go:692 |
| DEMO-OPERATOR-025 | operator log | console: record view backstop: %v | %v | cmd/console/main.go:1839 |
| DEMO-OPERATOR-026 | operator log | console: demo backstop: %v | %v | cmd/console/main.go:1844 |
| DEMO-OPERATOR-027 | operator log | console: demo backstop changes: %v | %v | cmd/console/main.go:1851 |
| DEMO-OPERATOR-028 | operator log | %s: refusing to wake: %w: its demo descriptor changed | %s, %w | internal/activator/wakeidentity.go:113 |
-| DEMO-OPERATOR-029 | operator log | console: DEMO-CONFIG: %s: %v | %s, %v | internal/console/apidemo.go:64 |
-| DEMO-OPERATOR-030 | operator log | console: DEMO-CONFIG: %s | %s | internal/console/apidemo.go:66 |
-| DEMO-OPERATOR-031 | operator log | claims mode is incompatible | none | internal/console/apidemo.go:79 |
-| DEMO-OPERATOR-032 | operator log | release store is missing | none | internal/console/apidemo.go:82 |
-| DEMO-OPERATOR-033 | operator log | registry is missing | none | internal/console/apidemo.go:85 |
-| DEMO-OPERATOR-034 | operator log | console origin | none | internal/console/apidemo.go:89 |
-| DEMO-OPERATOR-035 | operator log | console host overlap | none | internal/console/apidemo.go:92 |
-| DEMO-OPERATOR-036 | operator log | primary apps zone overlap | none | internal/console/apidemo.go:95 |
-| DEMO-OPERATOR-037 | operator log | holding account | none | internal/console/apidemo.go:99 |
-| DEMO-OPERATOR-038 | operator log | holding account memberships | none | internal/console/apidemo.go:102 |
-| DEMO-OPERATOR-039 | operator log | holding account credentials | none | internal/console/apidemo.go:103 |
-| DEMO-OPERATOR-040 | operator log | holding account ordinary apps | none | internal/console/apidemo.go:104 |
-| DEMO-OPERATOR-041 | operator log | registry open | none | internal/console/apidemo.go:113 |
-| DEMO-OPERATOR-042 | operator log | fleet listing | none | internal/console/apidemo.go:117 |
-| DEMO-OPERATOR-043 | operator log | fleet ownership: holding account owns another fleet | none | internal/console/apidemo.go:123 |
-| DEMO-OPERATOR-044 | operator log | fleet ownership | none | internal/console/apidemo.go:129 |
-| DEMO-OPERATOR-045 | operator log | domain claims listing | none | internal/console/apidemo.go:137 |
-| DEMO-OPERATOR-046 | operator log | domain claims key is invalid | none | internal/console/apidemo.go:145 |
-| DEMO-OPERATOR-047 | operator log | domain claims overlap | none | internal/console/apidemo.go:148 |
-| DEMO-OPERATOR-048 | operator log | holding account: %w | %w | internal/console/apidemo.go:159 |
-| DEMO-OPERATOR-049 | operator log | holding account is unavailable | none | internal/console/apidemo.go:162 |
-| DEMO-OPERATOR-050 | operator log | admission registry or release store is missing | none | internal/console/apidemo.go:165 |
-| DEMO-OPERATOR-051 | operator log | fleet routes registry: %w | %w | internal/console/apidemo.go:169 |
-| DEMO-OPERATOR-052 | operator log | fleet routes listing: %w | %w | internal/console/apidemo.go:173 |
-| DEMO-OPERATOR-053 | operator log | fleet routes lifecycle: %w | %w | internal/console/apidemo.go:179 |
-| DEMO-OPERATOR-054 | operator log | fleet routes include a non-demo or orphan route | none | internal/console/apidemo.go:182 |
-| DEMO-OPERATOR-055 | operator log | orphan list failure: %w | %w | internal/console/apidemo.go:189 |
-| DEMO-OPERATOR-056 | operator log | orphan objects: invalid app key | none | internal/console/apidemo.go:195 |
-| DEMO-OPERATOR-057 | operator log | orphan objects lifecycle: %w | %w | internal/console/apidemo.go:199 |
-| DEMO-OPERATOR-058 | operator log | orphan objects lack a demo app | none | internal/console/apidemo.go:202 |
-| DEMO-OPERATOR-059 | operator log | admission refused | none | internal/console/apidemo.go:236 |
-| DEMO-OPERATOR-060 | operator log | console: demo admission ready | none | internal/console/apidemo.go:238 |
+| DEMO-OPERATOR-029 | operator log | console: DEMO-CONFIG: %s: %v | %s, %v | internal/console/apidemo.go:69 |
+| DEMO-OPERATOR-030 | operator log | console: DEMO-CONFIG: %s | %s | internal/console/apidemo.go:69 |
+| DEMO-OPERATOR-031 | operator log | claims mode is incompatible | none | internal/console/apidemo.go:84 |
+| DEMO-OPERATOR-032 | operator log | release store is missing | none | internal/console/apidemo.go:87 |
+| DEMO-OPERATOR-033 | operator log | registry is missing | none | internal/console/apidemo.go:90 |
+| DEMO-OPERATOR-034 | operator log | console origin | none | internal/console/apidemo.go:94 |
+| DEMO-OPERATOR-035 | operator log | console host overlap | none | internal/console/apidemo.go:97 |
+| DEMO-OPERATOR-036 | operator log | primary apps zone overlap | none | internal/console/apidemo.go:100 |
+| DEMO-OPERATOR-037 | operator log | holding account | none | internal/console/apidemo.go:104 |
+| DEMO-OPERATOR-038 | operator log | holding account memberships | none | internal/console/apidemo.go:107 |
+| DEMO-OPERATOR-039 | operator log | holding account credentials | none | internal/console/apidemo.go:108 |
+| DEMO-OPERATOR-040 | operator log | holding account ordinary apps | none | internal/console/apidemo.go:109 |
+| DEMO-OPERATOR-041 | operator log | registry open | none | internal/console/apidemo.go:118 |
+| DEMO-OPERATOR-042 | operator log | fleet listing | none | internal/console/apidemo.go:122 |
+| DEMO-OPERATOR-043 | operator log | fleet ownership: holding account owns another fleet | none | internal/console/apidemo.go:128 |
+| DEMO-OPERATOR-044 | operator log | fleet ownership | none | internal/console/apidemo.go:128 |
+| DEMO-OPERATOR-045 | operator log | domain claims listing | none | internal/console/apidemo.go:142 |
+| DEMO-OPERATOR-046 | operator log | domain claims key is invalid | none | internal/console/apidemo.go:150 |
+| DEMO-OPERATOR-047 | operator log | domain claims overlap | none | internal/console/apidemo.go:153 |
+| DEMO-OPERATOR-048 | operator log | holding account: %w | %w | internal/console/apidemo.go:164 |
+| DEMO-OPERATOR-049 | operator log | holding account is unavailable | none | internal/console/apidemo.go:167 |
+| DEMO-OPERATOR-050 | operator log | admission registry or release store is missing | none | internal/console/apidemo.go:170 |
+| DEMO-OPERATOR-051 | operator log | fleet routes registry: %w | %w | internal/console/apidemo.go:174 |
+| DEMO-OPERATOR-052 | operator log | fleet routes listing: %w | %w | internal/console/apidemo.go:178 |
+| DEMO-OPERATOR-053 | operator log | fleet routes lifecycle: %w | %w | internal/console/apidemo.go:184 |
+| DEMO-OPERATOR-054 | operator log | fleet routes include a non-demo or orphan route | none | internal/console/apidemo.go:187 |
+| DEMO-OPERATOR-055 | operator log | orphan list failure: %w | %w | internal/console/apidemo.go:194 |
+| DEMO-OPERATOR-056 | operator log | orphan objects: invalid app key | none | internal/console/apidemo.go:200 |
+| DEMO-OPERATOR-057 | operator log | orphan objects lifecycle: %w | %w | internal/console/apidemo.go:204 |
+| DEMO-OPERATOR-058 | operator log | orphan objects lack a demo app | none | internal/console/apidemo.go:207 |
+| DEMO-OPERATOR-059 | operator log | admission refused | none | internal/console/apidemo.go:241 |
+| DEMO-OPERATOR-060 | operator log | console: demo admission ready | none | internal/console/apidemo.go:243 |
| DEMO-OPERATOR-061 | operator log | console: demo mutation %s/%s: app life: %v | %s, %v | internal/console/demo_domains.go:23 |
| DEMO-OPERATOR-062 | operator log | demo-build: unavailable or fenced job | none | internal/console/demo_jobs.go:25 |
| DEMO-OPERATOR-063 | operator log | demo-build: queue full | none | internal/console/demo_jobs.go:26 |
@@ -129,17 +126,32 @@ Copy IDs added beyond the plan table: `DEMO-BUILD-FAILED`, `DEMO-BUILD-FINISHING
| DEMO-OPERATOR-116 | operator log | instance-control: demo box configuration refused | none | internal/instancectl/server.go:273 |
| DEMO-OPERATOR-117 | operator log | instance-control: demo builder: %v | %v | internal/instancectl/server.go:349 |
| DEMO-OPERATOR-118 | operator log | instance-control: demo builder: %v | %v | internal/instancectl/server.go:377 |
-| DEMO-OPERATOR-DOCS-01 | docs | ### Anonymous demo apps on dev | none | README.md:602 |
-| DEMO-OPERATOR-DOCS-02 | docs | Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups or recovery after box loss. Demos cannot send mail, use object storage, schedules, sidecars or custom domains. Claiming is reserved for Plan 3 and is not available in this slice. | none | README.md:604 |
-| DEMO-OPERATOR-DOCS-03 | docs | Keep admission off until the designated dev witness and branch review pass. Local protocol tests do not prove systemd isolation, public DNS or TLS. Infrastructure work needs approval for its exact scope before you create or change anything. | none | README.md:606 |
-| DEMO-OPERATOR-DOCS-04 | docs | Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty on first enablement, with no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box, so do not share that fleet with ordinary apps. | none | README.md:608 |
+| DEMO-OPERATOR-DOCS-01 | docs | ### Anonymous demo apps in development | none | README.md:602 |
+| DEMO-OPERATOR-DOCS-02 | docs | Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups, and data is not recoverable after box loss. Demos cannot send mail, use object storage or schedules, run sidecars, or use custom domains. Claiming is not available in this release. | none | README.md:604 |
+| DEMO-OPERATOR-DOCS-03 | docs | Keep admission off until the designated dev witness and branch review have passed. Local protocol tests do not prove systemd isolation, public DNS or TLS. Infrastructure work needs approval for its exact scope before you create or change anything. | none | README.md:606 |
+| DEMO-OPERATOR-DOCS-04 | docs | Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty when you first enable admission, with no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box. Do not share that fleet with ordinary apps. | none | README.md:608 |
| DEMO-OPERATOR-DOCS-05 | docs | Set these variables on the console: | none | README.md:610 |
-| DEMO-OPERATOR-DOCS-06 | docs | \| Variable \| Setting \|<br>\| --- \| --- \|<br>\| `CARLOS_DEMO_APPS` \| `1` enables admission; unset leaves it off. \|<br>\| `CARLOS_DEMO_ACCOUNT` \| The dedicated holding account's sqid. \|<br>\| `CARLOS_DEMO_FLEET` \| The fleet owned by that account. \|<br>\| `CARLOS_DEMO_DOMAIN` \| Your bare demo domain, for example `demo.example.com`. It must not overlap the console, primary apps zone or another domain claim. \|<br>\| `CARLOS_DEMO_CREATE_PER_IP_DAY` \| Positive integer, default `30`. IPv6 callers share their /64 budget. \|<br>\| `CARLOS_DEMO_CREATE_GLOBAL_DAY` \| Positive integer, default `100`. \|<br>\| `CARLOS_DEMO_MAX_LIVE` \| Positive integer, default `20`. Failed and retiring demos retain their place until cleanup completes. \| | none | README.md:612 |
+| DEMO-OPERATOR-DOCS-06 | docs | \| Variable \| Setting \|<br>\| --- \| --- \|<br>\| `CARLOS_DEMO_APPS` \| `1` enables admission; leaving it unset keeps admission off. \|<br>\| `CARLOS_DEMO_ACCOUNT` \| The dedicated holding account's sqid. \|<br>\| `CARLOS_DEMO_FLEET` \| The fleet owned by that account. \|<br>\| `CARLOS_DEMO_DOMAIN` \| Your bare demo domain, for example `demo.example.com`. It must not overlap the console, primary apps zone or another domain claim. \|<br>\| `CARLOS_DEMO_CREATE_PER_IP_DAY` \| Positive integer. Default `30`. IPv6 callers share their /64 budget. \|<br>\| `CARLOS_DEMO_CREATE_GLOBAL_DAY` \| Positive integer. Default `100`. \|<br>\| `CARLOS_DEMO_MAX_LIVE` \| Positive integer. Default `20`. Failed and retiring demos keep their place until cleanup completes. \| | none | README.md:612 |
| DEMO-OPERATOR-DOCS-07 | docs | Put each demo box's settings in its root-owned `/etc/carlos/host.env`. Set `CARLOS_DEMO_BOX=1` and the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET` and `CARLOS_DEMO_DOMAIN` tuple as the console. Keep the box's existing `CARLOS_FLEET`, box identity, tunnel credentials and release public key consistent with that fleet. These are per-box authority settings. Preserve them through host.env rewrites, using the same per-box mechanism as `CARLOS_FLEET`; do not deliver them through shared or regional parameters. | none | README.md:622 |
-| DEMO-OPERATOR-DOCS-08 | docs | On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites too. Concurrency accepts `1` through `4`; each build needs a 1 GiB memory allowance, so keep `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting. | none | README.md:624 |
+| DEMO-OPERATOR-DOCS-08 | docs | On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites too. Concurrency accepts values from `1` through `4`; each build needs a 1 GiB memory allowance, so keep `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting. | none | README.md:624 |
| DEMO-OPERATOR-DOCS-09 | docs | Build the toolchain bundle on the operator side before enabling a worker. Use native linux-arm64 Go 1.26.10 and the Rastrillo v0.30.2 dependency closure in `internal/demobuild/toolchain.lock.json`. Copy the Go distribution into the bundle root, the complete module cache into `mod/`, and a cache prewarmed by an offline build of `internal/console/testdata/demo` into `cache/`. Include Fiesta as embedded starter assets when needed; it is not a Go module. The starter contract permits only standard-library and pinned Rastrillo imports, exact locked module requirements and sums, and no vendor tree, toolchain directive, generator or alternate dependency inputs. | none | README.md:626 |
| DEMO-OPERATOR-DOCS-10 | docs | Make the directory and its ancestors root-owned and safe from agent writes. Bundle files must be regular files with mode `0444` or `0555`; symlinks, hard links and unlisted files are refused. Write `MANIFEST` with LF endings and a final LF. Its first lines are `go<TAB>1.26.10` and `modules<TAB><Lock.ModulesDigest()>`. Follow them with one tab-separated row per file other than `MANIFEST`, sorted by relative path: relative path, four-digit octal mode, decimal size, lowercase SHA-256. `Lock.ModulesDigest()` hashes the canonical dependency lock; the worker's bundle digest separately hashes the exact manifest bytes. `host.CheckDemoToolchain` checks the entire bundle, then worker initialization must pass the nested isolation check and compile its trusted probe in the disposable offline service. There is no download fallback. To replace a bundle, drain builds, install a new immutable directory, update the per-box path and restart root control. | <TAB>, <Lock.ModulesDigest()> | README.md:628 |
-| DEMO-OPERATOR-DOCS-11 | docs | For an approved rollout, point wildcard DNS for your demo domain at the existing ingress and install wildcard TLS using the deployment's existing certificate workflow. The edge includes `CARLOS_DEMO_DOMAIN` among its explicit wildcard parents. Roll the built boxes and ingress first, then the console. Confirm the box reports `anonymous-demo-v1` with the expected verified bundle digest, the policy writer can acquire its lease, and change delivery is working before enabling admission. Verify an ordinary app through its own hostname as well. | none | README.md:630 |
-| DEMO-OPERATOR-DOCS-12 | docs | For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without login to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Poll `GET /api/demo/jobs/<jobID>` until it reports live, then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission. | <jobID>, <claimToken> | README.md:632 |
-| DEMO-OPERATOR-DOCS-13 | docs | Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins; the builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and the local protocol and durability checks. A skip is outstanding evidence, never a pass for rollout. Real DNS, TLS and fleet activation still need a separately recorded deployment check. | none | README.md:634 |
-| DEMO-OPERATOR-DOCS-14 | docs | After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet and domain settings and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours; allow up to ten minutes for serving to stop. Local DB, WAL, SHM, runtime and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until reconnect; it must not restart the expired demo. Confirm the job is expired, the host no longer serves, and cleanup has completed before dismantling witness resources. Public demo hostnames are never reused, and minimal host tombstones remain after detailed history ages out. | none | README.md:636 |
+| DEMO-OPERATOR-DOCS-11 | docs | For an approved rollout, point wildcard DNS for your demo domain at the existing ingress and install wildcard TLS through the deployment's existing certificate workflow. The edge includes `CARLOS_DEMO_DOMAIN` among its explicit wildcard parents. Roll out the built boxes and ingress first, then the console. Confirm the box reports `anonymous-demo-v1` with the expected verified bundle digest, the policy writer can acquire its lease, and change delivery is working before enabling admission. Verify an ordinary app through its own hostname as well. | none | README.md:630 |
+| DEMO-OPERATOR-DOCS-12 | docs | For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without logging in to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Poll `GET /api/demo/jobs/<jobID>` until it reports live. Then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify that a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission. | <jobID>, <claimToken> | README.md:632 |
+| DEMO-OPERATOR-DOCS-13 | docs | Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins; the builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and the local protocol and durability checks. A skipped test is outstanding evidence, not a rollout pass. Real DNS, TLS and fleet activation still need a separately recorded deployment check. | none | README.md:634 |
+| DEMO-OPERATOR-DOCS-14 | docs | After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet and domain settings and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours. Allow up to ten minutes for serving to stop. Local DB, WAL, SHM, runtime and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until reconnect. It must not restart the expired demo. Confirm that the job is expired, the host no longer serves, and cleanup has completed before dismantling witness resources. Never reuse public demo hostnames. Keep minimal host tombstones after detailed history ages out. | none | README.md:636 |
+
+## Delta (pending copy pass)
+
+DRAFT. Task 8 added these surfaces after the delegated deck. The retirement audit reuses the approved `DEMO-EXPIRED` text above.
+
+| key | kind (API refusal relayed to a person / operator log / docs) | current text | placeholders | where (file:line) |
+| --- | --- | --- | --- | --- |
+| DEMO-EXPIRED-CLEANUP | operator log | Demo cleanup failed. Its place stays reserved until cleanup succeeds. | demo ID, host, assigned box, error | internal/console/demo_expiry.go:expireDemos; internal/console/apidemo.go:demoCopy |
+| DEMO-EXPIRED-WAITING | operator log | Demo cleanup is waiting for its box. If the box is offline, cleanup resumes when it reconnects. Its place stays reserved. | demo ID, host, assigned box | internal/console/demo_expiry.go:expireDemoLocked; internal/console/apidemo.go:demoCopy |
+| DEMO-EXPIRED-PURGED | audit | The expired demo has been permanently removed. | none | internal/console/demo_expiry.go:finishDemoPurge; internal/console/apidemo.go:demoCopy |
+| DEMO-EXPIRED-AGENT | operator log | agent: DEMO-EXPIRED: cleanup failed demo=%s host=%s box=%s retry=%s: %v | demo ID, host, box, backoff, error | internal/host/demo_cleanup.go:demoWorker.deliverDemoRetirement |
+| DEMO-EXPIRED-DANGLING | operator log | instance-control: demo purge: skipping dangling live link %s | live link name | internal/instancectl/demo_versions.go:Server.purgeDemoVersions |
+| DEMO-EXPIRED-CLEANUP-LOG | operator log | console: DEMO-EXPIRED: %s demo=%s host=%s box=%s: %v | copy message, demo ID, host, assigned box, error | internal/console/demo_expiry.go:expireDemos |
+| DEMO-EXPIRED-WAITING-LOG | operator log | console: DEMO-EXPIRED: %s demo=%s host=%s box=%s | copy message, demo ID, host, assigned box | internal/console/demo_expiry.go:expireDemoLocked |
+| DEMO-EXPIRED | audit | This demo has expired and will be removed permanently. | none | internal/console/demo_expiry.go:expireDemoLocked; internal/console/apidemo.go:demoCopy |
diff --git a/docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-1.md b/docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-1.md
new file mode 100644
index 000000000..b5e7b3aa1
--- /dev/null
+++ b/docs/superpowers/specs/LUNA-COPY-BRIEF-AGENT-START-DEMO-1.md
@@ -0,0 +1,34 @@
+# Copy pass brief: anonymous demo apps (branch agent-start-demo-1)
+
+You are reviewing user-facing strings for a hosting platform's console API and operator docs. Paul, the owner, delegated this review to you. Apply his house rules and return improved strings.
+
+The feature: anyone can ask their own AI coding agent (Claude Code, Codex, Cursor, often on a phone) to build a small app. The agent sends the app's Go source, with no account and no sign-in, to `POST /api/demo/apps`. The platform builds it on its side and runs it for 24 hours at a random address such as `bright-otter-42.example.com`, with its own small SQLite database. The agent gets a secret token to send updates and to poll a status URL. Claiming the demo by email comes in a later release (not available yet). The deck with every string, its key, kind and placeholders is `docs/superpowers/notes/copy-agent-start-demo-1.md`.
+
+Three audiences:
+- **API refusals and statuses** ("API refusal relayed to a person"). The agent reads them and usually passes them on to the person in its own words. That person may be non-technical: no jargon, no internals ("holding account", "fleet", "lease", "tarball" only where an agent must act on it), say what happened and what to do next. Where only the agent can act (archive format), it is fine to be precise for the agent.
+- **Operator log lines**: read by the platform operator in logs. Lower case start, no full stop at the end, Go error style.
+- **Operator docs** (README section for the platform operator): ordinary sentence case, full stops, plain and direct. Markdown table rows (`<br>` marks line breaks in the deck) keep their table structure.
+
+## House rules
+
+- Plain words, short sentences, no marketing tone, no exclamation marks.
+- No em dashes or en dashes used as dashes. Where you would use one, end the sentence with a full stop and start a new sentence. In operator log lines the new sentence continues in lower case (Go error style: "could not provision the store. re-run `carlos store create` to resume").
+- API refusals and statuses: sentence case, full stops, one to three short sentences.
+- Keep every placeholder (`%s`, `%v`, `%d`) and their order. If one must move, say so in Flags.
+- Leave environment variable names, paths, HTTP methods and paths, command lines, Go version numbers and module names exactly as they are.
+- Do not name the product. Neutral examples only (`shop`, `example.com`); never a real customer.
+- Human text only; anything else in the deck stays unchanged.
+
+## Facts that must stay true
+
+- A demo lives 24 hours from creation. Updates replace the running version but never extend expiry, and keep the database.
+- No backups. If the server holding a demo's data is lost, the data is gone. Demos cannot be moved, copied or imported.
+- Demos have no outbound network, email, file storage, schedules, sidecars or custom domains.
+- Limits: source archive at most 5,000,000 bytes compressed, sent within 30 seconds, as a gzip tar; a per-address and a deployment-wide daily creation limit; a ceiling on demos alive at once (new ones are refused, existing ones are never removed to make room); one build at a time per demo and a cap on updates per demo; status polling is rate limited.
+- When a demo update fails, either the previous version keeps running (DEMO-ROLLED-BACK) or, if there was no working version, nothing is live. The fix is another update with the same token.
+- Claiming is not available yet in this release.
+- The token is secret; strings must never suggest sharing it with anyone but the agent.
+
+## Output
+
+Do not edit any file. Answer with one markdown table, `| key | new | why |`, one row per deck row in deck order (repeat a key when the deck repeats it, adding the file:line in why), every row included, `unchanged` in why when you keep a string. Then a short **Flags** list for anything you could not fix within these rules (a fact you think is wrong, a placeholder that must move, a string that should be split). Nothing else.
diff --git a/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1.md b/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1.md
new file mode 100644
index 000000000..4dde2a77f
--- /dev/null
+++ b/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1.md
@@ -0,0 +1,139 @@
+| key | new | why |
+| --- | --- | --- |
+| DEMO-EXPIRED | This demo has expired and will be removed permanently. | Clarifies the outcome. |
+| DEMO-POLICY | Anonymous demos cannot use this operation. Their restrictions and 24-hour expiry cannot be changed. | Puts the subject first and keeps the limit clear. |
+| DEMO-CONFIG | Anonymous demos are not available right now. Try again later. | Removes internal setup terms from a message relayed to a person. |
+| DEMO-CREATE-LIMIT | The daily limit for creating demos has been reached. Try again after 24 hours. | Uses plain wording. |
+| DEMO-LIVE-LIMIT | The maximum number of live demos has been reached. Try again later. Existing demos will keep running. | Explains the ceiling without calling demos places. |
+| DEMO-TOKEN | This demo token is invalid or no longer available. | Uses the agent-facing term without suggesting the token be shared. |
+| DEMO-UPDATE | This demo is already being updated or has reached its update limit. Updates do not extend its expiry. | Separates the two refusal reasons clearly. |
+| DEMO-BUILD | Demo builds are unavailable right now. Try again later. | Adds a plain retry instruction. |
+| DEMO-BUILD-STARTING | The demo is starting. | unchanged |
+| DEMO-BUILD-FINISHING | The update is finishing. Try again shortly. | unchanged |
+| DEMO-BUILD-LIVE | The demo is live. | unchanged |
+| DEMO-BUILD-FAILED | The demo could not start. Send another update with the same token. | Makes the retry action direct and keeps the token private. |
+| DEMO-ROLLED-BACK | The update failed, but the previous version is still running. Send another update with the same token. | Replaces the semicolon with two plain clauses. |
+| DEMO-CHECK-FAILED | The service could not check this demo. Try again shortly. | Removes implementation wording. |
+| DEMO-COMPILE-FAILED | The demo build failed. Send another update with the same token. | Makes the retry action direct. |
+| DEMO-BUILD-TIMEOUT | The demo was not ready within 60 seconds. Send another update with the same token. | Uses plain wording and preserves the timeout. |
+| DEMO-SOURCE | Send a gzip tar archive no larger than 5,000,000 bytes within 30 seconds. | Keeps the exact archive requirements while replacing tarball with plain wording. |
+| DEMO-CLAIM-LATER | Claiming is not available in this release. | States the release scope directly. |
+| DEMO-STATUS-LIMIT | Status requests are too frequent. Try again in two seconds. | unchanged |
+| DEMO-NOT-FOUND | This demo job is no longer available. | Makes the likely state clear without exposing internals. |
+| DEMO-DATA | Demo data stays on its assigned server and has no backup. The demo cannot be moved, copied or imported. If that server loses the data, it cannot be restored. | Uses direct wording and makes the loss condition explicit. |
+| DEMO-SOURCE | The source archive does not match the demo starter requirements. | unchanged; internal/demobuild/diagnostics.go:15 |
+| DEMO-BUILD | The demo build could not be completed. | unchanged; internal/demobuild/diagnostics.go:16 |
+| DEMO-OPERATOR-024 | console: demo job recovery: %v | unchanged |
+| DEMO-OPERATOR-025 | console: record view backstop: %v | unchanged |
+| DEMO-OPERATOR-026 | console: demo backstop: %v | unchanged |
+| DEMO-OPERATOR-027 | console: demo backstop changes: %v | unchanged |
+| DEMO-OPERATOR-028 | %s: refusing to wake: %w: its demo descriptor changed | unchanged |
+| DEMO-OPERATOR-029 | console: DEMO-CONFIG: %s: %v | unchanged |
+| DEMO-OPERATOR-030 | console: DEMO-CONFIG: %s | unchanged |
+| DEMO-OPERATOR-031 | claims mode is incompatible | unchanged |
+| DEMO-OPERATOR-032 | release store is missing | unchanged |
+| DEMO-OPERATOR-033 | registry is missing | unchanged |
+| DEMO-OPERATOR-034 | console origin | unchanged |
+| DEMO-OPERATOR-035 | console host overlap | unchanged |
+| DEMO-OPERATOR-036 | primary apps zone overlap | unchanged |
+| DEMO-OPERATOR-037 | holding account | unchanged |
+| DEMO-OPERATOR-038 | holding account memberships | unchanged |
+| DEMO-OPERATOR-039 | holding account credentials | unchanged |
+| DEMO-OPERATOR-040 | holding account ordinary apps | unchanged |
+| DEMO-OPERATOR-041 | registry open | unchanged |
+| DEMO-OPERATOR-042 | fleet listing | unchanged |
+| DEMO-OPERATOR-043 | fleet ownership: holding account owns another fleet | unchanged |
+| DEMO-OPERATOR-044 | fleet ownership | unchanged |
+| DEMO-OPERATOR-045 | domain claims listing | unchanged |
+| DEMO-OPERATOR-046 | domain claims key is invalid | unchanged |
+| DEMO-OPERATOR-047 | domain claims overlap | unchanged |
+| DEMO-OPERATOR-048 | holding account: %w | unchanged |
+| DEMO-OPERATOR-049 | holding account is unavailable | unchanged |
+| DEMO-OPERATOR-050 | admission registry or release store is missing | unchanged |
+| DEMO-OPERATOR-051 | fleet routes registry: %w | unchanged |
+| DEMO-OPERATOR-052 | fleet routes listing: %w | unchanged |
+| DEMO-OPERATOR-053 | fleet routes lifecycle: %w | unchanged |
+| DEMO-OPERATOR-054 | fleet routes include a non-demo or orphan route | unchanged |
+| DEMO-OPERATOR-055 | orphan list failure: %w | unchanged |
+| DEMO-OPERATOR-056 | orphan objects: invalid app key | unchanged |
+| DEMO-OPERATOR-057 | orphan objects lifecycle: %w | unchanged |
+| DEMO-OPERATOR-058 | orphan objects lack a demo app | unchanged |
+| DEMO-OPERATOR-059 | admission refused | unchanged |
+| DEMO-OPERATOR-060 | console: demo admission ready | unchanged |
+| DEMO-OPERATOR-061 | console: demo mutation %s/%s: app life: %v | unchanged |
+| DEMO-OPERATOR-062 | demo-build: unavailable or fenced job | unchanged |
+| DEMO-OPERATOR-063 | demo-build: queue full | unchanged |
+| DEMO-OPERATOR-064 | console: demo outbox pending: %v | unchanged |
+| DEMO-OPERATOR-065 | console: demo recovery outbox pending: %v | unchanged |
+| DEMO-OPERATOR-066 | console: demo changes: %v | unchanged |
+| DEMO-OPERATOR-067 | console: demo publication: %v | unchanged |
+| DEMO-OPERATOR-068 | console: demo deadlines: %v | unchanged |
+| DEMO-OPERATOR-069 | demo deny-all small policy | unchanged |
+| DEMO-OPERATOR-070 | demo-build: assigned worker is unavailable | unchanged |
+| DEMO-OPERATOR-071 | demo-build: starting timed out | unchanged |
+| DEMO-OPERATOR-072 | demo-build: settling failed publication | unchanged |
+| DEMO-OPERATOR-073 | demo-build: %s | unchanged |
+| DEMO-OPERATOR-074 | console: demo publication %s: %v | unchanged |
+| DEMO-OPERATOR-075 | console: demo settlement %s: %v | unchanged |
+| DEMO-OPERATOR-076 | console: demo readiness %s: %v | unchanged |
+| DEMO-OPERATOR-077 | console: demo completion %s: %v | unchanged |
+| DEMO-OPERATOR-078 | console: demo restore readiness %s: %v | unchanged |
+| DEMO-OPERATOR-079 | console: demo job %q: invalid spool %q; failed or pending publication settlement | unchanged |
+| DEMO-OPERATOR-080 | console: demo job %q: non-canonical spool %q; clearing reference without accessing path | unchanged |
+| DEMO-OPERATOR-081 | demo: create budget exhausted | unchanged |
+| DEMO-OPERATOR-082 | demo: live ceiling reached | unchanged |
+| DEMO-OPERATOR-083 | demo: unavailable credential | unchanged |
+| DEMO-OPERATOR-084 | demo: update budget exhausted | unchanged |
+| DEMO-OPERATOR-085 | demo: job already active | unchanged |
+| DEMO-OPERATOR-086 | demo: name already reserved | unchanged |
+| DEMO-OPERATOR-087 | console: demo abuse retention: %v | unchanged |
+| DEMO-OPERATOR-088 | %w: %s must be unset or 1 | unchanged |
+| DEMO-OPERATOR-089 | %w: %s must be a positive integer | unchanged |
+| DEMO-OPERATOR-090 | %w: %s must be positive | unchanged |
+| DEMO-OPERATOR-091 | %w: CARLOS_DEMO_BUILD_CONCURRENCY must be between 1 and 4 | unchanged |
+| DEMO-OPERATOR-092 | %w: %s is missing or invalid | unchanged |
+| DEMO-OPERATOR-093 | %w: CARLOS_DEMO_TOOLCHAIN_DIR must be absolute | unchanged |
+| DEMO-OPERATOR-094 | demo-build: invalid or expired job | unchanged |
+| DEMO-OPERATOR-095 | instance-control: demo box configuration refused | unchanged |
+| DEMO-OPERATOR-096 | agent: demo worker: box configuration refused | unchanged |
+| DEMO-OPERATOR-097 | agent: demo worker: fleet identity refused | unchanged |
+| DEMO-OPERATOR-098 | agent: demo worker: root build backend unavailable | unchanged |
+| DEMO-OPERATOR-099 | agent: demo worker: release key unavailable | unchanged |
+| DEMO-OPERATOR-100 | agent: demo worker: store door unavailable | unchanged |
+| DEMO-OPERATOR-101 | agent: demo worker: console origin unavailable | unchanged |
+| DEMO-OPERATOR-102 | agent: demo stream: %v | unchanged |
+| DEMO-OPERATOR-103 | demo-build: malformed stream | unchanged |
+| DEMO-OPERATOR-104 | demo unit cleanup: remove %s: %v; will retry next pass | unchanged |
+| DEMO-OPERATOR-105 | adopt: demo unit settings: %v | unchanged |
+| DEMO-OPERATOR-106 | %w: unit readback: %v | unchanged |
+| DEMO-OPERATOR-107 | %w: network readback | unchanged |
+| DEMO-OPERATOR-108 | %w: %s readback | unchanged |
+| DEMO-OPERATOR-109 | %w: %s mount readback | unchanged |
+| DEMO-OPERATOR-110 | %w: unit slice | unchanged |
+| DEMO-OPERATOR-111 | %w: slice readback: %v | unchanged |
+| DEMO-OPERATOR-112 | %w: size readback | unchanged |
+| DEMO-OPERATOR-113 | %w: %s kernel readback | unchanged |
+| DEMO-OPERATOR-114 | %w: cpu.max readback | unchanged |
+| DEMO-OPERATOR-115 | %w: cpu.max readback | unchanged |
+| DEMO-OPERATOR-116 | instance-control: demo box configuration refused | unchanged |
+| DEMO-OPERATOR-117 | instance-control: demo builder: %v | unchanged |
+| DEMO-OPERATOR-118 | instance-control: demo builder: %v | unchanged |
+| DEMO-OPERATOR-DOCS-01 | ### Anonymous demo apps in development | Replaces the platform-specific phrase “on dev”. |
+| DEMO-OPERATOR-DOCS-02 | Anonymous demos accept a locked Go source archive and keep a local SQLite database for 24 hours. Updates keep the same expiry and database. There are no backups, and data is not recoverable after box loss. Demos cannot send mail, use object storage or schedules, run sidecars, or use custom domains. Claiming is not available in this release. | Uses direct sentences and states the current claiming scope. |
+| DEMO-OPERATOR-DOCS-03 | Keep admission off until the designated dev witness and branch review have passed. Local protocol tests do not prove systemd isolation, public DNS or TLS. Infrastructure work needs approval for its exact scope before you create or change anything. | Makes the rollout gate grammatical and direct. |
+| DEMO-OPERATOR-DOCS-04 | Use a dedicated non-ops holding account with no human members or service credentials. It must own only the demo fleet. The fleet must be empty when you first enable admission, with no ordinary apps or orphaned app objects. Demos stay on their assigned box. Run nested linux-arm64 boxes with host claims off. Root applies the small tier and denies outbound networking to every instance on a demo box. Do not share that fleet with ordinary apps. | Uses shorter sentences and makes the fleet restriction explicit. |
+| DEMO-OPERATOR-DOCS-05 | Set these variables on the console: | unchanged |
+| DEMO-OPERATOR-DOCS-06 | \| Variable \| Setting \|<br>\| --- \| --- \|<br>\| `CARLOS_DEMO_APPS` \| `1` enables admission; leaving it unset keeps admission off. \|<br>\| `CARLOS_DEMO_ACCOUNT` \| The dedicated holding account's sqid. \|<br>\| `CARLOS_DEMO_FLEET` \| The fleet owned by that account. \|<br>\| `CARLOS_DEMO_DOMAIN` \| Your bare demo domain, for example `demo.example.com`. It must not overlap the console, primary apps zone or another domain claim. \|<br>\| `CARLOS_DEMO_CREATE_PER_IP_DAY` \| Positive integer. Default `30`. IPv6 callers share their /64 budget. \|<br>\| `CARLOS_DEMO_CREATE_GLOBAL_DAY` \| Positive integer. Default `100`. \|<br>\| `CARLOS_DEMO_MAX_LIVE` \| Positive integer. Default `20`. Failed and retiring demos keep their place until cleanup completes. \| | Keeps the table structure and technical names while simplifying the settings. |
+| DEMO-OPERATOR-DOCS-07 | Put each demo box's settings in its root-owned `/etc/carlos/host.env`. Set `CARLOS_DEMO_BOX=1` and the same `CARLOS_DEMO_ACCOUNT`, `CARLOS_DEMO_FLEET` and `CARLOS_DEMO_DOMAIN` tuple as the console. Keep the box's existing `CARLOS_FLEET`, box identity, tunnel credentials and release public key consistent with that fleet. These are per-box authority settings. Preserve them through host.env rewrites, using the same per-box mechanism as `CARLOS_FLEET`; do not deliver them through shared or regional parameters. | Clarifies the sequence without changing the configuration requirements. |
+| DEMO-OPERATOR-DOCS-08 | On each designated builder, also set `CARLOS_DEMO_BUILD_WORKER=1`, `CARLOS_DEMO_BUILD_CONCURRENCY=1`, `CARLOS_DEMO_TOOLCHAIN_DIR` to its absolute immutable bundle directory, and `CARLOS_DEMO_CONSOLE_URL` to the console's HTTPS origin, for example [https://console.example.com](https://console.example.com). Preserve these per-box values through rewrites too. Concurrency accepts values from `1` through `4`; each build needs a 1 GiB memory allowance, so keep `1` until the box has capacity for more. The console URL must be the console origin, not the tunnel hostname or the operator's CLI setting. | Makes the numeric range and operator instruction easier to scan. |
+| DEMO-OPERATOR-DOCS-09 | Build the toolchain bundle on the operator side before enabling a worker. Use native linux-arm64 Go 1.26.10 and the Rastrillo v0.30.2 dependency closure in `internal/demobuild/toolchain.lock.json`. Copy the Go distribution into the bundle root, the complete module cache into `mod/`, and a cache prewarmed by an offline build of `internal/console/testdata/demo` into `cache/`. Include Fiesta as embedded starter assets when needed; it is not a Go module. The starter contract permits only standard-library and pinned Rastrillo imports, exact locked module requirements and sums, and no vendor tree, toolchain directive, generator or alternate dependency inputs. | Uses direct wording while preserving the exact bundle contract. |
+| DEMO-OPERATOR-DOCS-10 | Make the directory and its ancestors root-owned and safe from agent writes. Bundle files must be regular files with mode `0444` or `0555`; symlinks, hard links and unlisted files are refused. Write `MANIFEST` with LF endings and a final LF. Its first lines are `go<TAB>1.26.10` and `modules<TAB><Lock.ModulesDigest()>`. Follow them with one tab-separated row per file other than `MANIFEST`, sorted by relative path: relative path, four-digit octal mode, decimal size, lowercase SHA-256. `Lock.ModulesDigest()` hashes the canonical dependency lock; the worker's bundle digest separately hashes the exact manifest bytes. `host.CheckDemoToolchain` checks the entire bundle, then worker initialization must pass the nested isolation check and compile its trusted probe in the disposable offline service. There is no download fallback. To replace a bundle, drain builds, install a new immutable directory, update the per-box path and restart root control. | Preserves all placeholders and exact technical requirements while tightening the prose. |
+| DEMO-OPERATOR-DOCS-11 | For an approved rollout, point wildcard DNS for your demo domain at the existing ingress and install wildcard TLS through the deployment's existing certificate workflow. The edge includes `CARLOS_DEMO_DOMAIN` among its explicit wildcard parents. Roll out the built boxes and ingress first, then the console. Confirm the box reports `anonymous-demo-v1` with the expected verified bundle digest, the policy writer can acquire its lease, and change delivery is working before enabling admission. Verify an ordinary app through its own hostname as well. | Replaces rollout jargon with direct instructions without changing the order or checks. |
+| DEMO-OPERATOR-DOCS-12 | For the smoke check, gzip a tar archive of the locked starter's files without a wrapper directory. Submit it without logging in to `POST /api/demo/apps` as `application/gzip`; the compressed limit is 5,000,000 bytes. Keep the returned claim token private. Poll `GET /api/demo/jobs/<jobID>` until it reports live. Then GET its exact HTTPS URL and check `X-Carlos-Version`. Write a SQLite value, submit changed source to the same POST endpoint with `Authorization: Bearer <claimToken>`, and verify that a new version serves the saved value. An update must not extend the 24-hour lifetime. An unavailable worker or failed policy check must refuse admission. | Makes the smoke-check sequence easier to follow and keeps the token private. |
+| DEMO-OPERATOR-DOCS-13 | Run `CARLOS_DEMO_DEV_WITNESS=1 go test ./internal/host -run '^TestDemoDevKernelAndPurge$' -count=1 -v` only on an explicitly designated disposable, idle linux-arm64 systemd sandbox. Install the built binary and this checkout's unit templates first. The application witness needs no pre-existing demo drop-ins; the builder witness needs root control active with its worker switch off, concurrency one, and `CARLOS_DEMO_TOOLCHAIN_DIR` pointing at the verified bundle. The root release/adoption gate must be available for the purge witness. The test exercises application and builder isolation, root stop-before-delete, and the local protocol and durability checks. A skipped test is outstanding evidence, not a rollout pass. Real DNS, TLS and fleet activation still need a separately recorded deployment check. | Clarifies that a skip is not evidence of readiness. |
+| DEMO-OPERATOR-DOCS-14 | After the smoke check, unset `CARLOS_DEMO_APPS` unless persistent dev admission was approved. Retain the account, fleet and domain settings and keep cleanup workers running. The next healthy five-minute expiry pass retires demos at 24 hours. Allow up to ten minutes for serving to stop. Local DB, WAL, SHM, runtime and build scratch must be removed before the assigned box acknowledges cleanup. Bucket content and the initialization marker must be gone before the place is released. A disconnected box keeps its cleanup obligation until reconnect. It must not restart the expired demo. Confirm that the job is expired, the host no longer serves, and cleanup has completed before dismantling witness resources. Never reuse public demo hostnames. Keep minimal host tombstones after detailed history ages out. | Uses shorter sentences and makes the cleanup checks explicit. |
+
+**Flags**
+
+- `DEMO-BUILD-TIMEOUT` retains the deck's 60-second readiness timeout. The brief states the 30-second source-upload limit but does not independently confirm the build timeout.
+- `DEMO-EXPIRED` says removal is permanent, while the operator docs retain minimal host tombstones. Confirm that “permanently removed” refers to the demo and its data, not every cleanup record.
diff --git a/internal/console/apidemo.go b/internal/console/apidemo.go
index fcfbf96cd..1a5c2bce9 100644
--- a/internal/console/apidemo.go
+++ b/internal/console/apidemo.go
@@ -24,33 +24,35 @@ import (
"github.com/carlosframework/platform/internal/release"
)
-// DRAFT pending copy review. Keep this surface's human-facing text here.
+// Approved by delegation: Luna copy pass, 2026-11-03 (R22).
// DEMO-LIVE-LIMIT uses a read-only pre-check before spending an attempt and
// a five-minute retry; ReserveDemo still enforces the ceiling transactionally.
var demoCopy = map[string]string{
+ // DRAFT: Task 8 expiry copy is pending its own copy pass.
"DEMO-EXPIRED-CLEANUP": "Demo cleanup failed. Its place stays reserved until cleanup succeeds.",
"DEMO-EXPIRED-WAITING": "Demo cleanup is waiting for its box. If the box is offline, cleanup resumes when it reconnects. Its place stays reserved.",
"DEMO-EXPIRED-PURGED": "The expired demo has been permanently removed.",
- "DEMO-EXPIRED": "This demo has expired and is being permanently removed.",
- "DEMO-POLICY": "This operation is not available for anonymous demos. Their restrictions and 24-hour expiry cannot be changed.",
- "DEMO-CONFIG": "Demo settings are incomplete or inconsistent. Check the holding account, fleet and domain.",
- "DEMO-CREATE-LIMIT": "The daily demo creation limit has been reached. Try again after 24 hours.",
- "DEMO-LIVE-LIMIT": "All demo places are in use. Existing demos are kept. Try again later.",
- "DEMO-TOKEN": "This demo credential is invalid or no longer available.",
- "DEMO-UPDATE": "A build is already active or this demo has used its update limit. Updates do not extend expiry.",
- "DEMO-BUILD": "Demo builds are unavailable. Try again later.",
+ // Approved copy follows.
+ "DEMO-EXPIRED": "This demo has expired and will be removed permanently.",
+ "DEMO-POLICY": "Anonymous demos cannot use this operation. Their restrictions and 24-hour expiry cannot be changed.",
+ "DEMO-CONFIG": "Anonymous demos are not available right now. Try again later.",
+ "DEMO-CREATE-LIMIT": "The daily limit for creating demos has been reached. Try again after 24 hours.",
+ "DEMO-LIVE-LIMIT": "The maximum number of live demos has been reached. Try again later. Existing demos will keep running.",
+ "DEMO-TOKEN": "This demo token is invalid or no longer available.",
+ "DEMO-UPDATE": "This demo is already being updated or has reached its update limit. Updates do not extend its expiry.",
+ "DEMO-BUILD": "Demo builds are unavailable right now. Try again later.",
"DEMO-BUILD-STARTING": "The demo is starting.",
"DEMO-BUILD-FINISHING": "The update is finishing. Try again shortly.",
"DEMO-BUILD-LIVE": "The demo is live.",
- "DEMO-BUILD-FAILED": "The demo could not start. Submit another update with the same token.",
- "DEMO-ROLLED-BACK": "The demo update failed; previous version still running. Submit another update with the same token.",
- "DEMO-CHECK-FAILED": "Could not check whether this app is an anonymous demo. Try again shortly.",
- "DEMO-COMPILE-FAILED": "The demo build failed. Submit another update with the same token.",
- "DEMO-BUILD-TIMEOUT": "The demo did not become ready within 60 seconds. Submit another update with the same token.",
- "DEMO-SOURCE": "Send a gzip tarball no larger than 5,000,000 bytes within 30 seconds.",
- "DEMO-CLAIM-LATER": "Claiming is not available yet.",
+ "DEMO-BUILD-FAILED": "The demo could not start. Send another update with the same token.",
+ "DEMO-ROLLED-BACK": "The update failed, but the previous version is still running. Send another update with the same token.",
+ "DEMO-CHECK-FAILED": "The service could not check this demo. Try again shortly.",
+ "DEMO-COMPILE-FAILED": "The demo build failed. Send another update with the same token.",
+ "DEMO-BUILD-TIMEOUT": "The demo was not ready within 60 seconds. Send another update with the same token.",
+ "DEMO-SOURCE": "Send a gzip tar archive no larger than 5,000,000 bytes within 30 seconds.",
+ "DEMO-CLAIM-LATER": "Claiming is not available in this release.",
"DEMO-STATUS-LIMIT": "Status requests are too frequent. Try again in two seconds.",
- "DEMO-NOT-FOUND": "This demo job is not available.",
+ "DEMO-NOT-FOUND": "This demo job is no longer available.",
}
// DemoConfigError is shared with console startup so operator copy stays here.
diff --git a/internal/console/demo_data.go b/internal/console/demo_data.go
index ee7b3e47c..a3afe6385 100644
--- a/internal/console/demo_data.go
+++ b/internal/console/demo_data.go
@@ -2,10 +2,9 @@ package console
import "net/http"
-// DRAFT pending copy review. Extend the shared copy map without changing
-// the Task 3 policy implementation while it is under review.
+// Approved by delegation: Luna copy pass, 2026-11-03 (R22).
func init() {
- demoCopy["DEMO-DATA"] = "Demo data stays on its assigned server and has no backup. This demo cannot be moved, copied or imported. If its local data is lost, it cannot be restored."
+ demoCopy["DEMO-DATA"] = "Demo data stays on its assigned server and has no backup. The demo cannot be moved, copied or imported. If that server loses the data, it cannot be restored."
}
func demoDataRefusal() *doorRefusal {
diff --git a/internal/console/demo_e2e_test.go b/internal/console/demo_e2e_test.go
index 9ec75fc75..73d93d94b 100644
--- a/internal/console/demo_e2e_test.go
+++ b/internal/console/demo_e2e_test.go
@@ -42,7 +42,7 @@ func TestDemoSourceToLiveAndUpdate(t *testing.T) {
if os.Getenv("CARLOS_DEMO_TOOLCHAIN_DIR") != "" {
t.Fatal("local witness requires an absent toolchain bundle; run the designated dev witness for root compilation")
}
- t.Log("R6: no real toolchain bundle: fake builder returns prebuilt linux-arm64 output; native build of identical source runs locally. This is not kernel or dev deployment evidence.")
+ t.Log("R6: no real toolchain bundle: fake builder returns prebuilt linux-arm64 output; native build uses the same application source with a local-only Go 1.26.0 directive. Submitted source retains the locked Go version. This is not kernel or dev deployment evidence.")
archives, arm, native := demoE2EBuilds(t)
started := time.Now()
s, _ := demoJobServer(t)
@@ -447,15 +447,24 @@ func demoE2EBuilds(t *testing.T) (archives [2][]byte, arm [2][]byte, native [2]s
if name == "main.go" {
raw = bytes.ReplaceAll(raw, []byte(`const revision = "one"`), []byte(`const revision = "`+revision+`"`))
}
- if err := os.WriteFile(filepath.Join(dir, name), raw, 0600); err != nil {
- t.Fatal(err)
- }
if err := tw.WriteHeader(&tar.Header{Name: name, Mode: 0644, Size: int64(len(raw))}); err != nil {
t.Fatal(err)
}
if _, err := tw.Write(raw); err != nil {
t.Fatal(err)
}
+ // Only the local build copy uses the repository's minimum Go version.
+ // The archive above keeps the builder's exact pin for ValidateSource.
+ if name == "go.mod" {
+ pinned := []byte("\ngo " + demobuild.ToolchainVersion + "\n")
+ if bytes.Count(raw, pinned) != 1 {
+ t.Fatal("fixture must contain the locked Go directive")
+ }
+ raw = bytes.Replace(raw, pinned, []byte("\ngo 1.26.0\n"), 1)
+ }
+ if err := os.WriteFile(filepath.Join(dir, name), raw, 0600); err != nil {
+ t.Fatal(err)
+ }
}
if err := tw.Close(); err != nil {
t.Fatal(err)
diff --git a/internal/console/demo_expiry.go b/internal/console/demo_expiry.go
index 3b7ca31c3..cda46feb1 100644
--- a/internal/console/demo_expiry.go
+++ b/internal/console/demo_expiry.go
@@ -64,6 +64,7 @@ func (s *Server) expireDemos(ctx context.Context, now time.Time, evidence bool)
return
}
if err := s.expireDemoLocked(ctx, d, now); err != nil {
+ // DRAFT: Task 8 expiry surface is pending copy review.
log.Printf("console: DEMO-EXPIRED: %s demo=%s host=%s box=%s: %v", demoCopy["DEMO-EXPIRED-CLEANUP"], d.ID, d.Host, d.AssignedBox, err)
jobFailed(ctx, err)
}
@@ -134,6 +135,7 @@ func (s *Server) expireDemoLocked(ctx context.Context, d DemoRow, now time.Time)
if err = tx.Commit(); err != nil {
return err
}
+ // DRAFT: Task 8 expiry surface is pending copy review.
s.audit(&Account{ID: d.AccountID, Sqid: d.AccountSqid}, d.App, expiryActor, "demo-retire", demoCopy["DEMO-EXPIRED"])
r.Acknowledged = d.AssignedBox == ""
r.InitializedClean = r.Acknowledged
@@ -204,6 +206,7 @@ func (s *Server) expireDemoLocked(ctx context.Context, d DemoRow, now time.Time)
if n, err := res.RowsAffected(); err != nil {
return err
} else if n > 0 {
+ // DRAFT: Task 8 expiry surface is pending copy review.
log.Printf("console: DEMO-EXPIRED: %s demo=%s host=%s box=%s", demoCopy["DEMO-EXPIRED-WAITING"], d.ID, d.Host, d.AssignedBox)
}
}
@@ -260,6 +263,7 @@ func (s *Server) finishDemoPurge(ctx context.Context, d DemoRow, now time.Time)
if err := tx.Commit(); err != nil {
return err
}
+ // DRAFT: Task 8 expiry surface is pending copy review.
s.audit(&Account{ID: d.AccountID, Sqid: d.AccountSqid}, d.App, expiryActor, "demo-purge", demoCopy["DEMO-EXPIRED-PURGED"])
return nil
}
diff --git a/internal/console/demo_review_test.go b/internal/console/demo_review_test.go
index c7937a4f1..3bc6bb6d7 100644
--- a/internal/console/demo_review_test.go
+++ b/internal/console/demo_review_test.go
@@ -23,11 +23,11 @@ func TestDemoStatusOnlyShippedVersion(t *testing.T) {
state, stage, message string
version bool
}{
- {"failed", "", "The demo build failed. Submit another update with the same token.", false},
+ {"failed", "", "The demo build failed. Send another update with the same token.", false},
{"ready", "", "The demo is starting.", false},
{"ready", "policy", "The demo is starting.", false},
{"ready", "shipped", "The demo is starting.", true},
- {"failed", "shipped", "The demo could not start. Submit another update with the same token.", true},
+ {"failed", "shipped", "The demo could not start. Send another update with the same token.", true},
{"published", "starting", "The demo is live.", true},
} {
t.Run(tc.state+"/"+tc.stage, func(t *testing.T) {
diff --git a/internal/console/demo_settlement_test.go b/internal/console/demo_settlement_test.go
index 5bb9e4768..ac06529ca 100644
--- a/internal/console/demo_settlement_test.go
+++ b/internal/console/demo_settlement_test.go
@@ -109,7 +109,7 @@ func TestDemoPublishSettlement(t *testing.T) {
t.Fatalf("failed publication channel: %+v %v", ptr, err)
}
status := demoSettlementStatus(t, s, j)
- if status["status"] != "failed" || status["url"] != nil || strings.Contains(status["message"].(string), "previous version still running") != update {
+ if status["status"] != "failed" || status["url"] != nil || strings.Contains(status["message"].(string), "previous version is still running") != update {
t.Fatalf("status: %v", status)
}
current, err := s.store.demoByID(t.Context(), d.ID)
@@ -173,7 +173,7 @@ func TestDemoPublishSettlementRestart(t *testing.T) {
t.Fatal(err)
}
status := demoSettlementStatus(t, s, j)
- if status["status"] != "starting" || status["message"] != demoCopy["DEMO-BUILD-FINISHING"] || status["version"] != nil || status["url"] != nil || strings.Contains(status["message"].(string), "previous version still running") {
+ if status["status"] != "starting" || status["message"] != demoCopy["DEMO-BUILD-FINISHING"] || status["version"] != nil || status["url"] != nil || strings.Contains(status["message"].(string), "previous version is still running") {
t.Fatalf("premature restoration claim: %v", status)
}
s = reopenDemoJobs(t, s)
@@ -182,7 +182,7 @@ func TestDemoPublishSettlementRestart(t *testing.T) {
t.Fatal(err)
}
status = demoSettlementStatus(t, s, j)
- if status["status"] != "failed" || !strings.Contains(status["message"].(string), "previous version still running") {
+ if status["status"] != "failed" || !strings.Contains(status["message"].(string), "previous version is still running") {
t.Fatalf("settled status: %v", status)
}
ptr, err := release.Channel(t.Context(), base, s.cfg.ReleasePub, j.Account, j.App, "edge")
@@ -213,7 +213,7 @@ func TestDemoPublishSettlementStatusFenced(t *testing.T) {
t.Fatal(err)
}
status := demoSettlementStatus(t, s, j)
- if strings.Contains(status["message"].(string), "previous version still running") {
+ if strings.Contains(status["message"].(string), "previous version is still running") {
t.Fatalf("stale restoration claim: %v", status)
}
})
@@ -238,7 +238,7 @@ func TestDemoPublishSettlementReadinessDeadline(t *testing.T) {
t.Fatal(err)
}
status := demoSettlementStatus(t, s, j)
- if status["status"] != "failed" || !strings.Contains(status["message"].(string), "previous version still running") {
+ if status["status"] != "failed" || !strings.Contains(status["message"].(string), "previous version is still running") {
t.Fatalf("readiness failure: %v", status)
}
}
diff --git a/internal/demobuild/diagnostics.go b/internal/demobuild/diagnostics.go
index ec7c5ef4d..2d0faf277 100644
--- a/internal/demobuild/diagnostics.go
+++ b/internal/demobuild/diagnostics.go
@@ -9,8 +9,9 @@ import (
"unicode/utf8"
)
-// DraftCopy is DRAFT pending copy review. Callers use copy IDs for platform
-// refusals; tool output is never substituted into these messages.
+// DraftCopy was approved by delegation: Luna copy pass, 2026-11-03 (R22).
+// Callers use copy IDs for platform refusals; tool output is never substituted
+// into these messages.
var DraftCopy = map[string]string{
"DEMO-SOURCE": "The source archive does not match the demo starter requirements.",
"DEMO-BUILD": "The demo build could not be completed.",
diff --git a/internal/host/demo_cleanup.go b/internal/host/demo_cleanup.go
index c534d7c26..1a457f63f 100644
--- a/internal/host/demo_cleanup.go
+++ b/internal/host/demo_cleanup.go
@@ -149,6 +149,7 @@ func (w *demoWorker) deliverDemoRetirement(ctx context.Context, wire []byte, now
delay := 5 * time.Minute
if err != nil {
delay = min(max(30*time.Second, retry.delay*2), 5*time.Minute)
+ // DRAFT: Task 8 expiry surface is pending copy review.
log.Printf("agent: DEMO-EXPIRED: cleanup failed demo=%s host=%s box=%s retry=%s: %v", r.Demo.ID, r.Demo.Host, w.box, delay, err)
}
// Also suppress successful duplicates already buffered on the connection.
diff --git a/internal/instancectl/demo_versions.go b/internal/instancectl/demo_versions.go
index e2f8b8faf..8be18c708 100644
--- a/internal/instancectl/demo_versions.go
+++ b/internal/instancectl/demo_versions.go
@@ -80,6 +80,7 @@ func (s *Server) purgeDemoVersions(ctx context.Context, d demo.Descriptor) error
for _, e := range entries {
dst, err := filepath.EvalSymlinks(filepath.Join(s.OptDir, "live", e.Name()))
if errors.Is(err, os.ErrNotExist) {
+ // DRAFT: Task 8 expiry surface is pending copy review.
log.Printf("instance-control: demo purge: skipping dangling live link %s", e.Name())
continue
}