test(sandbox): exercise a sandbox session end to end - #403
Conversation
Greptile SummaryThe PR adds a Local-only end-to-end sandbox binding check and revises teardown to confirm deletion before reporting success.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/alien-test/src/e2e.rs | Adds Sandbox to the binding model and enables it only for the Local platform. |
| crates/alien-test/tests/common/bindings.rs | Adds the HTTP-level sandbox check and validates its standard success response. |
| crates/alien-test/tests/common/runner.rs | Dispatches supported Sandbox checks through the existing binding runner. |
| tests/e2e/test-apps/comprehensive-rust/src/handlers/sandbox.rs | Exercises a Rust sandbox session and reliably propagates or confirms teardown outcomes. |
| tests/e2e/test-apps/comprehensive-typescript/src/handlers/sandbox.ts | Implements the equivalent TypeScript sandbox lifecycle with cleanup-first failure reporting. |
| tests/e2e/test-apps/comprehensive-rust/alien.ts | Declares, links, authorizes, and provisions the Local-only Rust sandbox fixture. |
| tests/e2e/test-apps/comprehensive-typescript/alien.ts | Declares, links, authorizes, and provisions the Local-only TypeScript sandbox fixture. |
Sequence Diagram
sequenceDiagram
participant Runner as E2E runner
participant App as Comprehensive app
participant Sandbox as Sandbox binding
Runner->>App: POST /sandbox-test/alien-sandbox
App->>Sandbox: create session
App->>Sandbox: run command
App->>Sandbox: write file
App->>Sandbox: read file
App->>Sandbox: terminate session
loop Until absent/terminated or timeout
App->>Sandbox: get session
end
App-->>Runner: Success or teardown failure
Reviews (18): Last reviewed commit: "test(sandbox): exercise a sandbox sessio..." | Re-trigger Greptile
2cbe0ec to
4a813ec
Compare
4a813ec to
9e50cc3
Compare
9e50cc3 to
d835538
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
d835538 to
4948041
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
4948041 to
1b3c226
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
1b3c226 to
40e88e5
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
40e88e5 to
e80dd48
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
42c6245 to
c4dcd66
Compare
c4dcd66 to
85eb01b
Compare
d7befbd to
6d38ac5
Compare
6d38ac5 to
88c7ec1
Compare
88c7ec1 to
9f347e7
Compare
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
9f347e7 to
0feee35
Compare
|
@greptile-apps review |
Summary
Exercises a sandbox end to end: the test app declares one, and the suite drives a real session through it rather than asserting on rendered templates.
What the test does when it runs:
What I did
The assertions are on observed behaviour, not on artifacts. A test that checks a template contains a string would pass against a sandbox that never starts, so this one runs code inside the session and reads back what it wrote.
Files touched
crates/alien-test/— the sandbox case in the deployment suite.tests/e2e/test-apps/comprehensive-typescript/— the declaration and the handler the test drives.How I tested
The suite itself is the test: it creates a session, runs a command, round-trips a file and
terminates, asserting on what came back rather than on rendered artifacts.
I have not run it against a live deployment in this change — it needs cloud credentials and a
free slot. It should be run before merge, and the thing to watch is teardown: an accepted delete
is not a completed one, so confirm the session is actually gone rather than trusting the call.