🤖 perf: replace git bundle with native git push for SSH runtime#3137
🤖 perf: replace git bundle with native git push for SSH runtime#3137
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8ebe97490
ℹ️ 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".
|
@codex review Addressed feedback: expanded the incremental fallback to cover the entire upload + import cycle, not just the upload step. Extracted |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
0315409 to
65cb908
Compare
|
@codex review Complete rewrite of the sync approach: replaced git bundle upload with native |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65cb90850d
ℹ️ 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".
|
@codex review Addressed both items:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f695b16094
ℹ️ 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".
|
@codex review Fixed: strip |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52dfea029a
ℹ️ 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".
|
@codex review Addressed both:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c14bbadfcd
ℹ️ 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".
|
@codex review Addressed with documentation: added a NOTE comment explaining the SSH transport coupling.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a1bfcfee4
ℹ️ 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".
|
@codex review Fixed: switched from SCP-style ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd6292259b
ℹ️ 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".
|
@codex review Fixed: split |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76ac2d68a0
ℹ️ 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".
|
@codex review P2 fixed: SSH failure detection now uses the structured P1 (SSH2/OpenSSH): This concern was addressed in a previous round with a code comment (lines 1038–1043). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e312f8c4d
ℹ️ 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".
|
@codex review Fixed: relative paths in |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 574390b717
ℹ️ 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".
|
Note for human reviewer: Codex has raised the SSH2 transport concern three times across three review rounds (rounds 6, 8, and 10), each time as a P1. Each variation has been addressed:
The SSH2 transport on Windows is a narrow edge case. Git for Windows bundles Pausing for human direction on this point — the other feedback items have all been addressed and CI checks are passing. |
574390b to
daa6216
Compare
|
@codex review |
daa6216 to
72a9603
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72a9603e53
ℹ️ 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".
72a9603 to
a1e4ca9
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1e4ca9757
ℹ️ 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".
Replace the git-bundle-create + SSH-pipe + git-fetch-bundle workflow with a single `git push` over SSH. Git's smart protocol natively negotiates which objects the remote already has, transferring only the delta. This makes subsequent workspace creations near-instant on slow connections. What changed: - syncProjectToRemote() now runs `git push --force --atomic` with a GIT_SSH_COMMAND that mirrors the runtime's SSH config (port, identity file, ControlPath multiplexing, host key policy) - Removed transferBundleToRemote() and all supporting bundle machinery (pipeReadableToWebWritable, waitForProcessExit, temp file cleanup) - Removed spawn/ChildProcess imports (no longer needed) - shouldReuseCurrentBundleTrunk() skip-if-unchanged check is preserved as an optimization to avoid even running git push when refs match
a1e4ca9 to
13bbfc3
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Replaces the git-bundle-create → SSH-pipe → git-fetch-bundle workflow with a single
git pushover SSH. Git's native smart protocol negotiates which objects the remote already has, transferring only the delta. This makes subsequent workspace creations near-instant on slow connections instead of re-uploading the entire repository history every time.Background
When the SSH runtime creates a new workspace, it syncs the local project to the remote. Previously, this always created a full git bundle (
git bundle create - --branches --tags) containing the entire reachable history, piped it byte-by-byte over SSH to a temp file, then imported it withgit fetch. Even if only one commit changed since the last sync, the full repo was re-uploaded.The remote already has:
.mux-base.git) that can receive pushes nativelySo the bundle approach was reimplementing what
git pushdoes natively with its pack negotiation protocol.Implementation
The core change is straightforward —
syncProjectToRemote()now runs:with
GIT_SSH_COMMANDset to mirror the runtime's SSH config (port, identity file, ControlPath multiplexing, host key policy). This preserves the existingrefs/mux-bundle/*staging namespace and tag handling.New:
buildGitSshCommand()— constructs the SSH command string from the runtime's config, matching OpenSSHTransport'sbuildSSHArgs()settings.Removed (163 lines):
transferBundleToRemote()— bundle creation + SSH pipe uploadpipeReadableToWebWritable()— streaming helper only used for bundleswaitForProcessExit()— only used by bundle uploadspawn/ChildProcessimportsPreserved:
shouldReuseCurrentBundleTrunk()— the skip-if-unchanged optimization that avoids sync entirely when all refs already match. This still works becausegit pushpopulates the samerefs/mux-bundle/*namespace.Risks
Low. The refspec mapping is identical (
+refs/heads/*:refs/mux-bundle/*,+refs/tags/*:refs/tags/*), so the remote base repo ends up in the same state. TheshouldReuseCurrentBundleTrunkskip logic, worktree creation, and all downstream code are unchanged.--atomicensures that if any ref update fails, none are applied — preventing partial sync states.--forceensures we always sync to the local state even after history rewrites.Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$6.97