Skip to content

test(adapters): a live test for gcp-sandboxes, and a second delete that succeeds - #132

Merged
reachjalil merged 1 commit into
pre-releasefrom
feat/gcp-sandboxes-live-test
Nov 20, 2026
Merged

reachjalil merged 1 commit into
pre-releasefrom
feat/gcp-sandboxes-live-test

Conversation

@reachjalil

Copy link
Copy Markdown
Member

What

Hardening for the experimental gcp-sandboxes adapter (Google Cloud Agent Platform sandboxes), which has only ever run against a fake server:

  • TestLiveGCPSandboxes (build tags live,experimental_adapters; GCP_SANDBOXES_PROJECT, _LOCATION, _ENGINE, _TEMPLATE, optional _CREDENTIAL_FILE, otherwise the metadata server): create and a replayed create, exec with env, cwd, stdin and an exit code, a 128 KiB file through several 64 KiB pieces, list, stop and start with the file kept, snapshot, a fork with the file, and the deletes, with each step timed. It also reports two things Google doesn't document: whether a process survives :pause/:resume, and whether one survives a snapshot into a fork. The answers decide whether the pool could advertise lifecycle.pause-resume.
  • Fix: Delete of a sandbox that is already deprovisioning succeeds even if Google refuses it with FAILED_PRECONDITION. Previously only NOT_FOUND counted, so a retried delete could be reported as failed.

Docs (docs/providers/gcp-sandboxes.md) and the changelog are updated.

What ran

  • make verify passed locally.
  • npm run build in site/ passed.
  • The fake server now refuses a second delete with FAILED_PRECONDITION. The test fails without the fix and passes with it.
  • The live test compiles and skips without credentials.

What did not run

The live test itself: it needs a Google Cloud project with an Agent Platform engine and shell template. Nothing in this adapter has run against Google Cloud.

🤖 Generated with Claude Code

@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 258fc57.

…at succeeds

Adds TestLiveGCPSandboxes (build tags live,experimental_adapters): the
scenario Differently relies on against a real Agent Platform engine
(create and a replayed create, exec with env, cwd, stdin and an exit code,
a 128 KiB file in several pieces, list, stop and start with the file kept,
snapshot, a fork with the file, deletes). It also reports what Google does
not document: whether a process survives :pause and :resume, and whether
one survives a snapshot into a fork, which decides whether the pool could
advertise lifecycle.pause-resume. It has not been run.

Fixes Delete for a sandbox already being deleted: Google may refuse a
second deletion with FAILED_PRECONDITION rather than NOT_FOUND; the
adapter now checks that the sandbox is gone and succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jalil <reachjalil@gmail.com>
@reachjalil
reachjalil force-pushed the feat/gcp-sandboxes-live-test branch from 258fc57 to 4719c6c Compare November 20, 2026 02:05

@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 4719c6c.

@reachjalil
reachjalil merged commit c36d436 into pre-release Nov 20, 2026
22 checks passed
@reachjalil
reachjalil deleted the feat/gcp-sandboxes-live-test branch November 20, 2026 02:15
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