test(isolate): AWS integration-harness coverage + create-latency benchmark#341
Merged
Conversation
The V8-isolate (workerd) runtime had zero coverage in the AWS integration harness — no scenario, no Makefile target, no reports/*.md — so it (and the per-sandbox egress attribution shipped in v0.7.16 / PR #340) was only ever validated by an ad-hoc manual recipe. This makes it repeatable. The provisioning layer already existed (install.sh --with-isolate downloads a SHA-pinned workerd + writes SB_ENABLE_ISOLATE=true; Terraform default_with_isolate; bootstrap.sh.tftpl emits the flag), so this is purely the harness layer, mirroring how gvisor is wired (advertisement-only capability, provisioning-driven, no config-overlay flip and no node-side staging — the UCs upload JS bundles over POST /v1/js-bundles at runtime). - scenarios/single-node-isolate.{tfvars,caps.yml}: one mixed t3.medium node with default_with_isolate=true; caps [docker, isolate, domain]. A mixed node is a worker, so supportedRuntimesForConfig advertises "isolate" and admission accepts isolate creates. - CapIsolate + UC-103 (runs), UC-104 (per-sandbox egress allowlist), UC-105 (js-bundle catalogue CRUD) in the registry; suite/isolate_test.go implements them via the SDK + a small harness Delete helper, driving the fetch handler through toolbox exec (exec command -> fetch URL path). - Makefile integration-single-isolate + run.sh 'all' list / usage header. The scenario disables the isolate jail (SB_ISOLATE_USE_JAIL=false via extra_user_data): the jail defaults on, but its chroot is not yet populated with the workerd binary (chroot-populate is the tracked "full jail realization" follow-up), so with the jail on workerd is exec'd inside an empty chroot and every create fails "no such file or directory" even though it is installed on the host and health reports isolate:ok. Jail-off is how the runtime is currently deployable end to end and is orthogonal to the egress attribution UC-104 proves; a jail-ON scenario is a follow-up gated on chroot-populate. Live-validated on a fresh single-node-isolate deployment (released v0.7.16 + workerd, no binary hacks): pass 57 / fail 0 / skip 51, all three isolate UCs green — including UC-104 proving an allow-listed sandbox reaches example.com but 403s a non-allowed host while a block-all sandbox in the SAME tenant group 403s everything. Torn down clean (34 resources destroyed, no leak). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wire the V8-isolate runtime into the UC-94 create-latency sweep and add
make integration-benchmark-isolate[-only], so isolate gets a proper p50/p90/p99
artifact like the docker/gvisor/wasm/fc rows.
- benchmark_test.go: add {"isolate", CapIsolate} to benchRuntimes; benchRuntimeSpec
gains bundleRef + tenantID; selectedBenchRuntimes uploads the bench bundle once
(content-addressed, idempotent) and pins a shared tenant so every sample lands
in ONE warm workerd group (steady-state create, not a per-sample group spawn);
benchCreateOptions sets ModuleRef/TenantID for the isolate case.
- single-node-isolate.caps.yml: advertise `benchmark`. UC-94 stays dormant unless
AEROL_BENCH=1, so the functional `make integration-single-isolate` still skips
it; UC-95 (density) stays skipped — it also needs CapCluster.
- Makefile: integration-benchmark-isolate[-only] mirroring the wasm/gvisor bench
targets (AEROL_BENCH_RUNTIMES=isolate + --bench-only), reusing the jail-off
single-node-isolate scenario.
Live result (single-node-isolate t3.medium, released v0.7.16 + workerd, jail off,
10 samples, 0 failures): warm isolate create SERVER p50=4ms p90=6ms p99=19ms
(stages: create 6ms mean, cluster_promote 4ms, create_with_id 1ms, cluster_seal
0ms); api p50=266ms (the ~262ms api-server gap is laptop->us-east-1 WAN, not
create cost). Torn down clean (34 resources destroyed, no leak).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
microvm | c0aafa2 | Commit Preview URL Branch Preview URL |
Jul 18 2026, 08:55 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
single-node-isolatescenario,CapIsolate+ UC-103/104/105,make integration-single-isolate, and a UC-94 isolate create-latency benchmark (make integration-benchmark-isolate). Before this, isolate — and the per-sandbox egress attribution shipped in v0.7.16 / feat(isolate): per-sandbox egress attribution via per-slot service pool #340 — was only ever validated by an ad-hoc manual recipe, so it left noreports/*.mdand had nomaketarget.pkg/, or SDK code changes. The isolate provisioning layer already existed (install.sh --with-isolatedownloads a SHA-pinned workerd + writesSB_ENABLE_ISOLATE=true; Terraformdefault_with_isolate;bootstrap.sh.tftplemits the flag), so this is purely the harness layer, mirroring how gvisor is wired (advertisement-only capability, provisioning-driven, no config-overlay flip and no node-side staging — the UCs upload JS bundles overPOST /v1/js-bundlesat runtime).Code-path diagram
flowchart TB subgraph provision["make integration-single-isolate → run.sh single-node-isolate"] TF["Terraform apply<br/>default_with_isolate = true"] --> INS["install.sh --with-isolate<br/>SHA-pinned workerd → /usr/local/bin/workerd<br/>+ SB_ENABLE_ISOLATE=true"] INS --> EUD["extra_user_data (NEW)<br/>SB_ISOLATE_USE_JAIL=false + restart sandboxd"] EUD --> HEALTH["wait DNS/TLS/health → isolate:ok<br/>supported_runtimes=[docker,isolate]"] end subgraph suite["integration suite — CapIsolate gates (NEW)"] HEALTH --> U103["UC-103 upload bundle → create isolate → exec-fetch"] HEALTH --> U105["UC-105 js-bundle catalogue CRUD"] HEALTH --> U104["UC-104 two sandboxes / one tenant:<br/>allow-list vs block-all egress differ"] HEALTH --> U94["UC-94 (bench, AEROL_BENCH=1 only)<br/>warm create latency, 10 samples"] end U103 --> RPT["report matrix + auto-teardown"] U104 --> RPT U105 --> RPT U94 --> RPTBefore → after: before this PR there was no isolate scenario/UC/target and no isolate row in any report; after,
single-node-isolateprovisions the runtime through the existing--with-isolatepath and the suite exercises create/exec, per-sandbox egress, the bundle catalogue, and create latency.Sandbox boot impact
N/A — test harness only; no work added to
CreateSandboxor any callee. The one node-side change the scenario makes is appendingSB_ISOLATE_USE_JAIL=falsetosandboxd.envviaextra_user_data(a provisioning-time env write + restart, the same hook the wasm/gvisor scenarios use), not a code path in the boot sequence.Idempotency
N/A — no API surface changed. The UCs are clients of existing endpoints: js-bundle upload is content-addressed and idempotent (re-upload of the same name+source resolves to the same digest), and sandbox create/destroy are unchanged. The bench reuses one uploaded bundle + one shared tenant across all samples precisely because upload is idempotent.
Failure-path consistency
N/A — no multi-step caddy+store write path changed. Isolate is HTTP-only / host-mediated and the change is test-only. The harness's own hygiene is unchanged: every created sandbox registers a
t.Cleanupdestroy, andrun.sh(no--keep) tears the deployment down onEXIT/INT/TERMand collectsreports/<scenario>-failure-logs.txtbefore teardown on any failure.L4 / host-port-pool changes
N/A — neither touched. Isolate never calls
TryReserveHostPort/allocateHostPort/EnsureLayer4/ thel4Readylatch; the harness adds no L4 code.Test plan
go vet -tags=integration ./integration-tests/suite/...(exit 0);go test ./integration-tests/suite/harness/...(green — includes the known-capability check extended withCapIsolate);go test ./integration-tests/report/...(green — registry-driven, classifies the new UCs);make fmtclean.make integration-single-isolate, fresh t3.medium, released v0.7.16 + workerd): pass 57 · fail 0 · skip 51 · inconclusive 0. UC-103/104/105 all green. UC-104 proved per-sandbox egress attribution on real infra — an allow-listed sandbox reachedexample.com(200) but 403'd a non-allowed host, while a block-all sandbox in the same tenant group 403'd everything. Torn down clean (34 resources destroyed, no leak).make integration-benchmark-isolate, 10 samples): warm isolate create server p50 = 4 ms / p90 = 6 ms / p99 = 19 ms, 0 failures (stages: create 6 ms mean, cluster_promote 4 ms, create_with_id 1 ms, cluster_seal 0 ms). The ~262 ms api↔server gap is laptop→us-east-1WAN, not create cost. Torn down clean (34 resources destroyed, no leak).Deliberate scope note
The scenario runs the isolate jail off (
SB_ISOLATE_USE_JAIL=false). The jail defaults on, but its chroot is not yet populated with the workerd binary (chroot-populate is the tracked "full jail realization" follow-up inplans/isolate-runtime.md); with the jail on, workerd is exec'd inside an empty chroot and every create failsno such file or directoryeven though the binary is installed and health reportsisolate:ok. Jail-off is how the runtime is currently deployable end to end, and is orthogonal to the egress attribution UC-104 proves. Follow-ups: a jail-ON isolate scenario once chroot-populate lands.🤖 Generated with Claude Code