Skip to content

Conversation

@jakubno
Copy link
Member

@jakubno jakubno commented Oct 28, 2025

Note

Adds POST /sandboxes/{sandboxID}/connect to return/resume sandboxes and extend TTL, updates spec/types/clients, deprecates resume, and adds integration tests.

  • API/Handlers:
    • Add POST /sandboxes/{sandboxID}/connect handler PostSandboxesSandboxIDConnect to return running sandbox (200) or resume from snapshot (201) and extend TTL; validates timeout vs team limits and handles state transitions.
  • OpenAPI/Generated Code:
    • Define ConnectSandbox schema and request body PostSandboxesSandboxIDConnectJSONRequestBody.
    • Expose new route in ServerInterface, middleware, and Gin router in packages/api/internal/api/api.gen.go.
    • Embed updated spec (spec.gen.go) and types (types.gen.go).
    • Mark POST /sandboxes/{sandboxID}/resume as deprecated.
    • Generate client methods, request builders, and response parsers for the connect endpoint in test client (tests/integration/internal/api/client.gen.go) and models (models.gen.go).
  • Tests:
    • Add sandbox_connect_test.go covering paused/running, TTL extension, not-found, oversized timeout, and concurrent connects.
    • Add sandbox_refresh_test.go for TTL refresh behavior.
    • Replace sandbox_set_timeout_test.go with sandbox_timeout_test.go consolidating timeout cases.

Written by Cursor Bugbot for commit 5729df8. This will update automatically on new commits. Configure here.

@linear
Copy link

linear bot commented Oct 28, 2025

@jakubno jakubno marked this pull request as ready for review October 29, 2025 09:48
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@sitole sitole self-requested a review October 29, 2025 12:26
@jakubno jakubno requested a review from sitole October 29, 2025 14:05
@ValentaTomas
Copy link
Member

@jakubno jakubno merged commit a0de555 into main Oct 29, 2025
27 checks passed
@jakubno jakubno deleted the fix-bug-when-connecting-to-a-sandbox-with-longer-timeout-api-eng-3232 branch October 29, 2025 19:54
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.

4 participants