Repository navigation
fix(extensions): bound split native-host header copies - #35359
Merged
OrcaWin merged 1 commit intoOct 29, 2026
Merged
Conversation
OrcaWin
force-pushed
the
OrcaWin/native-host-header-fragment-copy-independent
branch
from
October 29, 2026 01:00
32f485d to
843b2ae
Compare
OrcaWin
marked this pull request as ready for review
October 29, 2026 01:00
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Low impact] The PR appears safe to merge. SummaryThe PR limits temporary copies of split native-host headers to four bytes.
Reviews (1) · Last reviewed commit: "fix(extensions): bound split native-host..." · Reviewed by Greptile |
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.
When a native host splits its four-byte header across stdout chunks, Orca repeatedly concatenates the accumulating message body just to read the size. Limit that temporary concat to the four header bytes. Final message assembly and the incoming 1 MiB limit retain their existing behavior.
Actual production-reader measurements for a valid 1 MiB JSON message, with a one-, two-, or three-byte initial header fragment:
The 24 before/after rows preserve exact output. An intact header retains its single final concat. Five original framing tests pass on both variants; final focused preload/main-world/ports/process/framing validation passes 42 tests across five suites. Node typecheck, targeted formatting and all nine changed-code quality groups pass. Normal precommit hooks pass. Six source inputs match the measured proposal, and the original evidence seal is verified.
Rebased onto main
ed7fe7d5dc7(head843b2ae973, same one-line diff). The requiredORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2passed on the rebased head: 20/20 checks in 411.4s. The author's pre-rebase run on32f485dpassed 19/19 in 177.4s. The existing framing test splits the header at byte 1 and byte 3 with body bytes in the same chunk, so a truncated header concat would fail it. The copy counts are not native CPU or latency evidence.This is a one-line desktop reader change, pre-existing since #30940. Native-endian framing, failure handling, coalesced output, remote wire compatibility and workspace routing use the existing code. The separate retained-carry issue is outside this fix. Measurements use actual production TypeScript, real Node Buffers and a counting wrapper delegated to native Buffer.concat, on Linux/Node 26.8.1. No native host, Electron UI, CPU/latency, physical heap, macOS or Windows result is claimed.
Evidence:
/home/neil/.local/state/orca-electron-audit/native-incoming-framing-candidate/report.md,operation-results.json, source manifest/integrity; author logs, exact source verification and commit bundle innative-host-header-fragment-candidate/implementation/.