Repository navigation
test(link): isolate the remote-prelude tests from a host-installed ocx - #6726
sungyongcho wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe SSH argument tests use a temporary PATH containing a ChangesSSH argument tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The change isolates the POSIX SSH argument tests from a host-installed 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
✅ Deterministic PR hygiene checks passed. |
|
@coderabbitai review |
|
To use Codex here, create a Codex account and connect to github. |
✅ Action performedReview finished.
|
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
1a1bf8f to
8ebf15e
Compare
|
@coderabbitai review |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
#6787) * test(link): isolate the remote-prelude tests from a host-installed ocx * test(link): document the stub ocx helper in the remote-prelude tests Carries #6726 so it runs under repository CI. Co-authored-by: Sungyong Cho <[email protected]> --------- Co-authored-by: Sungyong Cho <[email protected]>
|
Thank you, @sungyongcho! This change landed on |
Summary
Two tests in
tests/clients/link-ssh-argv.test.tsfail on any host that already hasocxin/usr/bin. The OpenCodex desktop .deb is one example, because it installs/usr/bin/ocx. The failing tests are:Both run the remote prelude with
PATH=/usr/bin:/binas the simulated remote PATH, and both expect the stub in~/.bun/binto run. The prelude appends~/.bun/binafter the remote PATH on purpose, so that anocxthe remote PATH already resolves wins. A sibling test asserts exactly that. On such a host the real/usr/bin/ocxruns instead of the stub, and the tests fail. CI runners have noocxin/usr/bin, so CI never sees this.The two tests now use a remote PATH that holds only an
shsymlink to/bin/sh. That is enough, becauseremoteOcxArgvrunssh -cand the stubs use#!/bin/sh. The first test's expected PATH line follows the new base. Production code and the other tests are unchanged.I found this while running the full suite for #6722.
Verification
Run on Ubuntu 26.04 with the
open-codex2.80.0 .deb installed, wherecommand -v ocxunderPATH=/usr/bin:/binresolves to/usr/bin/ocx:bun test tests/clients/link-ssh-argv.test.ts: 16 pass / 2 fail ondev(the two tests above), 18 pass / 0 fail on this branch.REMOTE_OCX_SCRIPTto prepend the fallback directories instead of appending them, and 3 tests fail on this branch. They include the PATH-line test and "an ocx the remote PATH already resolves wins over the appended fallbacks", so the ordering contract is still enforced.bun run test:changed(merge basebbab02ab27): 18 pass / 1 skip / 0 fail. The skip is the Windows-only PowerShell test.devaeebf11e5a(head8ebf15ec3f):bun test tests/clients/link-ssh-argv.test.tspasses 18 / 0 on this host, andbun run typecheckandbun run privacy:scanpass. The second commit only adds a doc comment to thefakeOcxhelper, which brings CodeRabbit's docstring pre-merge check from 50% to 100%.bun run typecheck,bun run structure:check,bun run privacy:scan: pass./bin/shexists there, and these tests stay skipped on Windows as before.Checklist
Summary by CodeRabbit
~/.bun/binstub runs, and command arguments remain intact. These checks help ensure remote SSH commands continue to find required tools and preserve arguments when the initial PATH contains only a shell.Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.