fix(#6509): move runtime resolution before sandbox creation - #6511
fix(#6509): move runtime resolution before sandbox creation#6511fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The backendFromConfigFile() call that validates the configured runtime (org or per-repo config.yaml) ran after sandbox.CreateWithRetry(). A typo'd runtime: value (e.g. "opencode") would create and tear down a sandbox before the validation caught the error. Move the runtime resolution block (formerly step 5b) to new step 4a, immediately after the pre-script skip check and before sandbox creation (now step 4b). backendFromConfigFile() only reads the host filesystem config — it has no dependency on sandbox-computed values — so the move is safe. Now an invalid runtime config fails immediately with a clear error before any sandbox is created or torn down. Note: golangci-lint was not available in the sandbox. gofmt, go vet, and go test all pass. Closes #6509
|
🤖 Finished Review · ✅ Success · Started 1:27 AM UTC · Completed 1:37 AM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me |
|
/fs-fix |
|
🤖 Finished Fix · ✅ Success · Started 8:47 AM UTC · Completed 9:04 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.13 |
🔧 Fix agent — iteration 1 (human-triggered)Investigated the functional-tests CI failure triggered by /fs-fix. The code change moving runtime resolution before sandbox creation is correct — backendFromConfigFile only reads host filesystem config and has no sandbox dependencies. Code compiles, go vet passes, and all relevant unit tests pass. The CI functional test logs are inaccessible (HTTP 403), but all other recent functional-tests runs across the repo succeed, pointing to a transient infrastructure issue. No code changes made. Disagreed (1):
Tests: passedNext steps:
|
|
/fs-fix rebase and fix conflicts |
|
🤖 Finished Fix · ✅ Success · Started 9:32 AM UTC · Completed 9:40 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.59 |
🔧 Fix agent — iteration 1 (human-triggered)Rebased agent/6509-move-runtime-resolution onto origin/main. Resolved a merge conflict in internal/cli/run.go by keeping main's version — the PR's change (move runtime resolution before sandbox creation) is already incorporated in main via resolveBackendFrom() at line 954. The commit was dropped as empty. One pre-existing test failure (TestPostScriptEnv_NoSchemaAppendedWhenNoValidationLoop) exists on main and is unrelated to this PR. Fixed (1):
Tests: passed Decision points
Next steps:
|
|
Closing, superseeded by main. |
|
🤖 Finished Retro · ✅ Success · Started 10:12 AM UTC · Completed 10:25 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.21 |
Retro: PR #6511 — move runtime resolution before sandbox creationTimeline
Total agent cost for zero merged code: ~$6.49 across fix and triage agents alone (code and review agent costs not reported in comments). What went well
Evidence for existing issues (skipped as proposals)
Proposals filed
|
The backendFromConfigFile() call that validates the configured runtime (org or per-repo config.yaml) ran after sandbox.CreateWithRetry(). A typo'd runtime: value (e.g. "opencode") would create and tear down a sandbox before the validation caught the error.
Move the runtime resolution block (formerly step 5b) to new step 4a, immediately after the pre-script skip check and before sandbox creation (now step 4b). backendFromConfigFile() only reads the host filesystem config — it has no dependency on sandbox-computed values — so the move is safe.
Now an invalid runtime config fails immediately with a clear error before any sandbox is created or torn down.
Note: golangci-lint was not available in the sandbox. gofmt, go vet, and go test all pass.
Closes #6509
Post-script verification
agent/6509-move-runtime-resolution)d31168a0ce5f0d0f2c10dbbb8ab9d78c8b066167..HEAD)