Verify Cloudfield
FSecurityLaunch a private, throwaway Cloudfield instance from this checkout (server, `cloudfield gui` dashboard gateway, a signed-in test member and optionally a second one with their own gateway, a workspace and a scripted mock agent), drive the dashboard in dark-mode Chromium and the `cloudfield` CLI the way a person does, keep screenshots and transcripts as proof, and tear it all down. Use it to prove a dashboard, CLI or session change works in the real app, or to make the pictures for a pull reque...
- 15 stars
- 0 votes
- 0 copies
- 0 views
- Added December 4, 2026
Works with
Security analysis
2/100- Pipes output to a shell interpreter
- Uses curl or wget to download content
- Performs destructive filesystem operations
- Sends environment variables or credentials to an external URL
- Downloads and executes remote scripts — classic supply chain attack
Pro scans all 12 files and shows the line behind each finding
npx -y skills add 3xDevOps/cloudfield --skill verify-cloudfield --agent claude-codeAre you the author of Verify Cloudfield?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/3xdevops-verify-cloudfield)---
name: verify-cloudfield
description: Launch a private, throwaway Cloudfield instance from this checkout (server, `cloudfield gui` dashboard gateway, a signed-in test member and optionally a second one with their own gateway, a workspace and a scripted mock agent), drive the dashboard in dark-mode Chromium and the `cloudfield` CLI the way a person does, keep screenshots and transcripts as proof, and tear it all down. Use it to prove a dashboard, CLI or session change works in the real app, or to make the pictures for a pull request's "What it looks like".
---
# Verify Cloudfield
Cloudfield runs coding agents in sandboxes on a server. Terms used below:
- **server**: `cloudfield-server serve`, which owns the data directory and starts sandboxes in Docker.
- **gateway**: `cloudfield gui`, a loopback HTTP process on the person's machine that serves the dashboard and talks to the server over SSH. Its URL carries a bearer token.
- **member**: a person known to the server. The first one to link becomes `super_admin`.
- **workspace**: a git repository on the server that sessions branch from.
- **session**: one agent working on its own branch in its own sandbox. **Enhanced** mode shows the agent's conversation in the dashboard's Chat; **Standard** shows its terminal.
- **environment**: the member's own sandbox, whose saved image new sessions start from.
A dev build names the binaries `dist/aether` and `dist/aether-server`. An installed host links them as `cloudfield` and `cloudfield-server`, the names a person types. The helper puts `cloudfield` and `cloudfield-server` links to `dist/` in the run's own `bin/`, so every command in this skill uses the typed names. The CLI also makes those two links in `dist/` itself whenever it starts (`linkSecondName`, `cmd/aether/secondname.go`), so the first `dist/aether version` adds `dist/cloudfield` and `dist/cloudfield-server`; `dist/` is git-ignored.
## The hard rule: only drive an instance this skill started
Real people work on every other Cloudfield server, including the one your own session may be running on. Never drive, link to, restart or read the data of a server this skill did not launch. In the verification dashboard, never add or switch servers in its settings: the helper's link check is a snapshot, and a switch during a drive sends the next request to the other server. Do not run `cloudfield link`, `cloudfield-internal` or `aether-internal`, do not read `/run/aether`, `~/.config/aether` or `~/.config/cloudfield`, and do not open a dashboard URL you did not get from this helper.
The helper enforces this in code:
- Every subcommand except `launch` takes a run directory and refuses unless it matches `/tmp/cfv-XXXXXX`, is a mode-700 directory you own, and holds a `meta.json` you own that records your uid as the launcher, and (after startup) the `state.json` the stack wrote for you. A copied or another user's run is refused.
- `cleanup` refuses while a `launch` is still starting the run (the run's `launching` file names a process that still runs: its pid and its start time from `/proc/<pid>/stat`, so the path you call the helper by does not matter). Only that launch aborts it: send it `SIGINT` or `SIGTERM` and it cleans up after itself.
- `stack` runs only when `launch` starts it, once, on the run directory it just made: it needs the launch's one-time value in its environment and refuses when `state.json`, `supervisor.pid` or `data/` already exist.
- `drive` and `cli` first check, as `doctor` does, that the recorded supervisor, server and gateway pids (both gateways in a run with a second member) still run this run's command lines on loopback, then that each gateway's `link.status` names this run's server, and refuse otherwise. `doctor` stops before sending the gateway token once one of those process checks fails, and before any call that reaches the server once the link check fails; the stack's teardown skips asking a re-linked gateway what it owns.
- `cli` runs only the `cloudfield` commands the feature map uses: `status`, `sessions`, `session`, `message`, `interrupt`, `answer`, `close`, `pull`, `reopen`, `memory`, `terminal`, `env`, `wait`, `logs`, `export`, `import`, `home`, `grant`, `adopt`, and `agent login` and `agent logins`, with `HOME` and `AETHER_CONFIG_DIR` set to the run's test member. It refuses every other command (`link` and `gui` among them) and `message --attach`, which uploads a host file. `--as bob` runs it as the second member, with bob's `HOME`, `AETHER_CONFIG_DIR` and clone. To allow another command, check that it takes no host path or outside address, add it to `allowedCommands` in `cfv.ts` and to the feature file that drives it. A command that takes a host path gets its paths confined in code, as `export` and `import` do (see [Files](#files)).
- A drive's `local()` calls only the gateway verbs that read: `link.status`, `daemon.status`, `edge.status`, `forward.status`, `sync.status`, `update.status`, `git.identity`. The others (`link.apply`, `link.repo`, `link.switch`, `repo.push`, `forward.start`, ... in `internal/localgw/local.go`) re-link the gateway, push, forward or reach an outside service.
- The stack starts with `env -i`, so a Cloudfield session's `AETHER_*` variables never reach it.
**Never share a Docker daemon with another Cloudfield server.** Most of what a server does in Docker is keyed on its own store: run containers by run id, environment images `aether/member-<member-id>`, terminals and updaters by member id, dictation engines by data directory, and all ids are random. Two shared things remain:
- The image sweep, at startup and hourly, untags from Docker only default standard and browser image tags listed in the server's own `<data-dir>/scheduler/default-images` (`sweepUnusedImages`, `internal/scheduler/environment_save.go`). A server lists the standard tag only while it runs its build's default image, and a `ghcr.io/3xdevops/aether-browser` tag only after Docker created a browser companion from its build's default browser image; a build not made at a release tag uses `aether/browser:test` instead. So this skill's server, started with `--standard-image busybox:1.36` from such a build, lists and removes no tag of either repository. The list says what a server used, not that no other server uses it: when two servers on one daemon both used a tag, the first to stop using it untags it while the other may still need it.
- Every server's egress proxy listens on the gateway of the shared network `aether-egress`, port 3128 (`internal/egress/proxy.go`, `listen`), and the one holding it looks every session up in its own store; another server's sessions get `look up session ...` errors (`source`). A server binds it when it launches an egress-limited session, and at startup (`Resume`) only when a container on `aether-egress` is one of its own runs. This skill's `mock` sessions are not egress-limited, so its server does not bind; two servers that both have egress-limited sessions still cannot share a daemon.
So `launch` refuses, before it creates anything, when the daemon shows a container labelled `aether.managed=true` that mounts nothing under `/tmp/cfv-*` or the e2e harness's `$TMPDIR/aether-e2e-*`, any `ghcr.io/3xdevops/aether-standard` or `ghcr.io/3xdevops/aether-browser` image, or a listener on the `aether-egress` gateway's port 3128. It lists what it found. If a listed image is your own and unused, `docker rmi` it. A labelled container the daemon cannot inspect (`docker ps -a` shows it `Dead`; dockerd logged `RW layer for container ... not found` at startup) is refused too, and `docker rm -f` answers `No such container`: only stopping dockerd and moving `<DockerRootDir>/containers/<id>` aside removes it, so do that only on a daemon you started and know.
The check sees only those signs, so passing it does not prove the daemon is yours: an idle server on a custom standard image with no containers yet and no egress network passes. Use a machine or session sandbox whose Docker daemon you know holds nothing else. The listener check cannot tell whose proxy listens. Network `aether-egress` appears only when some server starts an egress-limited session (`ensureNetwork`, `internal/runtime/docker.go`), and from then on a listener on port 3128 is there whenever a server with egress-limited sessions runs. So another verification run or `make test-e2e` on the same daemon passes the check until one of them starts an egress-limited session; after that the next launch is refused. Two launches side by side were tried: both passed the check and `doctor`.
`launch` and `cleanup` also refuse when `DOCKER_HOST` or `DOCKER_CONTEXT` is set to anything else, or the current `docker context` is not `default`: the server, started with `env -i`, always uses `unix:///var/run/docker.sock`, and every `docker` call of the helper names that socket too, so the checks, the server and `cleanup` see one daemon.
`cleanup` removes, after the run's containers and images, only the Docker volumes labelled `aether.managed=true` whose `device` option (the bind path) lies under the run directory; an added login's sign-in leaves one per base directory. It never prunes volumes globally, and a run it keeps because something could not be removed keeps its volumes too, and a failed removal can leave some already gone, so cleanup removes what it can and a rerun removes the rest.
## Surfaces
- **Dashboard** (primary): the web UI served by `cloudfield gui`. Most features are visible only here.
- **`cloudfield` CLI**: the same server methods from a terminal. Use it as a second view of what the dashboard did.
- **`cloudfield-server`**: admin commands on the server host. Commands that read an options file (`status`, `config`) default to `/var/lib/aether`, the real server's data. The helper does not run them.
- **Inside a session**: what the agent sees (`/workspace`, `cloudfield-internal`). The mock agent replaces a real one, so prove agent-side behavior with prompts from [the mock agent](features/README.md#the-mock-agent), not by calling the session helper yourself.
## Prerequisites (once per checkout)
| Need | Command or check |
| --- | --- |
| Go (for `make build` and the mock agent) | `go version` |
| Bun, the version in `web/.bun-version` | `curl -fsSL https://bun.sh/install \| bash -s bun-v$(cat web/.bun-version)`, then `export PATH=$HOME/.bun/bin:$PATH` |
| Node.js 22 or later (`make dashboard` refuses without it, Makefile:494-496) | `node --version` prints `v22` or higher |
| Dashboard dependencies | `cd web && bun install --frozen-lockfile` |
| Chromium for Playwright | `cd web && bunx playwright install chromium`; in a container also `sudo env "PATH=$PATH" "HOME=$HOME" bunx playwright install-deps chromium` |
| Docker daemon your user can reach on `/var/run/docker.sock` | `docker info --format '{{.ServerVersion}}'` prints a version, with `DOCKER_HOST` and `DOCKER_CONTEXT` unset |
| `busybox:1.36` | pulled by the first session if missing; `cleanup` leaves it |
| Build from this checkout | `make build` (writes `dist/aether`, `dist/aether-server`, `dist/aether-edge` with the dashboard embedded) |
| Root | `sudo -n true` succeeds, or you are root. Why: see Launch |
Inside a Cloudfield session, build with the session's variables removed: `env $(env | grep -oE '^(AETHER|CLOUDFIELD)_[A-Z_]*' | sed 's/^/-u /') make build` (docs/testing.md, "Running the Docker suites inside a session"). The proof runs built with `GOTOOLCHAIN=go1.26.11`, the `toolchain` line of `go.mod`; the mock agent built fine with the sandbox's Go 1.27.0. If `docker info` fails there, the session has no daemon yet: start `sudo dockerd` in a separate long-lived terminal. Your user then needs access to the socket: membership of its group (`sudo usermod -aG docker "$USER"`, then a new login). The proof ran in a throwaway single-user sandbox and took a shortcut, `sudo chmod 666 /var/run/docker.sock`, which gives every local user control of the daemon until it restarts; never do that on a shared machine.
Rebuild with `make build` after every change to `cmd/`, `internal/` or `web/src`: the CLI serves the dashboard embedded at build time, so a stale `dist/` proves the old code. `launch` refuses a `dist/` built from another commit; it cannot see uncommitted edits, and `doctor` prints a note when there are some. A rebuild does not reach a running instance: run `cleanup`, then `launch` again.
## Launch
Run as your own user (not under `sudo`), from anywhere:
```sh
H=<checkout>/.agents/skills/verify-cloudfield/control-cloudfield
$H launch # alice only
$H launch --second-member # alice and bob
```
In this order, it:
1. Checks that `dist/aether` and `dist/aether-server` report an abbreviation of the checkout's `HEAD` commit (`dist/aether version` prints `cloudfield <version> (<commit>)`; its length follows `git rev-parse --short`), that `docker` resolves to the default socket and answers, and that the daemon shows no other Cloudfield server (see the hard rule).
2. Checks that the evidence root is yours, creates the run directory `/tmp/cfv-XXXXXX`, writes `launching` (its own pid and start time) and `meta.json` (mode 600: your uid, the full commit, whether root steps use sudo, a one-time value that lets only this launch start the stack), then prints the run and evidence directories.
3. Links `bin/cloudfield` and `bin/cloudfield-server` to `dist/`, and builds the mock agent in its own process group, with `GOTMPDIR=<run>/go-tmp`, recording its pid and start time in `<run>/build.pid`: `CGO_ENABLED=0 go build -o <run>/bin/acp-mock ./internal/acphost/acpmock/agent`.
4. Starts `cfv.ts stack` in the background, as root through `sudo -n` when needed. It reuses the e2e harness in `web/e2e/harness/`: `startServer` runs `aether-server serve --data-dir <run>/data --addr 127.0.0.1:<port> --config <run>/server-options --standard-image busybox:1.36` with `AETHER_FAKE_AGENT` and `AETHER_NO_UPDATE_CHECK=1`. `startGateway` runs `aether gui --json --port <port>` with its own `HOME` and `AETHER_CONFIG_DIR` under `<run>/alice/`. `seedRepo` and `seedWorkspace` create `<run>/repos/project`, link member `alice` (the first member, so `super_admin`), create workspace `project` and push `main`. The stack then copies the mock agent into the member's home on the server and registers it as agent `mock` (`agent.register`). With `--second-member` it then adds `bob` the way a teammate joins by invite code (docs/teams.md, "By invite code"), as the e2e specs do: alice mints a code for every workspace she reaches (`invite`, `web/e2e/harness/setup.ts`, which calls `member.invite`), a second `startGateway` under `<run>/bob/` links with it (`link.apply` with `invite` and name `bob`), so bob is a `collaborator` of `project`; his own clone `<run>/repos/project-bob` (`cloneRepo`) is linked to the workspace with `link.repo`, the call of the onboarding Repository step's `Add remote`, and `mock` is registered for him too.
5. Waits up to 180 s for `<run>/state.json`, then prints the server and gateway addresses and pids, the member id, the workspace id and the clone path, and the same for bob. The gateways' tokened URLs stay in `state.json` (mode 600) and are never printed. If the stack exits or the wait runs out, launch says which (the exit code or signal, or the 180 s limit), prints the last 30 lines of `<run>/stack.log` and runs `cleanup` itself. On success it removes `launching` just before it prints those lines.
Until it prints the `server` line, launch owns the run. `cleanup` refuses with `launch <pid> is still starting <run>` and exits 1. To abort a launch, press Ctrl-C or send its pid `SIGINT` or `SIGTERM`: it stops the build's process group (`go` and its compile and link children), stops the stack if it has started (the stack handles `SIGTERM` from its first line), removes the run and exits 1. If launch itself was killed (`SIGKILL`), its `launching` file names a process that no longer runs (gone, or left as a zombie by a parent that does not reap it) and `cleanup` proceeds: it stops the build recorded in `build.pid` if that process still runs, then the stack.
Ports come from a random block between 10000 and 24999 with the harness's claim files in `/tmp/aether-e2e-ports`, so two runs, or a run beside `make test-e2e`, do not collide. Launch took 10 to 30 s in the proof sandbox and for a reviewer; each drive of `drives/launch-session.ts` about 25 s on a warm daemon. A loaded machine stretches every step: a cold reader at load average 15-20 saw pages hold `Not connected` or `Loading session details…` for over a minute and drives take 100 s or more. Check `uptime` before driving (see Doctor).
**Why root.** Before it admits a launch, the server checks Docker's disk use and `lstat`s `<DockerRootDir>/engine-id` (`verifyLocalDocker`, `internal/runtime/docker_disk.go`). On a stock Docker that file is `-rw------- root` under `drwx--x--- /var/lib/docker`, so a server run as your user refuses every session with:
```
scheduler: host capacity unavailable: runtime filesystems and host memory: Docker capacity filesystem discovery unavailable: local daemon identity could not be verified: lstat [redacted]: permission denied.
the server's operator can check Docker with: sudo systemctl status docker
```
`launch` checks whether your user can read that file. If it cannot, the stack, `cli` and `cleanup` run their root steps with `sudo -n`. The browser and the evidence stay with your user.
A refused check (the build's commit, the Docker selection, `docker info`, another server, `sudo -n`, an evidence root that is not yours) stops launch before it creates anything: there is nothing to clean up. Any failure after the run exists (a failed build, a stack that does not become ready) ends in launch's own cleanup; if that cleanup cannot finish, it keeps the run and prints the exact `cleanup` command to run again.
## Doctor
Read-only. Run it before the first drive, and again after anything surprising:
```sh
$H doctor /tmp/cfv-XXXXXX
```
Each line is `ok` or `FAIL`. It checks that the supervisor, server and gateway pids run this run's command lines on loopback, that `dist/aether` reports an abbreviation of both `HEAD` and the launch commit, and only then, stopping at the first FAIL, for each gateway in turn, that `link.status` points at this run's server, that the gateway answers its token (`GET /api/v1/capabilities`, version and commit), that `server.info` signs in as its member, that the member reaches workspace `project` and that agent `mock` is installed for them; then that `docker info` answers. It ends with `worth driving` (exit 0) or `not worth driving` (exit 1). On a FAIL, clean up and launch again rather than repairing by hand.
Doctor cannot see a browser. The sidebar's `Not connected` (the dashboard has no `server.info` answer yet) and `Loading session details…` are the page waiting on the same gateway calls doctor makes, so doctor times its `server.info` call and reads the load average. When the load average is above the CPU count or the call took over 2 s, it prints a `note` line (not a FAIL): wait until `uptime` drops, run doctor again, and expect such pages until then. A drive does not wait for the dashboard to connect; its `expect` calls wait up to 30 s each.
## Drive
### Browser
```sh
$H drive /tmp/cfv-XXXXXX <script.ts> [--viewport desktop|phone] [--label name]
```
`drive` runs as your user. It loads `@playwright/test` from `web/node_modules`, opens headless Chromium with `colorScheme: 'dark'`, as Playwright's `Desktop Chrome` (1280x720) or `Pixel 7` (412x839, touch), with the timeouts of `web/playwright.config.ts` (30 s per action and per `expect`). It refuses to start when `DEBUG` turns on Playwright's log (a pattern starting `pw` or holding `*`) or `PWDEBUG` is set: Playwright then prints each navigation's tokened URL where no redaction sees it. It records a video and calls the script's default export with:
| Name | What it is |
| --- | --- |
| `page`, `expect` | Playwright's page and `expect` |
| `open(query?)` | opens the tokened dashboard URL, adding `&<query>`, for example `open('run=' + id)` or `open('page=needs-you')` |
| `step(title, fn)` | awaits `fn`, logs `ok` with its time or `FAIL` with the error, and rethrows, so the first failing step ends the drive (`failure.png`, exit 1) |
| `shot(name)` | saves `NN-name.png` and the page's ARIA snapshot `NN-name.aria.txt` |
| `rpc(method, params)`, `local(verb, params)` | a second view through the same gateway: `POST /api/v1/<method>` and `/local/v1/<verb>`; `rpc` throws for anything but one protocol method name (`run.get`), since the method becomes the URL path; `local` throws for a verb that is not read-only (see the hard rule) |
| `file(name)` | the path of `name` in the run's `files/`, refused outside it (see [Files](#files)) |
| `cli(...args)` | runs `cloudfield <args>` through `$H cli` synchronously (no `await`), returns `{ code, stdout, stderr }`; it does not throw on a non-zero `code` |
| `note(key, value)` | writes `values.json`, token redacted |
| `unreached(entry, reason)` | records an entry point this viewport cannot reach: logs `unreached: <entry>: <reason>`, adds it to `values.json` under `unreached`, and the drive's last line then reads `partial (N entry points unreached ...)` instead of `passed` (exit 0) |
| `viewport`, `state` | `desktop` or `phone`; `{ member_id, workspace_id, server_addr, repo }` |
| `bob` | in a run launched with `--second-member`, the second member: `{ page, open, rpc, local, cli, shot, member_id, repo }`, the same calls as alice's on bob's own gateway, page and clone. `page` is in its own browser context, so it shares no storage with alice's; `shot` saves `NN-bob-name`. `undefined` otherwise |
`rpc` answers are the protocol's JSON (`internal/protocol/wire.go`); for example `run.launch` answers `{ run: { id, ... } }`. `rpc` reaches every method the gateway proxies, `run.handoff` among them: `rpc('run.handoff', { run_id, to_member_id: bob.member_id })` gives alice's session to bob.
Write your scripts outside the checkout (for example in `/tmp`). [`drives/launch-session.ts`](drives/launch-session.ts) is a complete example for feature 1, and [`drives/message-permission.ts`](drives/message-permission.ts) drives every entry point of [message-and-permission](features/message-and-permission.md). Copy their shape:
```sh
$H drive /tmp/cfv-XXXXXX $(dirname $H)/drives/launch-session.ts
$H drive /tmp/cfv-XXXXXX $(dirname $H)/drives/launch-session.ts --viewport phone
```
[`drives/two-members.ts`](drives/two-members.ts) drives both members: alice launches a session and saves a private preference, bob sees the session but not the preference, and alice hands the session to bob from More → Hand off….
Prefer ARIA roles and names, route parameters and the mock agent's prompt strings, as the feature files list them. On a phone (`Pixel 7` has a coarse pointer) use `tap()`, and send from the composer with the `Send` button, because Enter adds a new line.
### Terminal
```sh
$H cli /tmp/cfv-XXXXXX [--as bob] -- cloudfield <command> [args]
```
It runs `<run>/bin/cloudfield` as the test member, with the clone `<run>/repos/project` as the working directory, so commands that need a workspace find `project`; `--as bob` runs it as bob, in `<run>/repos/project-bob`. It prints the output and appends `$ cloudfield ...` (`bob$ cloudfield ...` for bob), the output and `[exit N]` to `cli-transcript.txt` in the evidence directory. `terminal` without `exec` is interactive and has no terminal here; use `terminal exec`. Commands outside the allowed list (see the hard rule) are refused. Examples that ran in the proof:
```sh
$H cli /tmp/cfv-XXXXXX -- cloudfield status
$H cli /tmp/cfv-XXXXXX -- cloudfield sessions
$H cli /tmp/cfv-XXXXXX -- cloudfield memory add --kind convention "Use bun in web/; never npm."
```
### Files
`export` and `import` read and write host files, so every file they touch lives directly in the run's own `<run>/files/` (mode 700, made on first use). `cfv.ts` parses their arguments itself (`cliargs.ts`) and passes the CLI a rebuilt argument list, so what it checked is what runs:
- A path is a bare file name (`--out notes.json` means `<run>/files/notes.json`) or an absolute path whose parent, after symlinks, is `<run>/files`. Names are letters, digits, `.`, `_` and `-`, not starting with `.` or `-`.
- Refused: a path outside, a relative path with a `/`, `..` or `-` as the file name, an absolute path whose directory does not resolve to `files/` (one through `..` that does resolve there passes), `/dev/stdin`, a symlink or directory in `files/`, a missing import file, a flag either command does not have (`--help` and `--` included), a flag given twice, and `export` without `--out` unless `--dry-run` (the CLI's default writes into the test clone). An existing regular file passes `--out`, so the CLI's own refusal to replace it shows.
- When the CLI ran as root, `cli` hands the exported file back to you (`chown -h`).
- A drive gets `file(name)`, the same check, for `download.saveAs(file(...))` and `chooser.setFiles(file(...))`; Chromium's downloads land in `<run>/downloads/`. The drive script is your own code, so this holds only while the script uses `file()`.
To import in run B a file exported in run A, copy it while both runs exist:
```sh
$H copy-file /tmp/cfv-AAAAAA <file-name> /tmp/cfv-BBBBBB
```
It checks both runs as every subcommand does (yours, launched by you), reads only a regular file in A's `files/` and never replaces one in B's. `cleanup` copies `files/` into the evidence directory (`files/`) before it removes the run; a run's `cli` never reads another run's directory or the evidence.
The argument checks have a test: `bun test ./.agents/skills/verify-cloudfield/` from the checkout. No CI job runs it.
## Evidence
Everything lands in `/tmp/cloudfield-verify-evidence-<uid>/<cfv-XXXXXX>/`, one root per user (`<uid>` is `id -u`), mode 700, which `cleanup` never removes. `launch` refuses when that root exists and is not yours.
- `<label>-<viewport>/` (mode 700): `steps.log` (each step, its time and result), `NN-name.png`, `NN-name.aria.txt`, `video.webm`, `values.json`, and `failure.png` when a drive failed; with a second member also `NN-bob-name.*`, `video-bob.webm` and `failure-bob.png`. A drive never reuses a directory: a second drive with the same label and viewport writes `<label>-<viewport>-2/`, then `-3/`, and prints the directory first. The label defaults to the script's file name; `--label` takes one name of letters, digits, `.`, `_` and `-`.
- The drive's own output is `steps.log`. For a transcript of every command you ran, pipe each through `2>&1 | tee -a <file>`; the token never reaches the terminal, so the file holds none.
- `cli-transcript.txt`: every `cli` call, its output and exit code. For `export` and `import` it shows the rebuilt arguments, absolute paths included.
- `files/`: the run's `files/`, copied by `cleanup`.
- `server.log` and `stack.log`: copied by `cleanup` from the run directory.
A proof meets these standards:
- It goes the way a person goes: dashboard controls and `cloudfield` commands. `rpc` is for setup a journey is not about and for second views, never in place of the step being proven.
- It shows the action and the state after it: a shot before and after, not only the final screen.
- It checks the side effect from a second view: `run.get`, `cloudfield sessions <id>`, `memory.brief`, `docker images`.
- It names the feature id and the entry point used, and calls an unreached entry point a failure with the missing precondition, never "verified" through another path.
- It holds test data only and never a gateway token. Page screenshots do not include an address bar. `drive`, `note` and `cli` replace each gateway's token, and any `token=<value>`, with `[token]` before they write, and when a drive ends, even when closing the browser failed, it reads every file in its evidence directory, deletes each that holds either token, and fails. Check before sharing: `grep -rl 'token=' /tmp/cloudfield-verify-evidence-$(id -u)/<cfv-XXXXXX>` prints nothing. `state.json` holds the tokens and is scratch, removed by cleanup.
For a pull request's "What it looks like" (docs/testing.md, "Pictures for a pull request"), the shots are already dark mode at desktop and phone width. Turn `video.webm` into a GIF with the commands there.
## Cleanup
```sh
$H cleanup /tmp/cfv-XXXXXX
```
Run it after every run, failed ones included. It acts only on what this run recorded or owns, never on a process name:
0. Refuses and exits 1 while a `launch` is still starting the run (see Launch). When the launch that made the run died, it first stops that launch's mock-agent build: the process group of the pid in `build.pid`, if that pid still has the recorded start time.
1. Sends `SIGTERM` to the recorded supervisor pid, after noting its child processes. The supervisor checks that the gateway is still linked to this run's server, then asks the server for its members and runs (`member.list`, `run.list`), stops the gateways, then the server (`SIGTERM`, `SIGKILL` after 10 s), then any child it started that had no handle yet (a launch aborted during startup), removes the containers `cloudfield-run-<run-id>` and `cloudfield-run-terminal-<member-id>` (and the `aether-run-` names an older server used), the agent updater containers and the saved environment images `aether/member-<member-id>:<tag>` of every member by tag, and deletes its own port claims in `/tmp/aether-e2e-ports`: the files named for the 500 ports of its block that are regular files holding its pid, including ports it claimed but found taken and a claim an aborted startup left. After 120 s without exit, the supervisor is killed, and so are the children it had and the recorded server and gateway pids if they still run the same command lines.
2. Removes any container labelled `aether.managed=true` that mounts a path under the run directory, and each member's `aether/member-<member-id>` tags (`docker rmi <tag>`, never by image id).
3. Leaves `busybox:1.36` and the networks `aether-agents` and `aether-egress` alone: other runs on the daemon share them, they are cheap, and the next run reuses them.
4. Copies `server.log`, `stack.log` and the regular files in `files/` into the evidence directory; a log copy that fails is reported and cleanup goes on.
5. When a process of this run still runs, Docker cannot be asked, or a removal fails, it prints what is left, keeps the run directory (so the same command can run again) and exits 1. Otherwise it removes the run directory with `rm -rf --one-file-system` (as root when the run used root), `meta.json` last. Without root, when a session left root-owned files, it first hands the directory back to you with the harness's `reclaimOwnership` (a `busybox:1.36` container running `chown -R`). If something still cannot be removed, it keeps the directory and `meta.json`, prints the error and exits 1, and the same cleanup can run again.
6. Prints whether any root-owned file is left in the checkout, and lists the evidence directory.
Check afterwards: `docker ps -a` shows no `cloudfield-run-` or `aether-run-` container of this run, `ls /tmp/cfv-XXXXXX` fails, and `git status --short` in the checkout is as before. The helper writes nothing tracked in the checkout: state lives in the run directory and evidence outside it, and the only files it causes in the checkout are the CLI's own `dist/cloudfield` and `dist/cloudfield-server` links (git-ignored).
## What a session sandbox can run, and what the proof did not do
A Cloudfield session with Docker (Sysbox, or a daemon you started) runs all of this. It has no `/dev/kvm`, so VM sessions (`--session-runtime vm`, `make test-kvm`) cannot run there. Container sessions stand in for them.
Every step below differs from a real installation. A behavior that depends on one is unverified until a run on a real host covers it:
- A stand-in `claude` (`stand-ins/claude`, a POSIX `sh` script installed into the member's `~/.local/bin` by `$H stand-in <run> claude`, which only the sign-in recipe runs) answers `claude auth login`, `claude auth login --console` and `--version` only; see [agent-sign-in.md](features/agent-sign-in.md).
- The mock agent (`acpmock`, scripted replies) stands in for Claude Code, Codex and the rest. No agent login, model call, agent install (`agent.install`) or harness update is exercised. It is registered with `agent.register`, not installed.
- `busybox:1.36` stands in for the published standard image: no `apt-get`, `git` or language tools in sessions or the environment.
- Container sessions stand in for VM sessions, and the sandbox's daemon runs `runc`, not `sysbox-runc`.
- A dev build from `dist/`, linked as `cloudfield` in a private `bin/`, stands in for an installed release: no `install.sh`, no systemd unit, no self-update, no `/etc/aether/server.conf` (the options file is empty), and `AETHER_NO_UPDATE_CHECK=1` turns off release checks.
- The server is a child process under `sudo`, not the systemd service, on a loopback port instead of `:2222`.
- A loopback gateway in headless Chromium stands in for the desktop app, the Android shell, the edge and the tailnet dashboard. No edge sign-in, invite through the edge or device approval is exercised.
- The members are linked through the gateway's `link.apply` (the call the onboarding wizard's Connect step makes), bob with an invite code alice minted through `member.invite`, not by clicking through the wizard, and the workspace comes from a local repository pushed with `repo.push`, not from GitHub. Publishing a pull request needs GitHub and is not reachable.
- At most two members, `alice` (`super_admin`) and, with `--second-member`, `bob` (`collaborator`); no `admin` or `viewer`, and no join by GitHub login or edge invitation.
- The Docker daemon is the sandbox's own and holds no other Cloudfield server; `launch` refuses the signs it can see of one (see the hard rule). Two verification runs, or a run beside `make test-e2e`, share the networks `aether-agents` and `aether-egress`, the egress proxy port and the host's memory and disk; only the first server to bind port 3128 serves egress-limited sessions, so test those with one run on the daemon.
## Helpers
| File | Invocation |
| --- | --- |
| `control-cloudfield` | `$H launch [--second-member]`, `$H doctor <run>`, `$H drive <run> <script> [--viewport desktop\|phone] [--label name]`, `$H cli <run> [--as bob] [--pty\|--send <text>] -- cloudfield <args>`, `$H copy-file <from-run> <file-name> <to-run>`, `$H stand-in <run> claude`, `$H cleanup <run>`. It finds `bun` on `PATH` or in `~/.bun/bin` and runs `cfv.ts`. |
| `cfv.ts` | The subcommands above, plus `stack`, which only `launch` starts. |
| `cliargs.ts`, `cliargs.test.ts` | The argument checks of `export` and `import` (see [Files](#files)) and of `cli`'s own flags, and their test. |
| `stand-ins/claude` | Copied by `$H stand-in <run> claude` to alice's `~/.local/bin/claude`; `launch` does not install it, because an installed `claude` joins the launch dialog's agent list. |
| `drives/launch-session.ts` | A drive script: `$H drive <run> $(dirname $H)/drives/launch-session.ts [--viewport phone]`. |
| `drives/message-permission.ts` | A drive script: `$H drive <run> $(dirname $H)/drives/message-permission.ts [--viewport phone]`. |
| `drives/export-import.ts` | A drive script: `$H drive <run> $(dirname $H)/drives/export-import.ts [--viewport phone]`. |
| `drives/two-members.ts` | A drive script for a run launched with `--second-member`: `$H drive <run> $(dirname $H)/drives/two-members.ts [--viewport phone]`. |
| `drives/readme-demo.ts` | A drive script that records the README demo video: `$H drive <run> $(dirname $H)/drives/readme-demo.ts`. Desktop only; see [docs/media/README.md](../../../docs/media/README.md). |
## Feature map
[features/README.md](features/README.md) lists the features, the baseline every recipe starts from, and the mock agent's prompts. A proof covers every entry point the feature file lists.
To keep the map honest as the app changes, use the `maintain-verification-skill` skill (`.agents/skills/maintain-verification-skill/SKILL.md`).
Files in this skill
- SKILL.md
- cfv.ts
- control-cloudfield
- drives/launch-session.ts
- drives/message-permission.ts
- drives/readme-demo.ts
- features/README.md
- features/environment.md
- features/launch-session.md
- features/memory.md
- features/message-and-permission.md
- features/review-and-close.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.