Repository navigation
fix(wsl): fall back from a failed connect snapshot, and hint only from its own record read - #35663
Conversation
…m its own record read A snapshot command that rejects now falls back to the per-file reads instead of failing the connect. A snapshot whose record section was unreadable gives no hints even when the fallback read answered. Pins the held-fence and pending-journal cases at the connect level, and notes that snapshot raws drop trailing newlines.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
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 |
[Low impact] This PR appears safe to merge. SummaryThis PR makes the WSL connect snapshot optional when its command fails.
No actionable issues were found. Review checks used source and test inspection; tests were not run.
|
ELI5
This is a follow-up to #35591, which reads a WSL connect's state in one command and uses the answers as hints. Reviewers asked for four tightenings. If that one command fails, the connect now falls back to the old separate reads instead of failing. If the command couldn't read the activation record itself, no hints are used.
What Changed
$(cat)drops trailing newlines, so snapshot contents aren't byte-exact. Every consumer parses them as JSON.Why
These are review items on #35591 from d1c-review-low and d3-gate-audit. The snapshot is an optimisation, so any failure of it should cost only the reads it replaced, never the connect. A hint should only come from a read the snapshot itself answered.
Flag-off: the WSL host path only runs with ORCA_INTERNAL_WSL_HOSTS set; with it unset nothing here runs. SSH is untouched.
User-risk: very low. Every change makes the snapshot fall back to the pre-#35591 reads in more cases.
Linked Issue
N/A (follow-up to #35591).
Visual Proof
N/A: no UI.
Testing
wsl-orcad-connect-state-snapshot.test.ts:wsl-orcad-deploy.test.ts: covers three cases — nothing pending, a held fence, a pending journal — passed through to recovery and deploy.wsl-orcad-held-context.test.tspasses.pnpm tc,pnpm run typecheck:ci, the changed-code quality gate, anti-slop oxlint and oxlint all pass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
No SSH, wire or security change beyond failing back to the earlier reads.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)