Repository navigation
Conversation
Adapted from the investigation and proposal by @andy-murr. Co-authored-by: andy-murr <andy-murr@users.noreply.github.com>
Adapted from the proposal by @carlosbaraza. Co-authored-by: carlosbaraza <carlosbaraza@users.noreply.github.com>
…nal-5197-ssh-agent-path # Conflicts: # src/relay/agent-exec-handler.ts
|
@coderabbitai review |
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughSSH commit-message operations now request login-shell execution. The relay supports this option for Bash and Zsh, preserves selected environment values, processes captured output, and reports missing binaries. The WSL captured-login-shell helper now uses an exported function to build nonce-marked commands. The terminal hook-order parity test updates its expected hook count and digest. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The SSH login-shell request reaches the relay as intended. No actionable merge-blocking risk is established by the reviewed changes. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is limited to opted-in remote generation on supported shells. Arguments remain separate from shell command text, and the existing unattended credential protections are applied before launch. Login startup files do introduce a conditional, user-controlled execution path that merits design review; no exploit is established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 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 critical issues — the login-shell change is sound. One error-classification regression and a small robustness nit are inline.
Reviewed changes
Reviewed the full 8-file diff against nwparker/external-5363-command-env (5170a86).
- Login-shell generation opt-in —
executeCommitMessagePlansendsloginShell: true;execNonInteractivedeliberately does not. Windows, unsupported POSIX shells, and non-boolean values fall back to the prior direct spawn. - Fenced login-shell argv builder (
agent-exec-login-shell.ts) — runsshell -ilcwithcd -- "$1"; exec "$@"through/usr/bin/env, so args and env stay literal argv data andexeckeeps cancellation targeting the real agent. - Relay spawn path (
agent-exec-handler.ts) — re-applies explicit env after startup files, spawns viaspawnProcess, and fencesstdout. - Fence builder extraction (
wsl-login-shell-command.ts) — behavior-preserving split enabling the SSH reuse. - Tests — real bash/zsh integration coverage for login-PATH discovery, literal argv/env, and cancel; updated spawn-option expectations.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior Pullfrog review (23edaa7 → 096bf3f), which merges the parent follow-up at 0acca9e2748 and resolves both prior findings.
- Missing-binary classification restored — a
/bin/sh -cguard nowcommand -vchecks the resolved binary after explicit env is applied, prints a per-callmissingMarkerand exits 127;finishmapsexitCode === 127 && slicedStdout === missingMarkertospawnError: spawn <binary> ENOENTwith empty stdout/stderr, so the client's actionable "not found / Install X there" wording returns. An agent's own exit 127 with output stays an ordinary failure. - Stream error guards extended — no-op
errorlisteners now cover stdin, stdout and stderr, retained after close, so a late broken pipe cannot crash the relay. - Regression coverage — the new bash/zsh test asserts the exact missing-binary result and a real agent exiting 127 without
spawnError, and the handler test emits stdout/stderr errors (including one after close). Verified locally: those suites pass (18 passed / 3 skipped on this runner).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior Pullfrog review (096bf3f → fe39145), which retargets the branch to main after #22427 landed and adds one guard fix.
- Kept inherited credential guards through login startup —
loginShellEnvnow retainsGIT_TERMINAL_PROMPT,GCM_INTERACTIVE,GIT_ASKPASS,SSH_ASKPASS, and everyGIT_CONFIG_*entry even when they match the relay's ownprocess.env, so/usr/bin/envre-applies the complete guard after the profile runs. - Added a real bash/zsh regression — stubs inherited guards and an adversarial profile, then asserts the agent sees the guarded values and the full indexed config (
GIT_CONFIG_COUNT=3plus the two appended entries). Confirmed it fails when the filter clause is removed. - Reformatted three unrelated test files (
594eb1e) to matchmain; no behavioral change.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Closing as obsolete after the merged SSH relay retirement in #27214 and #27215. This PR concerns the relay-backed remote Orca CLI bridge and agent execution. #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. |
|
Follow-up: on orcad, commit/PR generation runs on the host, and orcad merges the user's login-shell PATH at startup (#27319, nushell included via |

