Repository navigation
Conversation
Co-authored-by: Orca <help@stably.ai>
5 tasks done
Collaborator
|
SSH still works: Orca connects to the host over SSH and routes workspace operations through the managed remote Orca server (orcad). These merges remove the legacy SSH relay, not SSH support. Closing as obsolete after the merged SSH relay retirement in #27214 and #27215. This PR concerns the SSH relay server and its relay-only handlers. #27214 removed the desktop relay connection/fallback path; #27215 deleted the SSH relay server, deployment assets, and relay-only tests. SSH hosts now use the managed Orca server (orcad), and unsupported hosts fail explicitly, so this relay-specific work is no longer planned. This closes the proposed relay implementation; it does not claim that any independent local, WSL, or managed-server behavior was fixed. |
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.
Slice 11 of the re-landed OOM work. Base is
oom-slice-10-rate-limits(#10995) — review only the top commit.ELI5
The relay sits between Orca and work running on another host. Several parts of that connection could keep accumulating memory without a stopping point: fragmented protocol frames, parsed requests waiting for handlers, and large Git responses parked while a client acknowledged streamed chunks. A slow or hostile peer could keep enough of those objects alive to exhaust the relay process.
This slice gives every retained collection and payload an explicit ceiling. Oversized work is rejected with a typed error, while anything reported as successful remains complete and untruncated.
What changed
src/relay/protocol.tssrc/relay/client-request-aborts.tsandsrc/relay/dispatcher.tssrc/relay/git-handler.ts,src/relay/git-response-stream.ts, andsrc/relay/git-response-utf8-chunks.tsRelay tests
Proof the OOM fix works
Each bound was mutation-tested by replacing its constant with
Number.MAX_SAFE_INTEGERand rerunning the relay suite. Each named test below fails under that mutation. The tests assert the literal ceiling rather than seeding state relative to the constant, so they cannot pass merely because the implementation and test moved together.MAX_BUFFERED_FRAME_CHUNKShandshake framing > bounds retained chunk wrappers for an adversarially fragmented frameMAX_COALESCED_TINY_FRAME_CHUNK_BYTEShandshake framing > does not coalesce ordinary transport chunks while a frame is incompleteMAX_GIT_RESPONSE_STREAM_BYTESGitResponseStreamRegistry client ownership > rejects a response one byte past the stream ceilingMAX_CONCURRENT_GIT_RESPONSE_STREAMSGitResponseStreamRegistry client ownership > caps parked streams and defers base64 expansion until the pump runsMAX_ACTIVE_GIT_RESPONSE_STREAM_BYTESGitResponseStreamRegistry client ownership > caps aggregate bytes retained by concurrent parked responsesMAX_ACTIVE_RELAY_REQUESTS_PER_CLIENTClientRequestAborts > accepts the per-client request boundary, rejects overflow, and recoversMAX_ACTIVE_RELAY_REQUESTSClientRequestAborts > accepts the aggregate request boundary without evicting active clientsMAX_ACTIVE_RELAY_REQUEST_BYTES_PER_CLIENTClientRequestAborts > bounds retained payload bytes per client and releases the budget on deleteMAX_ACTIVE_RELAY_REQUEST_BYTESClientRequestAborts > bounds aggregate retained payload bytes and recovers after client abortThe former
MAX_GIT_RESPONSE_STREAM_CHUNKSceiling of 4,096 was deleted. A 64 MiB response split into 128 KiB chunks reaches at most 512 chunks, so the byte ceiling always binds first. Removing it removes a bound that could never fire.Proof of zero regressions
src/relay/agent-exec-handler.test.tsare pre-existing and reproduce on the base.worktree-logic×4,worktree-metadata-merge×1,worktree-name-suggestions.test×1).git merge-tree --write-tree --name-only origin/main HEADexits 0, so the rebased commit merges cleanly into real main.User-facing behavior changes
Below the ceilings, successful results are unchanged: there is no silent truncation and no data is dropped from anything reported as successful.
Above the ceilings, behavior now changes explicitly:
Made with Orca 🐋