Skip to content

feat(relay): route forwarding through ForwardTcp - #1029

Merged
drew merged 4 commits into
mainfrom
os-88-forwardtcp-relay/pml
May 12, 2026
Merged

feat(relay): route forwarding through ForwardTcp#1029
drew merged 4 commits into
mainfrom
os-88-forwardtcp-relay/pml

Conversation

@pimlock

@pimlockpimlock commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Route SSH and service forwarding through the generic gRPC ForwardTcp byte stream, backed by targetable supervisor relays.

This validates the OS-88 approach of using one dumb TCP forwarding path for both OpenSSH proxying and sandbox-local service forwarding, while removing the old HTTP /connect/ssh tunnel.

Related Issue

OS-88

Changes

  • Add ForwardTcp, TcpForwardFrame, and targetable relay protobuf messages for SSH and loopback TCP targets.
  • Move OpenSSH ProxyCommand traffic and openshell forward service through ForwardTcp with token validation and connection accounting.
  • Remove the HTTP /connect/ssh route and replace HTTP-tunnel session lifecycle code with shared SSH session persistence/reaping.
  • Dial TCP service targets from the sandbox network namespace and keep the target scope loopback-only.
  • Update OCSF relay logging, architecture docs, and sandbox docs.

Testing

  • mise run pre-commit passes
  • Live navigator gateway deploy verified with cluster-deploy-fast.sh all
  • sandbox exec over the updated SSH path returns os88-exec-ok
  • OpenSSH ProxyCommand over ForwardTcp(target.ssh) returns os88-ssh-ok
  • openshell forward service to sandbox-local HTTP server returns os88-service-ok
  • Relay benchmark run captured locally in architecture/plans/perf-os88-forwardtcp.txt

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@copy-pr-bot

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

@pimlockpimlock changed the title feat(relay): route forwarding through ForwardTcpfeat(relay): [SPIKE] route forwarding through ForwardTcpApr 28, 2026
@pimlock

pimlock commented Apr 28, 2026

Copy link
Copy Markdown
CollaboratorAuthor

OS-88 ForwardTcp performance results

Benchmark source: openshell 0.0.37-dev.39+g2646b8c6, ITERS=15, N_STORM=50.

MetricResult
Exec latency p50 / p950.170 s / 0.219 s
Connect latency p50 / p950.559 s / 0.778 s
Bulk stdout 50 MiB461.2 Mbps
Upload 50 MiB tar-over-SSH393.0 Mbps
Download 50 MiB tar-over-SSH249.4 Mbps
Small-frame 10,000 lines0.181 s
10x parallel 1s execs1.198 s, 0 failures
20x parallel zero-sleep execs0.302 s, 0 failures
50-relay storm wall time3.717 s, 0 failures
Rapid churn 50x exec true8.250 s, 0 failures
Peak non-loopback supervisor TCPs3 baseline / 3 peak

Comparison note: against the prior gRPC tuned run, exec-oriented metrics were mostly faster, bulk stdout throughput was lower, and connect latency was slower. Since those runs used different clusters, treat latency and throughput deltas as directional rather than exact regressions. The key architectural result holds: a 50-relay storm keeps supervisor-to-gateway non-loopback TCPs flat at baseline.

@pimlockpimlock self-assigned this Apr 28, 2026
@pimlockpimlock added the test:e2e Requires end-to-end coverage label Apr 28, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/1029 is at {"messa while the PR head is 6c2cafa. A maintainer needs to comment /ok to test 6c2cafaefa69a55efe26eb74d2793b220a63f95e to refresh the mirror. Once the mirror catches up, re-run Branch E2E Checks from the Actions tab.

@pimlock

Copy link
Copy Markdown
CollaboratorAuthor

/ok to test 6c2cafa

@pimlock

Copy link
Copy Markdown
CollaboratorAuthor

/ok to test 52fba8a

Comment threadcrates/openshell-cli/src/main.rs Outdated
@pimlock

This comment was marked as outdated.

@drewdrew changed the title feat(relay): [SPIKE] route forwarding through ForwardTcpfeat(relay): route forwarding through ForwardTcpMay 12, 2026
@drew
drewforce-pushed the os-88-forwardtcp-relay/pml branch from d8ce07e to b9ebd99CompareMay 12, 2026 02:52
@copy-pr-bot

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@drew
drew marked this pull request as ready for review May 12, 2026 02:53
@drew

drew commented May 12, 2026

Copy link
Copy Markdown
Collaborator

/ok to test b9ebd99

@drew
drewforce-pushed the os-88-forwardtcp-relay/pml branch from b9ebd99 to 9af8de3CompareMay 12, 2026 03:08
drew
drew previously approved these changes May 12, 2026
TaylorMutch
TaylorMutch previously approved these changes May 12, 2026
@drew
drew dismissed stale reviews from TaylorMutch and themself via b59c6edMay 12, 2026 04:21
@drew
drew merged commit 5abc36c into mainMay 12, 2026
25 of 27 checks passed
@drew
drew deleted the os-88-forwardtcp-relay/pml branch May 12, 2026 04:23
@drewdrew linked an issue May 15, 2026 that may be closed by this pull request
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2eRequires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runtime Reliability

3 participants

@pimlock@drew@TaylorMutch