Repository navigation
feat(acid): sandbox acid test, levels 0–2, run against any adapter - #133
Merged
Merged
Conversation
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>
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.
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, ortruncated).cmd/differently-acid run|report|list: runs the suite against a pool from a server or pools config and writes anacid/1JSON result.reportprints 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, likestoretest. Daytona's level 0 is pinned this way.acid/results/: the first raw result.What it found (fixed here)
opensandboxprovider_unavailable, which marks the whole pool unhealthyinvalid_requestwhen Docker answered 400,sandbox_failedotherwiseremote(adapterhttpclient)unauthenticated, which reaches API callers as a 401 about their keyprovider_unavailable, as spec §5 andhttpxdodaytonainvalid_requestunsupported_operationEach fix has a regression test. The OpenSandbox one fails without the fix.
Verification
go test: pins outcomes on devhost (18/21), fake (10/21), devhost behindadapterhttpas aremotepool, 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-racerun ofinternal/loadsimfailed twice under the full parallel run (TestKeptSandboxesHibernateAndWake,TestDisableAPoolLive) and passed when re-run alone. The race is already onpre-release, ininternal/pools(Supportsreadsentry.capsoutside the lock whileRefreshwrites it), in code this PR doesn't touch. It's left for a separate PR.npm run buildinsite/: 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):
🤖 Generated with Claude Code