Repository navigation
Conversation
akirillo
requested review from
DamianB-BitFlipper,
JannikSt,
JohannesHa,
burnpiro,
cabrinha,
eexwhyzee,
kcoopermiller,
kennethnym,
mrmoxon and
willccbb
as code owners
November 5, 2026 21:10
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8c0363021
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
akirillo
force-pushed
the
feature/sandbox-volumes-sync
branch
3 times, most recently
from
November 19, 2026 01:15
56b4c69 to
206ce72
Compare
SDK: Volumes.sync / AsyncVolumes.sync request a sync of one attached
volume of a running sandbox (POST /sandbox/{id}/volumes/{name}/sync,
body {discard}) and, with wait=True (the default), poll the sync GET
until DONE or FAILED within timeout_seconds (default 600s, the server's
own sync deadline). The wait shares the checkpoint waiter's poll pacing
(fixed fast cadence for the first seconds, then jittered exponential
backoff); the shared helpers moved to the new _polling module so both
waits use one law. FAILED raises the new VolumeSyncFailedError (a
RuntimeError) pointing at the sandbox's volume sync logs - the response
carries no error detail; expiry raises TimeoutError. The VolumeSync
model mirrors the ingress VolumeSyncResponse: sync_id, state
(UNMOUNTING | PUBLISHING | REMOUNTING | DONE | FAILED), head_id,
updated_at.
CLI: `prime sandbox volumes sync <name> --sandbox <id> [--discard]
[--no-wait]` waits by default and prints the synced head checkpoint on
DONE; FAILED exits 1 with "volume sync failed (state FAILED); see the
sandbox's volume sync logs" and a wait timeout hints to re-run (a
repeated request returns the same in-flight sync). --no-wait reports a
terminal state carried by the POST response itself: DONE prints the
completed sync, FAILED exits 1.
A wait finishing after the 10 s fast window was seen up to ~10 s late. Checkpoint and sync waits now back off to 2 s; sandbox creation keeps its 10 s cap.
Default the sync wait to 720 s so a server-side DEADLINE or ROLLBACK_FAILED arrives before the client gives up, pin the waiter to the sync it started (VolumeSyncSupersededError when another sync replaced it), and document the ROLLING_BACK state.
akirillo
force-pushed
the
feature/sandbox-volumes-sync
branch
from
November 19, 2026 08:27
063ffe9 to
9754aa9
Compare
This branch has not been deployed
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.
Adds
prime sandbox volumes sync <name> --sandbox <id> [--discard] [--no-wait]and the SDKVolumes.sync/AsyncVolumes.sync, driving the new platform endpointPOST/GET /api/v1/sandbox/{id}/volumes/{name}/sync(platform PR-A https://github.com/PrimeIntellect-ai/platform/pull/7459; design https://github.com/PrimeIntellect-ai/platform/pull/7436).syncbrings a volume mounted in a RUNNING sandbox to the volume's committed head. RW attachments publish first (platform PR-B),--discarddrops unpublished local writes._polling); prints the synced head checkpoint on DONE.--plainas for publish.{sync_id, state, head_id, updated_at, failure}; statesUNMOUNTING | PUBLISHING | REMOUNTING | DONE | FAILED;failure(nullable:BUSY | PUBLISH_FAILED | MERGE_FAILED | DEADLINE | NODE_ERROR | ROLLBACK_FAILED, platform PR #8119) is set on FAILED.FAILEDexits 1 withvolume sync failed: <failure>(BUSYadds the hint "a process in the sandbox holds the volume; close it and retry"), for both wait and--no-wait;VolumeSyncFailedError.failurecarries the code; wait expiry hints to re-run (a repeated request returns the same in-flight sync).--no-waitreports a terminal state carried by the POST response itself: DONE prints the completed sync, FAILED exits 1.VolumeSyncmodel mirrors the ingress schema;VolumeSyncFailedErroron FAILED;TimeoutErroron expiry.sandbox_idis the first parameter likepublish;timeout_secondsfollows SDK naming.Rebased onto main after #1099 (force removal, merge-aware publish wait, fast-then-backoff checkpoint polling); the sync wait reuses that shared poll pacing instead of its own backoff.
CHECKPOINT_POLL_MAX_DELAY), so a sync finishing after the 10 s fast window is seen within ~2 s, not ~10 s; sandbox creation keeps its 10 s cap.Release after the platform PR-A deploys.
sync_idthe POST returned; if another request replaced it,VolumeSyncSupersededError(CLI: exit 1, "run again") instead of reporting someone else's result. A re-run still POSTs: the server joins an in-flight sync and 409s on a--discardmismatch, which a GET-first would bypass.VolumeSyncdocs now listROLLING_BACK(failure already set while the volume is re-attached at its previous head).sandbox create --volume NAME:/path:rwparses:rw(previously mounted at the literal path/path:rw); unknown suffixes are rejected.volumes create --from: rsync shows--info=progress2(falls back to--progresson openrsync, which lacks it) and ssh runs withLogLevel=ERROR, so the 'Permanently added' warning is gone. Host-key pinning is not possible here: sandbox SSH sessions return no host key (unlike the volume sessionsvolumes.pypins); it needs an API change. Ownership is documented in--fromhelp, not mapped.sync --discardprints 'Discarded unpublished changes';ROLLBACK_FAILEDhints--discard.forkhelp says volumes are remounted at their published heads (platform #8228).