Skip to content

fix(wt-invokers): follow HTTP redirects when downloading environment tar#193

Merged
cisaacstern merged 1 commit into
mainfrom
fix/sandbox-download-follow-redirects
Jun 16, 2026
Merged

fix(wt-invokers): follow HTTP redirects when downloading environment tar#193
cisaacstern merged 1 commit into
mainfrom
fix/sandbox-download-follow-redirects

Conversation

@cisaacstern

Copy link
Copy Markdown
Member

🌎 Summary

closes #192

📦 Proposed Changes

  • The sandbox invoker's _pre_run downloads environment_tar_url from a GitHub release URL, which responds with a 302 redirect to a short-lived signed asset URL. httpx defaults to follow_redirects=False, so the 302 surfaced as an HTTPStatusError and the job crashed before unpacking the environment.
  • Set follow_redirects=True on the download client so the redirect is resolved at download time (keeping the signed URL fresh). Add a 302 branch to the test http_server fixture and a regression test that downloads through the redirect end-to-end.

The sandbox invoker's _pre_run downloads environment_tar_url from a
GitHub release URL, which responds with a 302 redirect to a short-lived
signed asset URL. httpx defaults to follow_redirects=False, so the 302
surfaced as an HTTPStatusError and the job crashed before unpacking the
environment.

Set follow_redirects=True on the download client so the redirect is
resolved at download time (keeping the signed URL fresh). Add a 302
branch to the test http_server fixture and a regression test that
downloads through the redirect end-to-end.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cisaacstern cisaacstern merged commit 38f2f81 into main Jun 16, 2026
25 checks passed
@cisaacstern cisaacstern deleted the fix/sandbox-download-follow-redirects branch June 16, 2026 02:57
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.

Download function in sandbox invoker does not properly follow redirects for GitHub artifact downloads

1 participant