Skip to content

feat(acid): sandbox acid test, levels 0–2, run against any adapter - #133

Merged
reachjalil merged 2 commits into
pre-releasefrom
feat/sandbox-acid-test
Nov 20, 2026
Merged

reachjalil merged 2 commits into
pre-releasefrom
feat/sandbox-acid-test

Conversation

@reachjalil

Copy link
Copy Markdown
Member

What

The sandbox acid test (docs/acid-test.md): one test suite, getting harder level by level, that any sandbox provider can be run through, so we can publish real numbers, file precise issues upstream and help customers choose. This PR adds the design and phase 1:

  • internal/acid: levels 0 (contract), 1 (commands) and 2 (files), 21 tests. Each one answers ✅ pass, ➖ unsupported (not declared, and the backend says so), ❌ fail, or ⚠️ dishonest (looked like it worked but didn't, e.g. output cut short without truncated).
  • cmd/differently-acid run|report|list: runs the suite against a pool from a server or pools config and writes an acid/1 JSON result. report prints results side by side. When the pool has a credential, it also tries a wrong one to check that it's refused and never echoed.
  • internal/acid/acidtest: runs the suite from an adapter's own tests against a fake of the provider's API, like storetest. Daytona's level 0 is pinned this way.
  • acid/results/: the first raw result.

What it found (fixed here)

Where Found by Was Now
opensandbox L0.06, live A container Docker can't start (here: 4096 CPUs) → provider_unavailable, which marks the whole pool unhealthy invalid_request when Docker answered 400, sandbox_failed otherwise
remote (adapterhttp client) L0.01, through the protocol Rejected plugin token passed through as unauthenticated, which reaches API callers as a 401 about their key provider_unavailable, as spec §5 and httpx do
daytona L0.07, fake Pausing a container (pause not declared) → invalid_request unsupported_operation

Each fix has a regression test. The OpenSandbox one fails without the fix.

Verification

  • Live: OpenSandbox release-1.2.0, Docker runtime, on Colima (arm64). Full size: a 10-minute command and a 100 MiB file. Level 2 · 21/21, nothing left behind. Before the OpenSandbox fix it scored 20/21. Create to running took 0.41 s, exec round trip was 6 ms, and the 100 MiB file went up at 121 MiB/s and down at 161 MiB/s. These are single samples with no network in between.
  • go test: pins outcomes on devhost (18/21), fake (10/21), devhost behind adapterhttp as a remote pool, and the Daytona fake. It also pins broken adapters for each outcome: a leak, an echoed credential, dropped stdin, and hidden features.
  • make verify: fmt, vet, test, sdk-test, helm-lint and compose-lint pass. The -race run of internal/loadsim failed twice under the full parallel run (TestKeptSandboxesHibernateAndWake, TestDisableAPoolLive) and passed when re-run alone. The race is already on pre-release, in internal/pools (Supports reads entry.caps outside the lock while Refresh writes it), in code this PR doesn't touch. It's left for a separate PR.
  • npm run build in site/: all links valid.

Not run: any external provider live, make test-postgres (no store or server change), and the e2e suite.

Not done from phase 1 (noted in the backlog under E0.34):

  • OpenSandbox recordings: they replay a fixed scenario, so the suite needs a recording of its own.
  • The Freestyle fake: it's a single-VM fake inside one test, so it can't host the suite.

🤖 Generated with Claude Code

reachjalil and others added 2 commits November 20, 2026 10:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jalil <reachjalil@gmail.com>
internal/acid checks an adapter against the contract (level 0), commands
(level 1) and files (level 2); each test answers pass, unsupported, fail or
dishonest. differently-acid runs it against a configured pool and writes an
acid/1 JSON result; acidtest runs it from an adapter's tests against a fake
of its API. go test pins its verdicts on devhost, fake, a remote pool and
the Daytona fake, plus broken adapters for each outcome.

Run live against OpenSandbox's Docker runtime: Level 2, 21/21 after
fixing what it found:
- opensandbox: a container Docker cannot start answered
  provider_unavailable, marking the pool unhealthy;
- remote pools: a rejected plugin token reached callers as unauthenticated;
- daytona: pausing a container answered invalid_request, not
  unsupported_operation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jalil <reachjalil@gmail.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI passed at 357a0e8.

@reachjalil
reachjalil merged commit cd2a818 into pre-release Nov 20, 2026
22 checks passed
@reachjalil
reachjalil deleted the feat/sandbox-acid-test branch November 20, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant