| 1 | # Hosted runners on AWS Lambda MicroVMs |
| 2 | |
| 3 | **Date:** 2026-11-18; security revision 2026-11-19. **Status:** approved by Paul |
| 4 | 2026-11-19 with the §16 rulings; slice 1 plan next. **Decision:** discussion 22 (Lambda MicroVMs, not reopened). |
| 5 | **Evidence:** a throwaway spike in the dev AWS account, torn down (§15). |
| 6 | |
| 7 | ## 1. What this adds |
| 8 | |
| 9 | A person can run Equipo work without keeping a machine online. Each hosted job |
| 10 | gets one Firecracker VM in Ireland running the existing outbound-only |
| 11 | `equipo-runner`. Personal runners keep working as they do today. |
| 12 | |
| 13 | Three spike results changed the design from discussion 22: |
| 14 | |
| 15 | - **Managed DNS bypasses an egress allowlist** unless VPC DNS is off (§6). |
| 16 | - **An execution role exposes live AWS credentials inside the VM**, so hosted VMs |
| 17 | have no role (§5). |
| 18 | - **Bubblewrap works in the VM** with a specific image profile, so the agent stays |
| 19 | sandboxed from the runner's secrets (§7). |
| 20 | |
| 21 | ## 2. The isolated job runner adapter |
| 22 | |
| 23 | The scheduler uses this interface and never sees AWS types. It lives in |
| 24 | `internal/isolatedjob`, with an AWS implementation and an in-memory fake. |
| 25 | |
| 26 | ```go |
| 27 | type Runner interface { |
| 28 | Launch(ctx context.Context, s LaunchSpec) (Ref, error) // idempotent on AttemptID |
| 29 | Get(ctx context.Context, ref Ref) (Job, error) |
| 30 | Suspend(ctx context.Context, ref Ref) error |
| 31 | Resume(ctx context.Context, ref Ref) error |
| 32 | Stop(ctx context.Context, ref Ref, reason string) error // succeeds if already gone |
| 33 | List(ctx context.Context) ([]Job, error) // all VMs the provider holds |
| 34 | Limits() Limits |
| 35 | } |
| 36 | |
| 37 | type LaunchSpec struct { |
| 38 | AttemptID string |
| 39 | Image ImageDigest // must be certified (§7) |
| 40 | Size Size // Small (2 GB) or Large (4 GB) |
| 41 | MaxLifetime time.Duration // includes suspended time |
| 42 | Bootstrap []byte // one-time code only (§5) |
| 43 | } |
| 44 | |
| 45 | type Job struct { |
| 46 | Ref Ref |
| 47 | State State // Starting, Running, Suspending, Suspended, Stopping, Stopped, Failed |
| 48 | StartedAt time.Time |
| 49 | Reason string |
| 50 | } |
| 51 | |
| 52 | type Limits struct { |
| 53 | MaxLifetime time.Duration |
| 54 | MaxBootstrapBytes int |
| 55 | SuspendUsesLifetime bool |
| 56 | ConnectionsSurvive bool |
| 57 | } |
| 58 | ``` |
| 59 | |
| 60 | **Controller.** `equipo-hosted-controller` runs in the hosted AWS account and |
| 61 | holds the only IAM role that can call the MicroVM APIs. The Equipo instance calls |
| 62 | it over signed HTTPS and holds no AWS credentials. `run-microvm` accepts no tags |
| 63 | and `List` returns no attempt ID, so the controller's job table is the only link |
| 64 | between a VM and its job. |
| 65 | |
| 66 | ## 3. VM lifecycle |
| 67 | |
| 68 | Every launch uses `NO_INGRESS`, the VPC connector as its only egress, no execution |
| 69 | role, no idle policy (outbound traffic does not count as activity, §15), a maximum |
| 70 | duration of 28,800 s, and x86_64, the runner's only release target. |
| 71 | |
| 72 | | Stage | What happens | |
| 73 | | --- | --- | |
| 74 | | **Launch** | The controller saves a launch intent with the exact request, then calls AWS with the attempt ID as client token. After a crash it replays the same request. | |
| 75 | | **Enrol** | The `/run` hook gives the runner the bootstrap code. The runner generates its machine key and enrols (§5). | |
| 76 | | **Run** | The instance dispatches the step over the normal runner stream. | |
| 77 | | **Pause** | See the barrier below. | |
| 78 | | **Resume** | See the barrier below. | |
| 79 | | **Stop** | Close admission, fence publication, then obtain proof of the end: the runner's termination report or a terminal VM state. Then revoke tokens. The revoked runner row stays until its attempts, transfers and publications settle. | |
| 80 | |
| 81 | **The pause barrier.** Checking that nothing is running is not enough, because a |
| 82 | dispatch could arrive straight afterwards. |
| 83 | |
| 84 | 1. The instance marks the job `draining`, with a new pause generation, in the same |
| 85 | transaction that authorises step starts. Nothing new can start once it commits. |
| 86 | 2. The runner stops taking work, flushes reports and transfers, acknowledges |
| 87 | `quiescent` for that generation, and only then closes its stream. |
| 88 | 3. The controller suspends only on an acknowledgement for the current generation. |
| 89 | Without one within 2 minutes it cancels that generation and ignores any late |
| 90 | acknowledgement. Admission reopens only when the runner confirms it is taking work |
| 91 | again. If it cannot confirm, the VM is stopped and the attempt recovered. |
| 92 | 4. Resume carries an operation ID, so a retried call raises the epoch once. |
| 93 | Admission stays closed until the runner has replaced its tokens and resynced. |
| 94 | |
| 95 | **The 8-hour limit.** The deadline is launch time plus 8 hours and never moves. |
| 96 | Suspended time counts. |
| 97 | |
| 98 | 1. At 7 h 15 min the job enters `draining`. |
| 99 | 2. The runner sends a checkpoint: a pack of work in progress, acknowledged durably |
| 100 | by the primary, plus a notebook summary. Today's provider failover discards a |
| 101 | refused attempt's work, so checkpointing is new work in slice 4. |
| 102 | 3. A replacement starts only after the old VM is proven stopped. Publication is |
| 103 | fenced by attempt number, so a late push from the old attempt is refused. |
| 104 | 4. With no acknowledged checkpoint by 7 h 50 min, the VM is stopped and the step |
| 105 | retries from the last acknowledged state. |
| 106 | |
| 107 | Checkpoint notes are untrusted runner/model output (Fable M8). The resumed |
| 108 | prompt labels the task, attempt and checkpoint digest, then carries each note |
| 109 | as a JSON-quoted string. It keeps composer-origin person words in a separate |
| 110 | block. Notes cannot change authority, tool policy or the continuation scope. |
| 111 | The instance binds the pack digest and note digest to its recorded task, |
| 112 | repository, base, candidate, attempt and launch ID before acknowledging them. |
| 113 | A mismatched or unacknowledged checkpoint cannot resume work. |
| 114 | |
| 115 | ## 4. Snapshots |
| 116 | |
| 117 | **The base image** is built from a pinned manifest: runner release, tool proxy, |
| 118 | harness, toolchains and the pinned bubblewrap binary. It carries that binary |
| 119 | itself, because Debian's current package no longer matches the pin. |
| 120 | |
| 121 | **A base image may never contain** tokens, bootstrap codes, provider keys, OAuth |
| 122 | homes, forge credentials, machine keys, SSH keys, a person's configuration, or any |
| 123 | repository or task output. The `/ready` hook fails the build unless the runner |
| 124 | state directory is empty, and CI scans the image inputs for secrets. Unique values |
| 125 | are generated in the `/run` hook, because AWS documents that VMs from one image |
| 126 | version share build-time state. |
| 127 | |
| 128 | **A suspended VM's snapshot** holds one task's workspace and short-lived tokens. It |
| 129 | never launches another VM and ends when the VM terminates. |
| 130 | |
| 131 | ## 5. Task-scoped tokens |
| 132 | |
| 133 | | Token | Lifetime | Scope | Held by | |
| 134 | | --- | --- | --- | --- | |
| 135 | | Bootstrap code | 2 min, single use | One attempt and VM | `/run` payload | |
| 136 | | Runner bearer | 1 h, renewable to the deadline | One job, worker role | Runner, outside the sandbox | |
| 137 | | Gateway token | 15 min, renewable | One task, spend cap, allowed models | Runner, outside the sandbox | |
| 138 | | Forge push token | 15 min, renewable | One repository and task branch | Not issued in slices 1 to 4 | |
| 139 | |
| 140 | **Issue.** The run payload crosses AWS's control plane, so it carries only the |
| 141 | bootstrap code. The runner calls a new `POST /api/hosted/enrol` with the code, the |
| 142 | VM's ID and a new public key. This replaces device-code approval and the 30-day |
| 143 | credential for hosted runners. |
| 144 | |
| 145 | **Renewal while running.** The runner renews each token at half its lifetime and |
| 146 | installs it atomically. Two code changes follow: `Link` must read the current bearer |
| 147 | on each dial, because it copies it at startup today; and the harness must not hold |
| 148 | the gateway token, because a 15-minute token cannot live in the launch environment |
| 149 | of a 20-minute step. The harness calls a runner-side relay through its namespace |
| 150 | socket, and the relay attaches the current token. |
| 151 | |
| 152 | **Renewal after resume.** Each resume raises the job's epoch. The `/resume` hook |
| 153 | makes the runner sign the instance's challenge with its machine key and fetch new |
| 154 | tokens for that epoch. |
| 155 | |
| 156 | **Revocation and its limits.** The epoch invalidates Equipo-issued tokens at once. A |
| 157 | gateway token copied earlier stays usable until the gateway revokes it, within 60 |
| 158 | seconds (G1). A replacement attempt starts only after that revocation is acknowledged |
| 159 | or the token has expired. |
| 160 | |
| 161 | **Forge pushes.** While a person has a personal primary, hosted workers return candidate |
| 162 | packs and the primary publishes, as workers do today. The instance already refuses a |
| 163 | worker that reports a push. The forge token is reserved for a later hosted primary. |
| 164 | |
| 165 | **No AWS credentials in the VM.** With an execution role, the metadata endpoint gave |
| 166 | any process the role's temporary keys. Without one it returned only region and tags. |
| 167 | With no role AWS forwards no runtime logs, so logs travel over the runner stream. |
| 168 | |
| 169 | ## 6. Offline sandbox, dependency mirror and runner egress |
| 170 | |
| 171 | Fable H3 (review of oficina/equipo main 449e9c14) changes the original egress |
| 172 | proposal. Agent-chosen code stays offline in hosted mode, including dependency |
| 173 | installers, build scripts, tests and shell commands. Bubblewrap creates a network |
| 174 | namespace with no route, resolver, proxy socket or proxy credential. The hosted |
| 175 | profile must not introduce a network exception to the personal-runner policy. |
| 176 | |
| 177 | Dependencies arrive through a read-only mirror. A trusted process outside the |
| 178 | sandbox stages immutable, hash-verified objects before the attempt, then mounts |
| 179 | them read-only. Missing objects stop the build with an explicit dependency result; |
| 180 | the sandbox cannot trigger an arbitrary URL fetch. A separate mirror service |
| 181 | imports approved lockfile coordinates and digest-pinned toolchains from upstream. |
| 182 | It offers no uploads, mutable tags, arbitrary query strings, credentials supplied |
| 183 | by a task, or forward-proxy endpoint. Build lifecycle scripts run only inside the |
| 184 | offline sandbox. Mirror writes and upstream credentials never reach a worker. |
| 185 | |
| 186 | ```text |
| 187 | agent code -> read-only dependency mount (no network) |
| 188 | trusted runner/relay -> authenticated egress proxy -> exact approved service host |
| 189 | mirror importer -> approved upstreams (separate service and credentials) |
| 190 | ``` |
| 191 | |
| 192 | The deployment manifest records exact fully qualified hostnames and port 443 for |
| 193 | the Equipo instance, model gateway and read-only mirror. The controller copies |
| 194 | those literal values into each launch record and the proxy's per-VM policy. |
| 195 | No suffix match or wildcard is permitted, including for CARLOS, the forge or a |
| 196 | package registry. `amadan.net` is the only forge hostname, and is absent from |
| 197 | worker egress while the personal primary supplies source and publishes candidates. |
| 198 | Direct access to `proxy.golang.org`, `sum.golang.org`, `registry.npmjs.org`, |
| 199 | `pypi.org` and `files.pythonhosted.org` is denied. Their dependency objects come |
| 200 | from the mirror. The operator must choose and record the instance, gateway and |
| 201 | mirror's exact deployment hostnames before certification; an unset name blocks |
| 202 | launch. These are configuration requirements, not new deployed services. |
| 203 | |
| 204 | The private subnet has no internet route. The VM security group allows only the |
| 205 | fixed proxy and resolver addresses. `enableDnsSupport` is false on the VPC, since |
| 206 | managed resolvers bypass security-group DNS filtering. Root init replaces the |
| 207 | managed resolver mounts. The unprivileged runner cannot change them. The resolver |
| 208 | answers only the launch record's exact service names; unknown names get NXDOMAIN. |
| 209 | The sandbox cannot reach even that resolver. |
| 210 | |
| 211 | Every VM authenticates to the proxy with a short-lived client certificate bound |
| 212 | to launch ID, attempt, VM ID and epoch. It is minted against the controller's |
| 213 | launch record, rotated on resume and held outside every sandbox. The connector's |
| 214 | shared source address is never identity. The proxy verifies the certificate and |
| 215 | current launch state before each request, revokes access on stop or epoch change, |
| 216 | and records VM, task, attempt, destination, method, decision and byte counts. |
| 217 | Logs contain no credentials, request bodies or model text. |
| 218 | |
| 219 | SNI filtering alone is insufficient: domain fronting can use an allowed TLS name |
| 220 | with a different encrypted HTTP Host or HTTP/2 :authority. The authenticated proxy |
| 221 | terminates the runner's outbound service connection and checks that CONNECT target, |
| 222 | TLS SNI, Host/:authority and the manifest destination agree. It originates TLS to |
| 223 | that exact host, validates its certificate, and refuses redirects to other hosts, |
| 224 | IP literals, missing SNI, encrypted ClientHello, alternate authorities and opaque |
| 225 | nested tunnels. Each service also has fixed methods and path classes: the mirror |
| 226 | is GET/HEAD only for approved object paths. The gateway relay accepts the model |
| 227 | protocol only; arbitrary sockets are never exposed to agent-chosen code. This |
| 228 | replaces the earlier TLS-passthrough and two-proxy proposal. |
| 229 | |
| 230 | Production uses two proxies in two availability zones. The original spike tested |
| 231 | only the weaker SNI-passthrough design; the new proxy and offline boundary need |
| 232 | the certification tests below before any hosted model work. |
| 233 | |
| 234 | ## 7. The `vm-boundary` containment profile |
| 235 | |
| 236 | The VM separates people. Bubblewrap still separates the agent's tools from the |
| 237 | runner's tokens, using the same launch policy as personal runners. |
| 238 | |
| 239 | **The certified image has:** |
| 240 | |
| 241 | 1. `additionalOsCapabilities: ["ALL"]`. With default capabilities bubblewrap cannot |
| 242 | mount `/proc`, and 51 of 79 containment tests fail. |
| 243 | 2. A root init that replaces the managed mounts, which otherwise stop the runner |
| 244 | overlaying `/etc`, and that reaps orphaned processes. |
| 245 | 3. The runner as an unprivileged user with no capabilities. |
| 246 | 4. The bubblewrap digest pinned in the release manifest. |
| 247 | |
| 248 | **Certification** is a release gate run in a real VM for each image digest. The full |
| 249 | containment suite and the §14 egress matrix must pass, no AWS credential may be |
| 250 | reachable, VPC DNS must be off, and the runner user must be unable to alter the |
| 251 | resolver files or gain privileges. The gate signs the image digest, runner and |
| 252 | sandbox policy digests, proxy policy version and dependency-mirror configuration. |
| 253 | The controller verifies that certificate and records its digest with the exact |
| 254 | image, VM reference, launch request, task, attempt and epoch before issuing an |
| 255 | enrolment capability. Every hosted admission path, including ordinary checks, |
| 256 | resolves that controller launch record and requires a matching current certificate. |
| 257 | A runner's hello is diagnostic only; its self-reported profile or image digest |
| 258 | cannot establish certification (Fable M8). Replaying another VM's hello, certificate |
| 259 | or enrolment code must fail, as must an epoch or image mismatch. |
| 260 | |
| 261 | **Test-suite fixes first:** `exited` must retry `poll` on `EINTR`; the two |
| 262 | source-reading tests must run from the source tree; the delegated-cgroup test must |
| 263 | skip where no user session exists (production containment does not use cgroups). |
| 264 | |
| 265 | ## 8. Hosted and personal runners together |
| 266 | |
| 267 | - A hosted VM enrols as a **worker bound to one job**. `fits`, authorisation and |
| 268 | dispatch refuse it any other task, so it never joins the person's general pool. |
| 269 | - The person's **primary stays their personal runner**. It must be online, because |
| 270 | it relays the candidate as a pack and alone publishes the result. Workers hold no |
| 271 | forge credential in any slice here, and slice 2 needs no model token either. |
| 272 | - **Trigger:** a project setting, off by default, runs checks in a hosted VM. `place` |
| 273 | reads it before today's early return for checks with no special needs. |
| 274 | - Starting, draining and suspended VMs are exempt from offline withdrawal. The step |
| 275 | shows a new `waiting_hosted` placement while its VM starts. |
| 276 | |
| 277 | **Slice 2 needs two changes to existing code.** `thin.Run` starts the worker loop only |
| 278 | on a Mac or the test fake, so Linux needs a checks worker built on the containment |
| 279 | manager, with namespace proof. The instance also accepts only `seatbelt` from a worker |
| 280 | and taints anything else, so it must accept `bubblewrap` from a certified hosted runner. |
| 281 | |
| 282 | ## 9. Connections |
| 283 | |
| 284 | | Connection | Hosted? | Why | |
| 285 | | --- | --- | --- | |
| 286 | | Claude or Codex subscription, `setup-token` | No | Subscription credentials stay on the person's machine | |
| 287 | | A person's own API key | No in v1 | Keys stay out of VMs, and the gateway resells the operator's account | |
| 288 | | Platform gateway through the Pi harness | Yes, once built | OpenAI-compatible, short-lived token | |
| 289 | | Claude Code or Codex through the gateway | No | They need APIs the gateway does not serve | |
| 290 | |
| 291 | A person with only a subscription can use hosted checks. Their model work stays on |
| 292 | their own runner. |
| 293 | |
| 294 | ## 10. Cost, limits and failure |
| 295 | |
| 296 | **AWS rates for Ireland, x86_64:** 2 GB / 1 vCPU costs $0.155 an hour and 4 GB / 2 vCPU |
| 297 | costs $0.310. A pause and resume costs $0.0057 per GB of snapshot. Use above baseline, |
| 298 | up to 4x, costs extra. |
| 299 | |
| 300 | **Illustrative day for one active person, at baseline:** |
| 301 | |
| 302 | | Work | Cost | |
| 303 | | --- | --- | |
| 304 | | Three Engineering tasks, 45 min each at 2 GB | $0.35 | |
| 305 | | Later coordinator at 4 GB: 40 turns of 2 min | $0.41 | |
| 306 | | 40 pauses, assuming 4 GB written each time | $0.91 | |
| 307 | | **Total** | **$1.67, about $37 for 22 working days** | |
| 308 | |
| 309 | AWS does not report snapshot size, so the pause figure is an assumption, and a VM that |
| 310 | has burst could write more. Budgets must also count launch reads, image storage and |
| 311 | data transfer. The shared proxies add roughly $35 a month. |
| 312 | |
| 313 | **Default limits per person,** enforced from slice 2: 2 running VMs, 8 VM-hours a day, |
| 314 | $50 a month. At the limit, new work waits and says why. Confirm the applied account |
| 315 | quota in the production account first. The dev account's is 2,048 GB of VM memory. |
| 316 | |
| 317 | | Failure | Response | |
| 318 | | --- | --- | |
| 319 | | Launch throttled | Back off and stay in `waiting_hosted` | |
| 320 | | VM does not enrol in 2 min | Stop it, retry once, then fail with a reason | |
| 321 | | VM stops or resume fails | Prove it stopped, then start a new attempt from the checkpoint | |
| 322 | | Token renewal fails | Stop the VM; never run on stale tokens | |
| 323 | | Proxy down | Steps wait; nothing falls back to open egress | |
| 324 | | Controller down | Running VMs continue; launches wait | |
| 325 | |
| 326 | **Leaked VMs.** Every 60 seconds the controller compares `List` with its job table. |
| 327 | |
| 328 | - An incomplete `List` skips the pass. |
| 329 | - An attempt with a live launch intent is left alone; the controller replays it first. |
| 330 | - A VM with no matching job is stopped after 10 minutes, once ownership is rechecked. |
| 331 | - A VM past its deadline is stopped. |
| 332 | |
| 333 | AWS's maximum duration is the backstop. A leaked 4 GB VM costs at most $2.48 at |
| 334 | baseline, or $9.92 at sustained 4x. |
| 335 | |
| 336 | ## 11. Observability |
| 337 | |
| 338 | The spike found no CloudWatch metrics for MicroVMs, so Equipo records its own. |
| 339 | |
| 340 | - **Metrics:** launch-to-enrolled and resume-to-ready time, jobs by state, VM-hours and |
| 341 | estimated cost per person, leaks stopped, renewal failures, proxy decisions. |
| 342 | - **Logs and audit:** runner logs over the stream, proxy decisions by name, and every |
| 343 | lifecycle action with person, task and reason. CloudTrail data events stay on. |
| 344 | - **Alerts:** a leaked VM, VPC DNS switched on, no healthy proxy, or daily spend above |
| 345 | twice the trailing average. |
| 346 | |
| 347 | ## 12. The inference gateway dependency |
| 348 | |
| 349 | The gateway is designed but not built (`2026-09-21-platform-inference-design.md`, |
| 350 | carlos/platform branch `design-platform-inference`). Carloku is the platform's |
| 351 | flagship, so Equipo requests these from the platform instead of building its own: |
| 352 | |
| 353 | | Need | Today's design | |
| 354 | | --- | --- | |
| 355 | | **G1.** Per-task tokens minted by the app: 15 min at most, renewable, revoked within 60 s with an acknowledgement | One static bearer per app | |
| 356 | | **G2.** A spend cap per token, with usage by person and task | Balance per account | |
| 357 | | **G3.** An exact stable hostname and protocol supported by the authenticated proxy | Needs confirming | |
| 358 | | **G4.** Accepted fields that cover the Pi harness's requests | Strict parser, untested with Pi | |
| 359 | | **G5.** A cut stream releases its hold correctly | Needs confirming | |
| 360 | |
| 361 | **Until it exists,** hosted VMs run no model work, model work stays on personal runners, |
| 362 | Equipo builds no relay to a provider, and no provider key enters a VM or the controller. |
| 363 | |
| 364 | ## 13. Rollout |
| 365 | |
| 366 | Each slice ships behind a flag. |
| 367 | |
| 368 | | Slice | Delivers | Depends on | |
| 369 | | --- | --- | --- | |
| 370 | | **1. Foundation** | Adapter, controller, image pipeline, egress stack, certification gate, reaper, in the dev account | Paul's approval | |
| 371 | | **2. Hosted checks** | Checks in a bound VM, Linux worker, certified results, `waiting_hosted`, per-person limits | Slice 1 | |
| 372 | | **3. Visibility** | Cost display and project controls | Slice 2 | |
| 373 | | **4. Hosted Engineering** | Pi through the gateway, token relay, candidate packs back to the primary, checkpoint and handover | G1 to G5 | |
| 374 | |
| 375 | **A hosted coordinator is out of scope** and needs its own spec. Coordinator lanes run |
| 376 | only Claude and Codex today, and a hosted primary needs defined authority over routing, |
| 377 | connections and publication. It would also need a short-lived, branch-scoped forge |
| 378 | token, which the forge's CLI does not offer today. |
| 379 | |
| 380 | ## 14. Test plan |
| 381 | |
| 382 | - **Adapter contract:** one suite runs against the fake and the AWS implementation. |
| 383 | - **Lifecycle simulation:** randomised launch, pause, resume, crash and expiry. Invariants: |
| 384 | one live VM per attempt, nothing starts while draining, no Equipo token survives its |
| 385 | epoch, no job outlives its deadline, and only one attempt publishes. |
| 386 | - **Races:** dispatch during pause, crash between launch and saving the VM ID, lost stop |
| 387 | reply, late candidate from a replaced attempt, late acknowledgement of a cancelled pause. |
| 388 | - **Tokens:** replayed code, wrong VM, old epoch and revoked renewal are refused. A step |
| 389 | runs past 15 minutes and 1 hour on renewed tokens. |
| 390 | - **Egress matrix, in a real VM:** only the trusted runner and model relay can use |
| 391 | approved service routes. A sandboxed shell, dependency installer and build script |
| 392 | cannot reach any host, resolver, metadata endpoint or relay network socket. A disallowed name, no SNI, direct IPv4 and IPv6, other proxy ports, |
| 393 | each managed resolver and metadata credentials all fail. |
| 394 | - **Slice 2 end to end:** pack transfer, checks in the sandbox, certified report. |
| 395 | - **Failure drills:** kill the controller and proxy, stop a VM mid-step, plant an orphan. |
| 396 | - **Cost:** compare estimates with the first week's bill and real snapshot sizes. |
| 397 | |
| 398 | ## 15. Spike findings |
| 399 | |
| 400 | Run on 2026-11-18 in Ireland, at 0.5 GB and x86_64, from oficina/equipo `449e9c14`. |
| 401 | |
| 402 | | Question | Result | |
| 403 | | --- | --- | |
| 404 | | Launch from a prepared image | 5 launches; first response at 2.3 to 3.2 s | |
| 405 | | Image build; connector ready | About 2 min; about 4.5 min | |
| 406 | | Real runner in the VM | `equipo-runner version` ran; not enrolled, no task | |
| 407 | | Reach staging through the proxy | TLS 1.3, `/healthz` 200, runner stream with no credential 403 | |
| 408 | | Suspend; resume | 2.0 to 4.0 s; 7 cycles, first response at 2.1 to 4.0 s | |
| 409 | | State after resume | Memory, disk and a child process intact; clock within 12 ms | |
| 410 | | Open connection after resume | **Dropped**, after 20 s and 200 s pauses; new connections work | |
| 411 | | Disallowed name, no SNI | Refused by the proxy | |
| 412 | | Direct IPv4, IPv6, other proxy ports | Timed out | |
| 413 | | Source address seen by the proxy | One address for every VM | |
| 414 | | Managed DNS, VPC DNS on | **Leaked** through four resolvers to an outside server | |
| 415 | | Managed DNS, VPC DNS off | All four silent, on running and new VMs | |
| 416 | | Metadata, no role | Region and tags only | |
| 417 | | Metadata, with a role | **Returned the role's temporary credentials** | |
| 418 | | Bubblewrap, default capabilities | Fails: cannot mount `/proc` | |
| 419 | | Bubblewrap, `ALL` capabilities | Works, including nested; `--unshare-net` cuts the network | |
| 420 | | Containment suite, final profile | **71 of 79 pass** | |
| 421 | | Idle policy with outbound traffic only | **Suspended at about 70 s** | |
| 422 | | No idle policy supplied | None applied; maximum duration defaults to 8 hours | |
| 423 | | Maximum duration 60 s | Terminated at about 64 s; 28,801 s is rejected | |
| 424 | |
| 425 | **The 8 containment failures:** 5 need the codex binary, which the image left out; 2 read |
| 426 | source files and fail the same way on a developer machine; 1 needs a systemd user session. |
| 427 | `TestNamespaceParentDeath` passes only with the `EINTR` fix in §7, tried on a scratch copy. |
| 428 | |
| 429 | **Not proven:** real enrolment or a task in a VM; those 5 Engineering tests; snapshot size; |
| 430 | an 8-hour run or long suspension; many VMs at once; proxy failover; the two-proxy path. |
| 431 | |
| 432 | **Spike cost:** estimated under $0.50, including the one-week minimum on image storage. |
| 433 | Billing data had not arrived. **Teardown:** every resource was deleted and checked by type |
| 434 | and by the purpose tag. AWS's tag index lagged; direct lookups confirmed the deletions. |
| 435 | |
| 436 | ## 16. Paul's rulings (2026-11-19) |
| 437 | |
| 438 | Questions 2, 3 and 5 are approved as recommended. |
| 439 | |
| 440 | 1. **Which AWS account hosts production VMs?** Ruled 2026-11-19: the unused |
| 441 | organisation member account 149757027610, renamed `equipo-hosted`. It is |
| 442 | separate from every production account. |
| 443 | 2. **What are the default limits per person?** Recommendation: 2 running VMs, 8 VM-hours a |
| 444 | day and $50 a month, which an owner can raise. |
| 445 | 3. **Should hosted checks ship before the gateway exists?** Recommendation: yes. They need |
| 446 | no model or forge token and prove the foundation. |
| 447 | 4. **Registry egress:** resolved by Paul's 2026-11-19 ruling. Agent-chosen code has |
| 448 | no network in every project; the read-only mirror is required before hosted code |
| 449 | runs. A trusted repository is not an exception. |
| 450 | 5. **Should we request G1 to G5 from the platform now?** Recommendation: yes. They decide |
| 451 | when slice 4 can start. |
| 452 | |
| 453 | |
| 454 | ## 17. Authority and prompt data (2026-11-19) |
| 455 | |
| 456 | Paul approved these rules after Fable's prompt-injection review of |
| 457 | oficina/equipo main 449e9c14. They apply equally to personal and hosted work. |
| 458 | |
| 459 | 1. Model-written text is never the person's words. A tapped option the model |
| 460 | wrote is a choice among model text, not a statement by the person. |
| 461 | 2. A change never authorises its own merge. Evidence the candidate can edit |
| 462 | (its own checks, its own diff) is never trusted. |
| 463 | 3. Untrusted text enters a prompt only quoted, under a label naming its source. |
| 464 | 4. Anything an agent writes that leaves the system or opens in a browser needs |
| 465 | the person's tap or a standing project setting they chose, plus deterministic |
| 466 | checks. A private tailnet limits readers; it does not stop a page sending data |
| 467 | elsewhere. |
| 468 | 5. A sandbox that runs agent-chosen code has no network. Dependencies come |
| 469 | from a mirror. |
| 470 | |
| 471 | For M4, the controller labels CI logs, Review findings, repository text, fetched |
| 472 | pages and checkpoint notes by their actual source. Each value enters prompts as |
| 473 | an escaped quoted string, with bounds recorded separately from content. Delimiter |
| 474 | text inside a value cannot escape its framing. Composer-origin person words are |
| 475 | kept separate from generated choices and agent summaries. Quoting conveys data; |
| 476 | it cannot grant authority. Existing project settings govern actions without a new |
| 477 | tap whenever their deterministic checks hold. |
| 478 | |
| 479 | Before showing a preview, Equipo checks the Content-Security-Policy header on |
| 480 | the served marker response against the exact policy it requires. A file in the |
| 481 | artifact is not evidence that the browser received that policy. Equipo displays a verified |
| 482 | preview through a sandboxed wrapper whose frame policy allows only that preview |
| 483 | origin. The frame cannot open popups or navigate the parent, and the wrapper sends |
| 484 | no referrer. If the served policy is missing or differs, normal preview access |
| 485 | stays blocked. Opening it requires a warning and an owner's tap bound to the |
| 486 | candidate and export digest, with a fresh secret scan before fallback publication. |
| 487 | A public host also requires the project's public-preview setting. |
| 488 | |
| 489 | Certification adds negative tests for H3, M4 and M8: network and DNS from build |
| 490 | scripts; registry upload and cache-miss URL injection; absent, replayed or wrong-VM |
| 491 | proxy certificates; wrong epochs; SNI/Host/:authority disagreement and fronting; |
| 492 | redirects and encoded alternate authorities; checkpoint text containing prompt |
| 493 | boundaries; checkpoint task/hash mismatch; and a hello claiming a certified image |
| 494 | that differs from the controller's launch record. Each guard must first fail its |
| 495 | mutation test, then pass after restoration. Record evidence with the signed image |
| 496 | certificate. The 2026-11-18 spike does not certify these new requirements. |
| 497 | |