Conversation
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ hypeman-openapi studio · code · diff
✅ hypeman-typescript studio · code · diff
✅ hypeman-go studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
f465ad9 to
ba5d106
Compare
There was a problem hiding this comment.
Automated risk assessment: High risk.
Why this is high risk (from code diff evidence):
- Introduces a new cross-server snapshot transfer subsystem in
lib/snapshottransferwith substantial new production logic (manager,store,manifest, session state, error handling). - Adds new API handlers/routes and request flow in
cmd/api/api/snapshot_transfers.goplus OpenAPI contract changes inopenapi.yamland regenerated bindings inlib/oapi/oapi.go. - Wires new behavior through app startup/config/providers (
cmd/api/main.go,cmd/api/config/config.go,lib/providers/providers.go,cmd/api/wire*.go) and touches hypervisor snapshot fork paths. - Large multi-file behavioral change with async/resumable transfer semantics and broad blast radius.
Decision:
- Code review required.
- Not auto-approving (High-risk PRs are never auto-approved).
- Requested reviewers:
@rgarcia,@hiroTamada.
…er-push-resumable # Conflicts: # cmd/api/config/config.go # lib/network/bridge_linux.go # lib/oapi/oapi.go
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.


Summary
snapshottransfersubsystem implementing source-initiated async push transfers with durable job/session stateKey behavior
POST /snapshots/{snapshotId}/transfers)Validation
go test ./lib/snapshottransfer/...go test ./cmd/api/api -run 'SnapshotTransfer|SnapshotImportSession' -count=1deft-kernel-dev) targeted suite:go test ./lib/snapshottransfer/... -count=1go test ./cmd/api/api -run "SnapshotTransfer|SnapshotImportSession" -count=1(Repository-wide
make test-linuxcurrently has pre-existing unrelated integration instability on the host; targeted transfer suite passes.)Note
Medium Risk
Introduces new authenticated data-transfer endpoints and a background manager, and adjusts hypervisor snapshot config rewriting and Linux netlink address querying, which could affect snapshot restore/fork and networking if edge cases were missed.
Overview
Adds cross-server snapshot transfer support to the API by wiring a new
snapshottransfer.ManagerintoApiService, starting it at app boot, and exposing endpoints to start/list/get/cancel transfers and to manage destination-side import sessions (preflight, create/get, chunk upload, complete, cancel).Extends configuration with
snapshot_transfer.max_concurrent(defaults + validation + example configs) and adds targeted API tests for transfer and import-session behaviors.Improves snapshot fork path rewriting for both Cloud Hypervisor and QEMU by also rewriting references to the snapshot data root (e.g.,
/system,/imagespaths), and hardens Linux bridge state detection by retryingnetlink.AddrListon intermittent dump interruptions;formatTcRateis moved intolib/network/rate.gofor reuse.Written by Cursor Bugbot for commit a1b03f0. This will update automatically on new commits. Configure here.