Skip to content

Add a GCP GKE Agent Sandbox runtime adapter - #367

Closed
ssalih1993 wants to merge 12 commits into
yc-software:mainfrom
ssalih1993:upstream/gcp-runtime
Closed

Add a GCP GKE Agent Sandbox runtime adapter#367
ssalih1993 wants to merge 12 commits into
yc-software:mainfrom
ssalih1993:upstream/gcp-runtime

Conversation

@ssalih1993

@ssalih1993 ssalih1993 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Add a provider-native GCP runtime path for QM:

  • provision isolated agent computers through GKE Agent Sandbox SandboxClaim resources
  • route the existing agent-daemon protocol through the in-cluster sandbox router
  • store durable file bytes and transfer blobs in Cloud Storage
  • allow hosted-app deployment to fail closed when no deploy provider is configured
  • document the Workload Identity, namespace RBAC, runtime variables, and operator-owned infrastructure boundary

The adapter does not create GKE, Cloud SQL, buckets, IAM, or Secret Manager resources.

Verification

  • 37 focused config/GKE/GCS/disabled-provider tests passed
  • TypeScript typecheck passed
  • ESLint passed on the changed TypeScript files
  • diff check passed
  • independent review of the GKE control path passed

Live validation

The adapter has been exercised against a GKE Agent Sandbox warm pool. The final compatibility fix uses the request-object API required by @kubernetes/client-node 1.4 for custom resource create/get/delete calls.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@ssalih1993

Copy link
Copy Markdown
Author

Updated the GKE adapter after validating against a live managed Agent Sandbox CRD. The served v1alpha1 SandboxClaim schema requires spec.sandboxTemplateRef; the equivalent claim passed server-side dry-run. This replaces the rejected warm-pool-specific claim fields while preserving the separately managed warm pool that references the same template. Local full tests (928), typecheck, and lint pass.

@ssalih1993

Copy link
Copy Markdown
Author

Live GKE execution exposed a non-root workspace issue after claim provisioning was fixed: managed Agent Sandbox mounts /home/agent writable to uid/gid 1000, but preserves the image-baked /home/agent/workspace as root-owned 0755. Updated the GKE adapter to create /home/agent/qm-workspace at runtime, avoiding an init container or privilege escalation. Manual live write probe and focused adapter tests pass.

@time-attack

Copy link
Copy Markdown
Collaborator

Thanks for this, @ssalih1993 — and sorry for the slow response.

We're closing this PR. Per CONTRIBUTING.md, since coding agents write most of the underlying code now, we'd rather receive feature ideas as a short human-written note in adrs/ — informal is great, just the idea in your own words — and bugs as a plain issue. If we're aligned we're happy to burn our own tokens on the implementation, and we'll credit you as co-author.

We don't want your idea to get lost, so we've captured it in #735 to triage on our side. Please feel free to open an adrs/ note if you feel strongly about the approach. Appreciate you engaging with the repo!

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.

2 participants