Repository navigation
Conversation
There was a problem hiding this comment.
Confidence Score: 2/5
Summary
Adds incremental SHA-256 hashing and 8 MiB resumable uploads for regular files larger than 16 MiB. This introduces a stateful transfer path dependent on the companion Platform/Goblin protocol.
Local validation on Linux:
cargo test --locked --workspace: 159 passed.cargo clippy --locked --all-targets -- -D warningsandcargo fmt --all -- --check: passed.- Python publishing tests: 9 passed.
- Exercised nine loopback fault-injection scenarios.
Traced the companion Platform and Goblin implementations. Real-VM transfers and non-Linux targets were not exercised locally.
Important Files Changed
| File | Changes |
|---|---|
| src/upload.rs | Implements incremental hashing, ranged uploads, acknowledgement validation, and recovery. |
| src/commands.rs | Routes regular files above 16 MiB through the new uploader. |
| src/api.rs | Exposes existing retry classification to the uploader. |
| tests/cli.rs | Adds a large-upload recovery test using a sandbox prefix. |
| Cargo.toml | Makes checksum dependencies available on every platform. |
| src/main.rs | Registers the upload module. |
| docs/cli-reference.md | Documents large-file upload behavior and remaining transfer limits. |
| skills/adapt/SKILL.md | Updates the bundled agent guide’s transfer limits. |
Run info
| Field | ID |
|---|---|
| Agent | 0d6ccd7e-b62f-4075-a561-199d1a7b1bf0 |
| Automation | ec14e69d-634f-4af0-a6dd-27aa06a1f6b3 |
| Run | 6be87fbc-dc36-4408-8e1d-2c8292c0776b |
Reviewed: fa0bff6-4d8e525 · ↻ Re-run review
| Ok((file, size, hex::encode(hash.finalize()))) | ||
| }) | ||
| .await??; | ||
| let route = format!("/v1/sandboxes/{sandbox}/file-uploads/{}", Uuid::new_v4()); |
There was a problem hiding this comment.
[P1] Must fix: Pin the resolved sandbox throughout the upload
Every request re-resolves the original prefix. If its sandbox is deleted and another matches, the 404/reopen path uploads into that other sandbox (reproduced). Pin subsequent requests to the first acknowledged sandboxId.
| if next.complete { | ||
| return Ok(next.sandbox_id); | ||
| } | ||
| if progress.is_some() { |
There was a problem hiding this comment.
[P2] Must fix: Reset retries when reconciliation confirms progress
Reopening clears progress, so confirmed offset advances never reset retries. Four lost range acknowledgements abort a 32 MiB upload—even after commit (reproduced). Reset the budget when reconciliation confirms forward progress.
Summary
adapt files putnow uploads regular files larger than 16 MiB using the Platform file upload API. The CLI computes SHA-256 incrementally, sends 8 MiB ranges, and seeks to the offset confirmed by the server after a transient failure. Memory usage stays bounded as file size grows.The command syntax and output are unchanged. The small-file path, stdin uploads and downloads retain their existing behavior. Release this after the node and API changes are deployed. Goblin node · Platform API
Verification
cargo test --lockedand Clippy for all targets.adapt files putagainst a local Platform API backed by a real Goblin VM and uploaded an 18 MiB file using a sandbox ID prefix.