Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
|
Thank you @zzzpyyy — your diagnosis was right, and I reproduced it end to end: a real managed-orcad deploy to a CentOS 7 host through an SSH gateway that cuts exec requests at 10 KiB and merges stderr fails on main with the exact error from #30491, and passes with your change. I've carried your commit unchanged (your authorship kept) into #30549, with a few follow-ups from review:
Closing this in favour of #30549 so it can run our CI directly. Thanks again for the careful fix. |
…d claims and snapshot verdicts through gateway noise On top of the gateway fix (#30503): - A host without base64 or gzip gets a long command plain: the compressed wrapper checks for its decoders before reading anything, exits 125 with a marker, and execCommand resends once with compressCommand: false and remembers that host. `base64 -D` covers macOS before 13, whose base64 refuses `-d`. - Snapshot capture, restore, presence and compare answers read the last line that is a verdict, so shell noise a stderr-merging gateway appends after it is ignored. - The machine claim reads the claim line by line, and every failed step now prints CLAIM_FAILED <step> <error> with the df line, so "orcad could not claim this host's .orca-remote" says what failed and how to fix it instead of exiting 65 with the raw command or failing with no reason. A failed write no longer leaves a partial file. Refs #30491
…commands (#30491) (#30549) * fix(ssh): preserve activation commands through SSH gateways * fix(ssh): fall back when a host cannot decode a long command, and read claims and snapshot verdicts through gateway noise On top of the gateway fix (#30503): - A host without base64 or gzip gets a long command plain: the compressed wrapper checks for its decoders before reading anything, exits 125 with a marker, and execCommand resends once with compressCommand: false and remembers that host. `base64 -D` covers macOS before 13, whose base64 refuses `-d`. - Snapshot capture, restore, presence and compare answers read the last line that is a verdict, so shell noise a stderr-merging gateway appends after it is ignored. - The machine claim reads the claim line by line, and every failed step now prints CLAIM_FAILED <step> <error> with the df line, so "orcad could not claim this host's .orca-remote" says what failed and how to fix it instead of exiting 65 with the raw command or failing with no reason. A failed write no longer leaves a partial file. Refs #30491 * test(ssh): size the simulated gateway cut from the command, not a fixed 10 KiB The snapshot command repeats its temp path ~40 times, so on CI's short /tmp it fell under 10 KiB and the truncation precondition failed. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: zzzpyyy <[email protected]> Co-authored-by: Claude <[email protected]>
ELI5
After an update, connecting to a remote machine could fail because an SSH gateway cut a long setup command in half. Send a smaller command so Orca can complete the state snapshot needed before activation.
What Changed
Terminatednotification otherwise followsCAPTUREDand makes a successful snapshot look like a failure.Why
The activation snapshot and restore scripts exceed the affected gateway's exec limit. Truncation breaks shell quoting before the script can run. Compression fixes the shared wrapper used by both SSH transports without adding a temporary upload or consuming stdin, which already carries protocol/file data.
The heartbeat cleanup was found by checking the resulting commands through the real gateway: compression allowed the snapshot to run, but merged job notifications still broke its result parser. Waiting for that child removes the notification at its source.
Linked Issue
Fixes #30491
Visual Proof
N/A
No UI changes. Before/after transport evidence:
Testing
147 tests passed, 7 skipped across seven related suites on macOS (unavailable shells and the Linux-only
/proccase were skipped). The two gateway regression cases fail with the original wrapper. Real SSH validation used disposable fixtures on a Linux host behind the affected gateway and removed them afterward.Oxlint, Oxfmt and
git diff --checkpassed for the changed files. Full dependency installation hitENOSPC, so the focused suites used a temporary installation with the pinned Vitest version and required dependencies. Full typecheck/build remain for CI; the local typecheck could not loadelectron-vite/nodefrom the incomplete development environment.AI Disclosure
Implemented and tested with OpenAI Codex (GPT-6).
Review
Self-reviewed shell quoting, decoder failure behavior, stdin ownership, heartbeat cleanup and preservation of snapshot/fence checks.
Agent skill upstream boundary
Notes
Compressed POSIX requests require
base64andgzipon the remote host; short requests retain the decoder-free printf form. Compression is best effort: incompressible commands keep their original representation, so this does not impose or guarantee a universal exec-size ceiling. Windows commands retain their existing wrapper bypass. No remote Orca protocol/version change is required.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)