ELI5
SSH commit and PR generation should find agents installed by the remote user’s bash or zsh startup files.
What Changed
Opt only generation calls into a supported POSIX login shell. Pass cwd, executable and arguments as positional data; fence startup banners from returned output; preserve stdin and exec replacement for cancellation. Reapply explicit environment values and generated guards after startup so a profile cannot overwrite the caller’s chosen PATH or variables.
Why
This reuses the existing framed-shell capture and safe spawn abstractions. The new regression failed in both bash and zsh before the environment fix, and now passes without evaluating caller strings.
Linked Issue
Related to @andy-murr’s #5197; #4720 provides original context.
Visual Proof
Historical hidden-renderer proof from audit baseline
59c0d5585e30. A synthetic agent returns the fixed response through production Source Control UI; no paid agent request. These images illustrate unchanged behavior after the current-main merge.Before:

After:

Testing
The hook-order parity repair is now also on main as #23090. Latest follow-up
69ac62a406a2aligns only its provenance comment with that upstream version, removing the merge conflict; assertions and product code are unchanged. The full test file matches main byte-for-byte. All three focused parity tests, normal commit lint/format checks and a local merge check pass. All current-head checks have passed or been skipped as intended, including required PR Checks verification, changed-spec E2E, Docker SSH E2E and real WSL terminal validation.57 tests pass, two skip on macOS, with Node typecheck and changed-code quality passing before stacking. The combined actual-source suite (command parsing through relay execution) passes 292 tests with two skipped; it verifies explicit PATH and literal values against conflicting bash/zsh startup files. No authenticated OpenCode call, native Windows/WSL or deployed full SSH UI transport in this pass.
All tests used
ORCA_BACKGROUND_LAUNCH=1; no visible test window or real agent account was launched. Full lint, test suite and release packaging remain CI coverage.Review
After #22427 merged, integrated current
main(85ac14e9c263) without rewriting branch history. The PR now targetsmaindirectly and contains eight SSH-login source/test files plus the parity-test repair that now matches main; the main integration preserved all eight files from the prior reviewed head096bf3fb7dd3. Kept main’s updated environment-helper typing when resolving the parent’s squash overlap.A fresh independent review reproduced one additional edge in real bash and zsh: when the relay already inherited safe credential-prompt settings, the sparse environment override omitted them and a startup profile could reenable prompts.
fe3914586569now reapplies those guards and their complete indexed Git config after startup. The regression also proves inherited caller config survives.Fresh validation on
fe3914586569: 155 focused tests passed, 2 platform skips, Node typecheck passed, and changed-code quality passed with zero new findings across the eight files. All current-head checks have passed or been skipped as intended, including required PR Checks verification, changed-spec E2E, Docker SSH E2E and real WSL terminal validation. Final validation at69ac62a406a2completed all of those checks successfully.Addressed Pullfrog feedback in
0acca9e2748, then merged the parent follow-up into096bf3fb7dd3: missing agents again return actionable ENOENT errors, ordinary agent exit 127 remains distinct, and stream errors cannot crash the relay. Pullfrog’s review atfe3914586569was clean and confirmed the new credential-guard regression fails when the fix is removed. Both original threads remain resolved. The parity-only follow-up also passed Pullfrog; the latest comment-only alignment also passed Pullfrog, which verified the unchanged assertions and reported no new issues.Independently reviewed literal argv/environment handling, host ownership, Windows casing, WSL forwarding, cancellation/cleanup and mixed-version fallback. The original integration base was
996f9cc3068c.Agent skill upstream boundary
Notes
The environment-prefix change #22427 is merged. This PR is now independent and targets
main. Unsupported POSIX shells keep direct execution; old relays ignore the optional flag and retain prior behavior. Interactive startup files that block or consume stdin remain outside this fix.Checklist