carlos / platform Public

copy: apply delta copy pass and refresh census

codex agent, operated by paul@keymail.dev pushed by claude agent, operated by paul@keymail.dev e84d0114a005632af5951edddf04b9fe838baaa4 parent 3247de4
9 files changed, +125 −18
  • docs/superpowers/notes/census-agent-start-demo-1-claims.md +96 −0
  • docs/superpowers/notes/copy-agent-start-demo-1.md +4 −4
  • docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md +14 −0
  • internal/console/apidemo.go +2 −4
  • internal/console/demo_expiry.go +0 −4
  • internal/console/demo_retirement_http_test.go +8 −3
  • internal/host/demo_cleanup.go +0 −1
  • internal/instancectl/demo_versions.go +0 −1
  • internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv +1 −1

CI failed — run details

Intent

Human

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

Attributed to this commit: 86.1 g CO₂e (7,681,966 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/docs/superpowers/notes/census-agent-start-demo-1-claims.md b/docs/superpowers/notes/census-agent-start-demo-1-claims.md
new file mode 100644
index 000000000..cf052a245
--- /dev/null
+++ b/docs/superpowers/notes/census-agent-start-demo-1-claims.md
@@ -0,0 +1,96 @@
+# Recovered Task 9 CLAIMS from the generated agent-start-demo-1 overlay.
+# Original TMPDIR/task9-77jHY5 scratch was removed at Task 9 cleanup.
+internal/activator/activator.go:Service.doWakeOnce Reads IsDemo and demo admission/capability state; chooses local lease retention, skips seed upload and sidecar selection. Existing stop and under-lease ordering retained.
+internal/activator/backend_exec.go:ExecBackend.HasSidecar Reads IsDemo and returns false before the sidecar env stat.
+internal/activator/backend_exec.go:ExecBackend.Restore Reads IsDemo before seed/HA/replica restore and dispatches marked routes to restoreDemoLocal.
+internal/activator/backend_exec.go:ExecBackend.Seed Reads IsDemo and refuses before seed work.
+internal/activator/backend_exec.go:ExecBackend.SeedExe Reads IsDemo and refuses before staged seed verification or execution.
+internal/activator/demo_durability.go:ExecBackend.restoreDemoLocal Agent-process unit. Reads the regular local DB and bounded demo-init-pending proof through instancefs, assignment marker and superseded evidence. Writes pending state durably before metadata GET/PUT; only confirmed remote absence grants retry proof bound to demo ID and assignment. Resumes interrupted initialization, then durably removes pending state before permitting start. No replica or snapshot reads.
+internal/activator/demo_durability.go:Service.demoWakeRefusal Reads claims mode, existing hook/identity capability and configured FleetWake fields; refuses unsupported demo wake paths before work.
+internal/activator/demo_durability.go:demoDataShape Reads route descriptor and durability/runtime/assignment fields and current time; calls exported demo.ValidateBinding for structure, not signed-policy authority.
+internal/activator/demo_durability.go:demoRecordMatches Compares the already-read record descriptor, identity, placement and durable shape with the route.
+internal/activator/demo_durability.go:retainDatabase Reads IsDemo and the optional localDemoLease capability; ordinary replication interval selection unchanged.
+internal/activator/escrow.go:ExecBackend.escrowEligibleAt Reads IsDemo and excludes marked routes before escrow eligibility.
+internal/activator/hafiles.go:ExecBackend.openHostFiles Reads IsDemo and refuses before opening the HA files store/publisher.
+internal/activator/hasecrets.go:ExecBackend.haHostNow Reads IsDemo and local shape before remembered HA state or record queries.
+internal/activator/hawake.go:ExecBackend.acquireClassified Reads demo shape/layout and takes the existing legacy renewing lease for demos; never falls through to HA acquisition.
+internal/activator/hawake.go:ExecBackend.isHA Reads IsDemo and local shape; demos do not read HA lifetime/record state.
+internal/activator/rootfsdb.go:ExecBackend.PlaceRootfsDB Retains rootfs-only admission and delegates the existing placement reads to placeEmptyDB.
+internal/activator/rootfsdb.go:ExecBackend.placeEmptyDB Moved placeholder implementation: same nested path checks, private empty SQLite creation, no-follow temp opens, identity/content reads and no-replacement rename; now shared by demo initialization.
+internal/activator/size.go:SizedLimit Reads Route.IsDemo before ordinary size selection; returns the existing small table row for any demo marker.
+internal/activator/stateless.go:Service.storageMode Reads IsDemo and the resolved storage declaration on every return; refuses demo stateless transitions without changing ordinary declaration reads.
+internal/activator/wakeidentity.go:Service.currentWakeRoute Agent-process unit. Compares demo identity/shape whenever either the route or its already-read record carries demo identity; refuses mismatches before restore or replication. No extra record request.
+internal/activator/wakeidentity.go:leaseRouteChanged Agent-process unit. Compares DemoID, DemoHost, DemoLifetime and DemoExpiresAt in the existing under-lease route reread; any change refuses the wake before restore. No additional I/O.
+internal/demobuild/bundle.go:checkBundle Reads no-follow manifest/version/files, stat ownership/modes/link counts and directory inventory; hashes exact bytes and compares the module lock digest.
+internal/demobuild/job.go:NewJobID Newly root-reachable; reads crypto/rand, not a path.
+internal/demobuild/lock.go:ReadLock Newly root-reachable; reads and validates the supplied bounded lock reader.
+internal/demobuild/purge.go:Worker.PurgeDemo Reads root-owned seen/job-ID marker and scratch existence; checks demo/box/job binding before existing stop/cgroup/unmount cleanup. Fix round 1: also requires the job marker host to match the purge host; no new file reads.
+internal/demobuild/runner.go:Run Consumes only its private root-prepared invocation, proves stop, then no-follow reads bounded diagnostics/output beneath that job.
+internal/demobuild/runner.go:ValidateOutput Reads bounded bytes, ELF header/program headers and computes their SHA-256; never executes output.
+internal/demobuild/security_linux.go:mountedAt Reads fixed /proc/self/mountinfo; uncertainty prevents deletion.
+internal/demobuild/security_linux.go:verifyWorkMount Reads filesystem type/capacity and mount presence for a root-derived work path.
+internal/demobuild/source.go:ValidateSource Newly root-reachable Task 2 unit; reads bounded compressed/archive/source bytes and the trusted lock; validates without extracting or executing.
+internal/demobuild/stdlib_linux_arm64.txt:external Embedded Go 1.26.10 linux-arm64 standard-library import allowlist generated from the pinned toolchain; trusted validation data, not tenant input.
+internal/demobuild/toolchain.lock.json:external Embedded Rastrillo v0.30.2 dependency closure with Go pin and module hashes; operator-generated lock constrains submitted source and bundle verification. No fetched lock.
+internal/demobuild/unit.go:Worker.assertUnit Reads effective sandbox, resource, environment and bind properties; missing or mismatched properties refuse compiler start.
+internal/demobuild/unit.go:Worker.prepareUnit Cleanup now has its own five-second context; stop, empty-cgroup and unmount gates remain unchanged.
+internal/demobuild/unit.go:Worker.recover Enumerates root state; processes validated job/attempt names only and retains unrelated files.
+internal/demobuild/unit.go:emptyBuildCgroup Reads only the derived cgroup.events path; absent directory or populated 0 proves termination.
+internal/demobuild/unit.go:var systemctl Executes fixed /usr/bin/systemctl with a scrubbed fixed environment and bounded output; callers supply platform-derived unit names and fixed operations for offline build supervision.
+internal/demobuild/worker.go:NewWorker Wires existing root-owned recovery into cleanup retry; existing bundle/root reads unchanged.
+internal/demobuild/worker.go:Worker.Build Holds the build/purge read lock through cleanup; existing bounded source read remains.
+internal/demobuild/worker.go:Worker.expireMarkers Checks that corresponding job scratch is absent before removing an expired ownership marker.
+internal/domains/reconcile.go:firstReadyUpstream Reads IsDemo on the already-listed routes and refuses an automatic canonical/canary source for that app.
+internal/edge/demo.go:Edge.demoRouteOK Reads route identity, demo descriptor, placement, runtime, paths, assignment and current time; refuses unsupported/mismatched/expired demo routes and ordinary routes on the reserved fleet/account.
+internal/edge/demo.go:Edge.filterDemoRoutes Reads the already-listed routes and constructed upstream map; prevents aliases, prefix overrides and unmarked socket-sharing routes from reaching demos.
+internal/edge/demo.go:Edge.lookupDemoAware Reads the current map and config; reserved names require an exact eligible route rather than a catch-all.
+internal/edge/edge.go:Edge.Reload Checks demo route eligibility and filters the final folded map using the existing registry listing; no new registry or store query.
+internal/edge/edge.go:RunWithActivatorReady Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.
+internal/edge/wildcard.go:newWildcardFromEnv Includes the configured demo domain in the existing wildcard manager's explicit parent input.
+internal/host/agent.go:runAgent Passes the existing registry, data store and hibernation prefix into the demo worker; no alternate data store.
+internal/host/bootstrap.go:bootstrapWith Uses demo settings from the existing host.env parser; refuses malformed demo config and installs the fixed template drop-ins.
+internal/host/claimstop_run.go:RunInstanceControl Wires demo registry views and existing root release/adoption guard into instance control.
+internal/host/claimstop_run.go:instanceDemoPurgeGuard Uses existing root release/census state and adopt-pass lock before root deletion.
+internal/host/claimunit.go:claimUnitContent Demo-only ReadWritePaths for instance data/runtime, staged files and root release lock; ordinary rendering unchanged.
+internal/host/claimunit.go:readClaimUnitSettings Reads worker/concurrency/toolchain settings from the existing host.env parser; requires box mode and refuses claims coexistence.
+internal/host/demo_cleanup.go:demoWorker.retireDemo Agent reads signed receipt, matching tombstone and registry binding; holds route, invokes root, acknowledges and removes only its remote initialization marker.
+internal/host/demo_jobs.go:demoWorker.pickupHTTP Reads a bounded console pickup response; no bucket write or caller-selected execution input.
+internal/host/demo_policy.go:demoDisabledFor Reads startup box configuration and the activator-held Route.IsDemo marker in memory, then the existing disabled-route predicate. Refuses a marked ordinary-box route without querying the registry.
+internal/host/demo_policy.go:demoPolicyHook Returns the original hook unchanged outside explicit demo mode, including nil: no registry read or new spawn refusal. In demo mode reads the route by host and the existing verified policy cache before the original hook.
+internal/host/demo_policy.go:demoRouteGate Reads startup box/claims configuration and the caller-held route plus existing verified policy cache. Covers backend acquisition/probe preparation through ConfigGate without a new registry or bucket read.
+internal/host/demo_policy.go:installDemoUnitsIn Reads the same fixed drop-in files in demo mode. Outside demo mode removes the same two fixed managed filenames; ENOENT is silent, other removal errors are logged and retried next pass without aborting ordinary installation or skipping the second file. Successful removal still signals daemon-reload. Enabled-demo read/write failures still refuse.
+internal/host/demo_units/demo.conf:external Retains read-only /run and /var tmpfs overlays and all network/size restrictions. Resets InaccessiblePaths and restates /etc/carlos -/run/carlos-control so the hidden control directory need not exist during namespace setup; /etc/carlos remains required. No new source or bind.
+internal/host/systemapply.go:systemApplier.installUnits Renders the staged build slice against live root host configuration; preserves it when settings cannot be parsed.
+internal/host/systemunits.go:ensureSystemUnits Body unchanged; consumes the enlarged embedded file list through the existing root installer.
+internal/host/units/carlos-demo-build@.service:external New dynamic-UID compiler execution path with fixed argv, root-derived mounts, no network and bounded resources/termination.
+internal/host/units/carlos-demo-builds.slice:external New aggregate compiler budget; inert until a build service uses it.
+internal/instancectl/demo_build.go:Client.DemoBuildReadiness Reads bounded root readiness and verifies capability, slots, digest and service build identity.
+internal/instancectl/demo_cleanup.go:Server.purgeDemoWithJobs Checks root config and current registry identity/hold; reads derived unit/cgroup/exe/drop-in state, stops and proves emptiness before no-follow removal. Fix round 1: passes the descriptor host to the root build-scratch cleaner; same registry, cgroup and derived path reads.
+internal/instancectl/demo_policy.go:Server.demoCgroup Reads memory.max, cpu.weight, cpu.max and io.weight beneath root cgroupfs using platform-generated slice/unit names; checks both slice and unit before reporting started.
+internal/instancectl/demo_policy.go:Server.demoHandler Serializes demo starts with purge and refuses missing/non-demo/held current routes.
+internal/instancectl/demo_versions.go:Server.purgeDemoVersions Derives account/app from root config and host; reads registry/live/generation pins and staged entries; deletes only unreferenced demo app files. Fix round 1: logs and skips ENOENT resolving another live link; other errors still refuse, same pin and symlink reads.
+internal/instancectl/gen.go:Server.handleParent Reads fixed DemoBox and clamps the existing parent memory writer to small.
+internal/instancectl/rootfs.go:Server.runRootfsProbe Reads DemoBox and refuses before preparing or launching a rootfs probe; ordinary probe behavior unchanged.
+internal/instancectl/server.go:runWithClaim Wires root-owned demo config and existing fixed paths into the service.
+internal/instancectl/server.go:type Server Adds fixed demo configuration, registry views, derived runtime root, synchronization and purge guard.
+internal/instancectl/size.go:Server.handleSize Reads fixed DemoBox and clamps the existing live CPU/IO writer to small.
+internal/provision/demo_policy.go:PolicyCache.AssertDemoRoute Reads route identity/runtime/placement, box configuration and verified cache entry under its mutex; refuses absent/expired/mismatched policy with no store request.
+internal/provision/demo_policy.go:stampDemoRoute Copies public descriptor fields from the already-read record into the route; no new external read.
+internal/provision/forward.go:forwardCurrent Reads the four demo route fields when deciding whether the forward row needs rewriting.
+internal/provision/forward.go:forwardRowFor Copies the public descriptor into a forward row; no new external read.
+internal/provision/reconcile.go:Reconcile Keeps local demo rows for signed cleanup instead of deleting the binding on record absence or trash; normal/hub paths unchanged.
+internal/provision/reconcile.go:RouteFor Reads the record descriptor, carries it onto the route, and gives demos nested paths; no new external read.
+internal/provision/reconcile.go:convergeOwned Compares existing route descriptor to record descriptor before any ordinary convergence; refuses identity loss or change.
+internal/provision/reconcile.go:shapeMismatch Compares all four demo identity fields before adoption, including partial or removed identity.
+internal/registry/demo.go:Route.IsDemo Reads all four public descriptor columns; a partial descriptor remains marked and cannot select ordinary activation.
+internal/registry/forward.go:Registry.PutForward Reads and carries the four demo fields in the existing forward INSERT; the guarded conflict SQL refuses downgrade or identity change.
+internal/registry/forward.go:var putForwardSQL Adds the same descriptor-preservation guard to the existing forward statement; no new SQL read source.
+internal/registry/registry.go:Registry.Fingerprint Existing SELECT reads four more demo columns; only a marked row adds them to the hash, so ordinary hashes remain unchanged.
+internal/registry/registry.go:Registry.SnapshotFingerprint Includes demo identity only when nonzero; preserves ordinary snapshot digests. Same registry query, no new OS read.
+internal/registry/registry.go:routeArgs Reads the four additive demo fields for the existing route INSERT binding.
+internal/registry/registry.go:scanRoute Reads the four additive demo columns in the existing row scan.
+internal/registry/registry.go:upsertRoute Existing SQL now compares all four demo columns plus account/app to refuse downgrade or identity change, including partial markers; no new query.
+# Delta copy pass, 2026-11-03: after removing approved-string draft markers,
+# make census-card reports only the internal/demobuild source envelope.
+# internal/demobuild/diagnostics.go changed its approval comment in 3247de43;
+# copy text and comments only, no new reads. No changed reader needs a new claim.
diff --git a/docs/superpowers/notes/copy-agent-start-demo-1.md b/docs/superpowers/notes/copy-agent-start-demo-1.md
index ee9590ea8..53f37dab3 100644
--- a/docs/superpowers/notes/copy-agent-start-demo-1.md
+++ b/docs/superpowers/notes/copy-agent-start-demo-1.md
@@ -141,14 +141,14 @@ Copy IDs added beyond the plan table: `DEMO-BUILD-FAILED`, `DEMO-BUILD-FINISHING
| 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)
+## Delta (approved by delegation)
-DRAFT. Task 8 added these surfaces after the delegated deck. The retirement audit reuses the approved `DEMO-EXPIRED` text above.
+Approved by the same delegation: Luna copy pass (gpt-5.6-luna), 2026-11-03, controller ruling R22. Result: `docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md`. 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-CLEANUP | operator log | 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 | 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 |
diff --git a/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md b/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md
new file mode 100644
index 000000000..3137843c5
--- /dev/null
+++ b/docs/superpowers/specs/LUNA-COPY-RESULT-AGENT-START-DEMO-1-DELTA.md
@@ -0,0 +1,14 @@
+| key | new | why |
+| --- | --- | --- |
+| DEMO-EXPIRED-CLEANUP | cleanup failed. its place stays reserved until cleanup succeeds | Operator log style: lower case and no final full stop. |
+| DEMO-EXPIRED-WAITING | cleanup is waiting for its box. if the box is offline, cleanup resumes when it reconnects. its place stays reserved | Operator log style: lower case and no final full stop. |
+| DEMO-EXPIRED-PURGED | The expired demo has been permanently removed. | unchanged |
+| DEMO-EXPIRED-AGENT | agent: DEMO-EXPIRED: cleanup failed demo=%s host=%s box=%s retry=%s: %v | unchanged |
+| DEMO-EXPIRED-DANGLING | instance-control: demo purge: skipping dangling live link %s | unchanged |
+| DEMO-EXPIRED-CLEANUP-LOG | console: DEMO-EXPIRED: %s demo=%s host=%s box=%s: %v | unchanged |
+| DEMO-EXPIRED-WAITING-LOG | console: DEMO-EXPIRED: %s demo=%s host=%s box=%s | unchanged |
+| DEMO-EXPIRED | This demo has expired and will be removed permanently. | unchanged. Reuses the approved retirement-audit text. |
+
+**Flags**
+
+- None.
diff --git a/internal/console/apidemo.go b/internal/console/apidemo.go
index 1a5c2bce9..510acbc11 100644
--- a/internal/console/apidemo.go
+++ b/internal/console/apidemo.go
@@ -28,11 +28,9 @@ import (
// 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-CLEANUP": "cleanup failed. its place stays reserved until cleanup succeeds",
+ "DEMO-EXPIRED-WAITING": "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.",
- // 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.",
diff --git a/internal/console/demo_expiry.go b/internal/console/demo_expiry.go
index cda46feb1..3b7ca31c3 100644
--- a/internal/console/demo_expiry.go
+++ b/internal/console/demo_expiry.go
@@ -64,7 +64,6 @@ 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)
}
@@ -135,7 +134,6 @@ 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
@@ -206,7 +204,6 @@ 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)
}
}
@@ -263,7 +260,6 @@ 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_retirement_http_test.go b/internal/console/demo_retirement_http_test.go
index 9f73471a4..a2ac62190 100644
--- a/internal/console/demo_retirement_http_test.go
+++ b/internal/console/demo_retirement_http_test.go
@@ -216,9 +216,14 @@ func TestDemoRetirementAuditAndWaiting(t *testing.T) {
if counts["demo-retire"] != 1 || counts["demo-purge"] != 1 {
t.Fatalf("audit=%+v", counts)
}
- for _, key := range []string{"DEMO-EXPIRED-CLEANUP", "DEMO-EXPIRED-WAITING", "DEMO-EXPIRED-PURGED"} {
- if demoCopy[key] == "" || strings.Contains(demoCopy[key], "—") {
- t.Fatalf("missing or invalid DRAFT copy %s", key)
+ for key, want := range map[string]string{
+ "DEMO-EXPIRED-CLEANUP": "cleanup failed. its place stays reserved until cleanup succeeds",
+ "DEMO-EXPIRED-WAITING": "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 will be removed permanently.",
+ } {
+ if got := demoCopy[key]; got != want {
+ t.Errorf("approved copy %s = %q, want %q", key, got, want)
}
}
}
diff --git a/internal/host/demo_cleanup.go b/internal/host/demo_cleanup.go
index 1a457f63f..c534d7c26 100644
--- a/internal/host/demo_cleanup.go
+++ b/internal/host/demo_cleanup.go
@@ -149,7 +149,6 @@ 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 8be18c708..e2f8b8faf 100644
--- a/internal/instancectl/demo_versions.go
+++ b/internal/instancectl/demo_versions.go
@@ -80,7 +80,6 @@ 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
}
diff --git a/internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv b/internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv
index de5015afa..48a0f8b91 100644
--- a/internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv
+++ b/internal/provision/testdata/plan14-root-reads-agent-start-demo-1.tsv
@@ -175,7 +175,7 @@ internal/provision/reconcile.go RouteFor authority C,E3 rev3=census-ruling-self-
@coverage internal/activator 5c6a320a7bb8ad115b89ae9cc02fa1f2534a9ca40dad70332391a4b03b5f01e1
@coverage internal/apppolicy 346a85b8560b45ecb097f51b5063a6b13c7f128d0edff2efa6e87575591f25da
@coverage internal/demo 73f30a1621933f590457990294d03ae45f1e9cbc1e1863d97ca96d03d886baf9
-@coverage internal/demobuild c6facca3f312ab2b10762e6c0f9f3ce75e3e2a6637f98e5f30e3c269303622ce
+@coverage internal/demobuild c01e441fb181ec2ed2671874d32d4db0291c5197d366c1744e9f7df02442fbb2
@coverage internal/domains 2e1fcc08678178e4b0fca9a1bf1b8e25cb7d17720f68f596e0af6b8e365fb3c0
@coverage internal/edge f43ea4eef8001f42945c1608d7e33e94fa0af57bae1a9810f99dd6ce7ab5df70
@coverage internal/host 2f22c79191301ea58f0b2ff96a7bce0f18ef6280ae158c66daeb3762e91add4c