Repository navigation
test(wsl): find the chat lane's claude on the guest PATH, with a Windows-side decoy - #34551
Conversation
|
No actionable comments were generated in the recent review.
|
…ever ran; record probe errors
|
No actionable comments were generated in the recent review.
|
…ever ran; record probe errors
ELI5
The real-WSL test lane already proves that a native Claude chat runs inside a WSL distro through the WSL host's server. But it told the server exactly which
claudeto run, so it never checked whether the server can find a user's own install. This PR removes that shortcut, so the server has to findclaudethe way it would for a real user. It also puts a fake Windows-sideclaudewhere WSL exposes Windows programs, to check that the Windows one never gets used by mistake.What Changed
Test-only: lane test code that
wsl-orcad-e2e.ymlalready runs. The workflow file itself is unchanged, and nothing that ships changes.claude. The fixture CLI is installed as~/orca-lane-chat-bin/claude, and the launch phase puts that directory first on PATH in the login profile, next to the existingSSH_AUTH_SOCKexport. Each chat now asserts two things: the provider's script is the guest fixture, and the wrapper that launched it is the guestclaude.claudeshell shim into its own Windows work directory and puts that directory on its own PATH. The orcad launch passesprocess.envthrough, so WSL appends that directory to orcad's PATH as/mnt/c/.... The same thing happens to a real user's%APPDATA%\npm. The shim records every run in a guest marker file./proc/<orcad>/environ), and invoking it by that full/mnt/...path from the guest must run it. That invocation uses a scratch HOME, so it doesn't touch the marker. Only then does the lane assert the decoy never ran. It then deletes the guestclaudeand callsagentSession.createSupportuntil either the decoy runs or 60 s pass. It records the result in the receipt as<distro>.chat.windowsOnly: the admission answer and any decoy runs, with the arguments of each run. This step only records; it doesn't assert. Errors from the RPC or guest commands are caught and recorded undererrors, so the probe can't fail the lane.Why
The plan for native chat on WSL hosts needs to know whether a Windows-only install leaks into the distro's chat. If it does, the next PR adds a guard on the host that filters WSL's interop PATH entries. That PR will turn the recorded probe into an assertion. Recording first lets this PR's lane run answer the question without going red. Writing the decoy into the runner's own work directory keeps it out of real Windows install locations.
Linked Issue
N/A (maintainer).
Visual Proof
N/A: test-only, no UI.
Testing
pnpm tc,pnpm run typecheck:ci,pnpm run check:code-quality:changedand oxlint pass locally.The lane only runs on Windows with WSL. This PR's WSL orcad E2E run is the proof, and its receipts artifact carries
windowsOnly.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Flag-off / user risk: none. Only test files and the lane change; no shipped code.
Agent skill upstream boundary
Notes
Cross-platform: the lane runs only on Windows CI. The decoy is written under the lane's own work directory.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)