Repository navigation
Conversation
nwparker
force-pushed
the
oom/11-b-providers-usage
branch
from
July 24, 2026 07:48
c4f8a58 to
cc3d8f7
Compare
nwparker
force-pushed
the
oom/11-b-providers-usage
branch
from
July 25, 2026 02:21
cc3d8f7 to
232dc84
Compare
nwparker
force-pushed
the
oom/11-b-providers-usage
branch
from
July 25, 2026 02:39
232dc84 to
90a6967
Compare
nwparker
force-pushed
the
oom/11-b-providers-usage
branch
from
July 25, 2026 03:10
90a6967 to
5ba5b23
Compare
Files: 75 applied, 0 deleted (from 6eb70d8) Co-authored-by: Orca <help@stably.ai>
nwparker
force-pushed
the
oom/11-b-providers-usage
branch
from
July 25, 2026 03:34
5ba5b23 to
0830b4d
Compare
Contributor
Author
|
Superseded by #10548, which re-scopes this work to the bound-at-ingress doctrine (see #10533 and An audit found the original #10179 scope was ~50x the size of the fix for the crash it targeted, and that bounds had landed ahead of their callers. Every file in these slices was re-adjudicated individually: ingress bounds (transport frames, PTY flow control, on-disk transcripts, parsing, enumeration, media decode, user-keyed accumulators) were kept; interior ceilings behind an already-bounded input were dropped. 1,882 files → 1,155, full suite green, and no No memory protection was lost — only speculation. |
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.
OOM hardening slice 12/29 — bound SSH remote payloads, flow control & roster
Summary
Re-lands the SSH slice of the OOM-fix: bounds every unbounded SSH accumulator — relay frame decoder, JSON-RPC encode/parse, file/git stream reassembly, SSH-config Include expansion, connection-generation registry, directory transfers, key-file reads, remote-probe outputs, port-scan results, relay marker/log/listing reads, and system-SSH stderr tails — with explicit count/byte/depth/concurrency ceilings and matching regression tests.
ELI5
Orca talks to remote machines over SSH. Before, several places would keep swallowing whatever the far side sent — a giant file, a huge config, a flood of tiny packets — until Orca ran out of memory and crashed. This change puts a sensible "that's too big, stop" limit on each of those spots. The limits are set high enough that normal work never notices, but a broken or malicious remote can no longer balloon memory. A few things now get politely truncated (long error messages, oversized logs) instead of kept whole.
Proof of OOM fix
Regressions
Normal-path (ordinary use, below the new limits):⚠️ needs sign-off:
**behavior./Users/nwparker/orca/workspaces/orca/oom-followup/src/main/ssh/ssh-config-bounded-glob.ts:55-65appliespath.matchesGlobto exactly one directory segment, while/Users/nwparker/orca/workspaces/orca/oom-followup/src/main/ssh/ssh-config-include-expander.ts:158-176routes every glob through it. A normalInclude **/*.conftherefore imports only files exactly one directory below the config directory, omitting root-level and deeper aliases that BASE'sfs.globSyncimported. (trigger: A user's SSH config uses a recursive Include such asInclude **/*.conf; this occurs below every new count, byte, and depth ceiling.)ssh-port-scanner.ts:79-84viaSSH_DETECTED_PORTS_MAX_ENTRIES = 50). On a busy but legitimate shared/server remote with more than 50 listening endpoints, later development ports disappear from Orca's detected-port UI. (trigger: The remote reports more than 50 detected listening ports in one scan.)Overload-only (extreme input / sustained backpressure) — intended, documented degradations:
SshDirectoryTransferCapacityErrorbeyond 4,096 entries, depth 64, 16 MiB per file, or 32 MiB total; Windows system-SSH packaging is additionally capped at 48 MiB. Concurrent local source mutation is also detected and fails instead of being silently skipped/completed. (only when: The relay deployment bundle exceeds a transfer ceiling, or the local bundle changes type/size while upload is in progress; the current fixed relay bundle is expected to remain well below the ceilings.)Build / CI
Adversarial review
CEILINGS VERIFIED AS OVERLOAD-ONLY:
CORRECTNESS CHECKS PASSED:
MINOR INACCURACIES IN PRIOR REVIEW (not defects):
RESIDUAL ITEM FOR HUMAN AWARENESS (low): the port scanner in this slice now routes relay results through admitSshDetectedPorts, whose cap SSH_DETECTED_PORTS_MAX_ENTRIES = 50 lives in src/shared/ssh-retained-payload-admission.ts (a different slice). It keeps only the first 50 detected listening ports surfaced to the UI/auto-forward. Ordinary single-developer remotes stay well under 50, so I did not classify this as a normal-path regression, but a very busy multi-service remote box could have some detected ports silently dropped from the port list.
src/main/ssh/ssh-connection-generation.ts: advanceSshConnectionGeneration() changed signature from number to number|null and now no-ops (returns null) for a target that has no retained lease, instead of creating/advancing one. Correctness depends on callers in src/main/ipc/ssh.ts (a different slice) first calling retainSshConnectionGeneration; verify the caller wiring lands together and handles null. Validated together at TARGET/CI.Files
75 files changed (+4032 / −904).
🤖 Decomposed, reviewed & assembled by Claude Code from the reverted #10179. Draft — do not merge out of order.