🤖 perf: shard OpenSSH exec paths and simplify SSH project sync#3125
🤖 perf: shard OpenSSH exec paths and simplify SSH project sync#3125
Conversation
|
@codex review |
01c559b to
b2cc683
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01c559b110
ℹ️ 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".
b2cc683 to
4c51e09
Compare
|
@codex review |
4c51e09 to
09b6354
Compare
|
@codex review |
09b6354 to
5000faf
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5000faf832
ℹ️ 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".
5000faf to
f42ea83
Compare
|
@codex review |
f42ea83 to
6850d04
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6850d04db6
ℹ️ 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".
6850d04 to
7107b20
Compare
|
@codex review |
7107b20 to
f3db47b
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3db47b065
ℹ️ 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".
f3db47b to
e2b8aa6
Compare
|
@codex review |
e2b8aa6 to
0d5eb46
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d5eb4674e
ℹ️ 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".
0d5eb46 to
a1a00b0
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1a00b0b3c
ℹ️ 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".
a1a00b0 to
6253e8f
Compare
|
@codex review Addressed the latest transport/path feedback:
Revalidated locally:
|
f84fffe to
37666f6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37666f614e
ℹ️ 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 I updated the affected service tests to match the now-gated SSH primary-path behavior and force-pushed the refreshed commit. |
37666f6 to
a7767a8
Compare
|
@codex review Addressed the latest review:
Revalidated locally:
|
a7767a8 to
dde79ef
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dde79ef854
ℹ️ 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 the remaining legacy-root issue by seeding the fork source runtime from the persisted workspace path before branch detection/fork orchestration. Revalidated locally:
|
dde79ef to
00a933c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00a933c0f8
ℹ️ 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 the latest review:
Revalidated locally:
|
00a933c to
b683814
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b683814c94
ℹ️ 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".
Collapse the SSH scaling redesign around a simpler sharded OpenSSH transport, hashed project layout, and higher-level integration coverage. Delete the explicit OpenSSH master pool and project sync coordinator, remove remote branch-metadata persistence and legacy layout inference, and keep a serialized per-project sync path with current-snapshot reuse validation. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$219.50`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=219.50 -->
|
@codex review Addressed the remaining queue-tail issue by keeping the project sync tail registered until the prior sync actually settles, even if an intermediate waiter aborts. Revalidated locally:
|
b683814 to
e812fc9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e812fc96d5
ℹ️ 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".
Loop after waiting on another host probe so callers re-validate the requested sharded ControlPath before returning, and cover the regression with a targeted singleflight test. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$269.00`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=269.00 -->
|
@codex review Addressed the remaining inflight shard readiness issue by looping after an existing probe completes so each caller re-validates its requested |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed8fe808e5
ℹ️ 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".
Fail fast when SSH runtime helpers are asked to reconstruct an execution root without a persisted workspace path, while preserving the runtime-path fallback for non-SSH unit-test scenarios. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$269.00`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=269.00 -->
|
@codex review Addressed the SSH workspace-path regression by requiring a persisted workspace path before |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58a9293d0d
ℹ️ 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".
Use each existing SSH worktree's reported common git dir for rename/delete operations so upgraded legacy layouts keep working, and bound follow-up shard probes to the remaining acquire budget after waiting on an inflight probe. --- _Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$269.00`_ <!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=269.00 -->
|
@codex review Addressed the follow-up SSH issues by resolving the actual worktree common git dir before rename/delete commands on upgraded legacy layouts, and by bounding post-singleflight shard probes to the remaining acquire budget with a regression test. |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ 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
This keeps the SSH scaling wins that matter in practice — sharded OpenSSH exec paths, serialized same-project sync/import work, hashed remote project layout, and persisted SSH workspace roots where they still match a known checkout shape — while deleting the explicit master-pool/coordinator machinery and replacing most mock-heavy runtime unit suites with higher-level SSH integration coverage.
Background
The original branch tackled real SSH bottlenecks: one implicit control socket per host, duplicate same-project bundle imports, and basename-derived remote roots that could collide. But the first implementation grew into an app-managed OpenSSH master scheduler with a large amount of lifecycle, compatibility, and mock-test surface area. This revision deliberately simplifies the design so the branch still improves SSH scalability without carrying most of that maintenance burden.
Implementation
ControlPaths viaControlMaster=auto, keepsshConnectionPoolas the single bootstrap/backoff layer, re-check requested shard readiness after waiting on another inflight probe, and cap any follow-up shard probe to the remaining acquire budgetSSHRuntimeto one hashed remote project layout, one serialized per-project sync path, one current-snapshot marker, and ref-manifest validation before snapshot reuserefs/mux-bundle/*and UUID bundle temp paths, but remove the explicitopenSshMasterPool,projectSyncCoordinator, remote branch-metadata persistence, and hot-path legacy layout auto-detection layerssshConnectionPooland legacy-worktree regressionsValidation
make typecheckmake static-checkbun test ./src/node/runtime/runtimeHelpers.test.tsbun test ./src/node/runtime/sshConnectionPool.test.tsbun test src/node/services/workspaceProjectRepos.test.ts src/node/services/workspaceService.test.ts src/node/services/workspaceService.multiProject.test.tsTEST_INTEGRATION=1 bun x jest tests/runtime/runtime.test.ts --runInBand --testNamePattern='SSHRuntime'TEST_INTEGRATION=1 bun x jest tests/runtime/runtime.test.ts --runInBand --testNamePattern='legacy base repo for upgraded SSH worktrees'Risks
Moderate. The simplified transport no longer has the same theoretical ceiling as the previous explicit master-pool design, but it still improves on the original baseline by removing the single implicit host-wide control path from short-lived SSH execs. The main compatibility edge is that SSH workspaces rooted outside the known canonical or legacy checkout shapes now fall back to the canonical hashed layout and may need re-init instead of transparent path inference.
Pains
The original explicit-pool direction accumulated a lot of policy and mock-test code. The cleanup work here was mostly about deleting that surface area without giving back the core scaling fixes, which in turn meant shifting confidence into the real Docker-backed SSH integration harness.
Generated with
mux• Model:openai:gpt-5.4• Thinking:xhigh• Cost:$269.00