feat(minimald): implement populating session files using a tarball - #423
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds ChangesSTREAM_WORKSPACE_FILES SSH subsystem RPC
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/minimald/src/rpc.rs`:
- Around line 199-208: The tar extraction at the
Archive::new(reader).unpack(workspace_path.as_utf8_path()).await call unpacks
client-controlled data directly into the live workspace without size limits,
entry validation, or rollback on failure, leaving partial files on disk if
extraction fails. Replace this direct unpack with a safer approach using the
existing extract_compressed_tar() function from crates/common/src/archive.rs (or
create a similar wrapper) that extracts to a temporary staging directory first,
validates the archive contents and enforces quotas on decoded bytes and entry
counts, then moves the validated contents to the workspace only after confirming
success. Ensure that any extraction errors trigger cleanup of the staging
directory and proper rollback before the error response is sent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cf55d440-f1fc-4962-82bc-1573fe95b9aa
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
Cargo.tomlcrates/minimald/Cargo.tomlcrates/minimald/src/rpc.rscrates/minimald/src/test_harness.rs
ad21677 to
234ff3a
Compare
Lets you populate workspace files by streaming a tarball. You can drive it manually like this:
Summary by CodeRabbit
Summary by CodeRabbit
Release Notes
New Features
Chores
Tests