Skip to content

fix(api): preserve managed-home provider preference - #335

Merged
haasonsaas merged 1 commit into
mainfrom
fix/managed-home-provider-preference
Aug 6, 2026
Merged

fix(api): preserve managed-home provider preference#335
haasonsaas merged 1 commit into
mainfrom
fix/managed-home-provider-preference

Conversation

@haasonsaas

Copy link
Copy Markdown
Contributor

Summary

Platform persistent-computer requests send workspace_mode=persistent and provider_preference=cloudflare to POST /v1/homes/{home_id}/sandboxes. The managed-home wrapper replaced that preference with any, so the Cloudflare worker could not claim the job after sandboxwich#334 tightened provider matching.

This change carries the request's explicit provider preference into the managed-home provision spec. An omitted preference still defaults to any.

Regression

The HTTP contract test registers Kubernetes and Cloudflare workers, creates a persistent managed-home sandbox with provider_preference=cloudflare, and verifies:

  • Kubernetes receives no lease.
  • Cloudflare claims the provision job.
  • The queued provisionSpec.provider_preference remains cloudflare.

Tests

  • cargo test -p sandboxwich-api --test http_contract homes::
  • cargo test -p sandboxwich-api provider_preference
  • cargo test -p sandboxwich-api --test http_contract sandboxes::
  • cargo fmt --all -- --check

@haasonsaas
haasonsaas enabled auto-merge (squash) August 6, 2026 17:17
@haasonsaas
haasonsaas disabled auto-merge August 6, 2026 17:18
@haasonsaas
haasonsaas merged commit dcd8615 into main Aug 6, 2026
6 checks passed
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