fix: stage inline content payloads outside payloadDir (#84) - #87
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
WalkthroughInline payload files are now stored outside the sandbox payload directory. Their paths remain valid during sandbox creation. Tests observe sandbox creation and verify that inline upload sources exist. ChangesInline payload handling
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
robbycochran
force-pushed
the
rc-fix-84-payload-rename
branch
2 times, most recently
from
August 21, 2026 15:05
a9c3e2f to
9f9533a
Compare
robbycochran
force-pushed
the
rc-openshell-compat
branch
from
August 21, 2026 15:07
e21bc2a to
2f02095
Compare
robbycochran
force-pushed
the
rc-fix-84-payload-rename
branch
from
August 21, 2026 15:08
9f9533a to
6d787a0
Compare
Inline content payloads (payloads[].content) were written to temp files inside payloadDir. createSandbox then renames payloadDir into a staging directory, which invalidated the stored upload source paths — so every SandboxCreate failed with "local path does not exist" and all five retries hit the same stale path. Stage inline content in a separate temp dir that is not renamed, so the upload source paths survive until SandboxCreate. Adds a regression test that fails on the pre-fix code (stale path after rename) and passes with the fix: it asserts every upload Src resolves at create time. Fixes #84. Approach and test mirror the reproduction shared by @RoddieKieley.
robbycochran
force-pushed
the
rc-fix-84-payload-rename
branch
from
August 21, 2026 15:20
6d787a0 to
9cdf5c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #84 — inline content payloads (
payloads[].content) failed withlocal path does not exist.Root cause
ResolvePayloadswrote inline content to temp files insidepayloadDir.createSandboxthen doesos.Rename(payloadDir, uploadDir)to stage the upload, which invalidated the source paths already stored inextraUploads. EverySandboxCreate— and all five retries — then failed on the same stale path.Fix
Stage inline content in a separate temp dir that is not renamed, so the upload source paths survive until
SandboxCreate(cmd/executor.go). One-line change plus its temp-dir lifecycle.Test
Adds
TestUpLocal_InlineContentPayloadPathSurvivesRename, which asserts every uploadSrcstill resolves at create time (via a newonSandboxCreatehook on the testmockGW). Verified it fails on the pre-fix code with the exactno such file or directoryerror after the rename, and passes with the fix.Credit
Approach and reproduction mirror the fix shared by @RoddieKieley in the issue (
fix/resolve-payloads-rename).Summary by CodeRabbit