feat(core): cut the remaining five bridges over to createBridgeMesh - #59
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ 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. |
Mearman
force-pushed
the
feat/p2-remaining-bridges
branch
from
September 11, 2026 18:35
e754f68 to
c290f36
Compare
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: e754f68c29
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
codex, claude-code, opencode, pi, and user/controller.ts all repeated the same four-line block constructing MeshStore/TlsTransport directly against identity.fingerprint. Replace each with createBridgeMesh, matching the mcp bridge's own cutover and completing step 5 of P2's sequencing: every bridge now runs on WireMeshTransport with peerId derived from the device-id. user/controller.ts's constructor takes an optional coordinatorPort, which createBridgeMesh already accepts as its own second argument, so no adaptation was needed there beyond the substrate swap itself.
uniquePort() returned an OS-assigned free port plus an ever-growing offset, and every caller then added another 100 on top to derive a second port. When the OS happened to hand back a port already near the top of the valid range, the combined offset pushed the result past 65535, failing with ERR_SOCKET_BAD_PORT -- reproduced directly while running the suite in this session. Each port a test needs is now its own independent call to the OS for a free ephemeral port, with no arithmetic layered on top, removing the overflow entirely. The original offsetting existed to guard against two rapid findFreePort() calls returning the same port; that guard was misplaced, since the OS already won't hand out a port currently bound by an open listener, and two independent free-port lookups are not exposed to the same risk this fix removes.
Mearman
force-pushed
the
feat/p2-remaining-bridges
branch
from
September 11, 2026 19:16
c290f36 to
312703a
Compare
|
🎉 This PR is included in version 1.33.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Sep 11, 2026
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.
Stacked on #58 (needs its
createBridgeMeshfactory). Completes step 5 of #47's sequencing: every bridge (codex, claude-code, opencode, pi, user/controller.ts) now runs on WireMeshTransport via createBridgeMesh, matching the mcp bridge's own cutover in #58.Also included: a real, reproducible test-infra bug found while running the full suite to verify this change.
uniquePort()inapproval.integration.test.ts/wire-mesh-transport-approval.integration.test.tsderived a second port by adding an arithmetic offset to an OS-assigned free port; when the OS handed back a port already near the top of the valid range, the combined offset pushed the result past 65535 and the test failed withERR_SOCKET_BAD_PORT. Fixed by asking the OS for each port independently instead of deriving one from another.All 92 tests pass, typecheck and lint clean.