Repository navigation
Preserve Windows SSH upload failures unless pwsh is missing - #25185
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change adds Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No merge-blocking issue was identified in the Windows SSH upload fallback change. Normal checks can proceed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change narrows fallback eligibility and prevents filenames from being mistaken for evidence that PowerShell 7 is missing. No introduced security concern was identified. Existing upload ordering and execution privileges are preserved, but interrupted and concurrent behavior has not been validated against a live Windows SSH host in this review. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Narrowed pwsh-absence signal.
isPwshUnavailableErrornow rejects any error that is not aSystemSshCommandExitErrorand accepts only exit9009, the exact cmd.exe message,CommandNotFoundException: pwsh.exe, or a complete PowerShell NormalView record — so a staging filename or unrelated stderr can no longer mark PowerShell 7 absent. - Diagnostic carried on the error.
waitForChannelClosethrows a newSystemSshCommandExitError(message text unchanged) exposingexitCodeandstderr, letting the fallback classify on raw evidence rather than the formatted operation label. - Structural NormalView parser.
isPowerShellMissingPwshDiagnosticrejoins wrapped physical lines and checks the source line, 8-tilde underline,CategoryInfotarget, andFullyQualifiedErrorId, while rejecting repeated executable headers and mixed write errors. - Causal regression coverage. New
it.eachcases insystem-ssh-windows-upload.test.tsreproduce filename false positives, write-denied stderr, mixed errors, wrapped/localized records, timeout and short-source cases.
I verified the 65 tests in the touched test file pass, and confirmed the new cases fail against the predecessor predicate (reverted the classifier to its old message-regex, keeping the new error class) — so they genuinely pin the fix. I also confirmed the message format is byte-identical to before, so no other waitForChannelClose caller or error-consuming path changes behavior. No actionable findings.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
Updated this branch with current main in an ordinary merge. The three transfer-fallback files are unchanged; 145 tests in six files, all three typechecks, lint, format, and the changed-code checks pass. Fresh CI will validate this head. The earlier Linux SSH startup failure remains unexplained. Two separate diagnostic runs passed: the startup case alone, then the original two watcher tests followed by all five parking/startup tests. Both captured the startup command reaching the held shell and surviving reconnect. The observer affects timing, so these passes do not establish a cause or a flakiness fix. No diagnostic observer is included in this PR. |

ELI5
A Windows SSH upload that failed could be retried through the older PowerShell path merely because its filename contained
9009orpwsh.exe. Orca now keeps that failure unless the command result actually establishes that PowerShell 7 is missing.What Changed
Keep the command exit code and stderr on the existing SSH execution error while preserving its displayed message. The PowerShell fallback reads those fields instead of searching the formatted operation label. Generic timeouts and short-source errors do not change the host's capability verdict.
Accept the missing-command exit code or a complete missing-pwsh diagnostic. The PowerShell NormalView parser checks the command, source line, target, error class and final error identifier; it preserves horizontal separators while reconstructing wrapped physical lines and rejects repeated executable headers. Existing staging, publishing, timeout and transport order remain intact.
Why
The formatted label includes a staging filename, which is not evidence about the execution host. Reusing the existing capability fallback with a narrower error predicate preserves genuine missing-command recovery and propagates write errors. Parsing stable record identifiers avoids depending on localized explanatory prose or a fixed number of lines.
Linked Issue
Related to Windows SSH uploads in #16432 and the inherited verification failure in #25001. This correction does not close the broader upload issue or claim the original CI failure's unrecorded nonce as its sole cause.
Visual Proof
N/A — SSH file-transfer failure handling adds no rendered controls. Native missing-command stderr and complete raw before/after test output are retained.
Testing
f4e63382passes 145 tests across six files, all three desktop typechecks, full owned lint and formatting, changed-code checks and the configured repository scan.Localized and wrapped fixtures derive from the official formatter/resource sources; they are not claims of executing every locale or display width. The two direct diagnostic children have positive exit waits. The original and verifier outer Windows terminal stops remain unverifiable; their private diagnostic directory was positively observed absent while the verifier was running.
Review
Independent reviews verify the complete frozen source, all three owned files, every other file against named main
f199a20c, raw checks and the causal before/after controls. Main throughe8310d5ahas no changed files in this scope. Fresh public CI will validate the combined merge.Agent skill upstream boundary
Notes
The execution host owns capability results. This correction changes no wire fields, SSH command construction, interpreter selection, deadlines or retry policy. Local and folder workspace callers retain the same transfer path. No new live SSH/OpenCode runtime result is claimed for this commit.
Checklist