Repository navigation
chore(wsl): keep the Sleep folder and bridge-exit lines in the local trace - #35378
Conversation
…trace A packaged build keeps no console, so #35150's Sleep folder line and the WSL bridge exit verdict were invisible on a device. Each now also goes to main.trace.ndjson as a span with the line and its facts as filterable fields. Co-Authored-By: Claude <noreply@anthropic.com>
[Low impact] The PR appears safe to merge; no actionable defects were found. SummaryKeeps Sleep-folder and WSL bridge-exit diagnostics in the local trace while preserving console output.
No actionable issues found. Tests were not run during this review. Reviews (3) · Last reviewed commit: "Merge branch 'main' into nwparker/wsl-sl..." · Reviewed by Greptile |
|
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 20 minutes. View limit details
No actionable comments were generated in the recent review.
|
ELI5
Two diagnostic lines that explain how WSL terminals behave on Sleep and on a distro shutdown were only printed to the console. A packaged build keeps no console output, so on a real device nobody could see them. They're now also written to Orca's local trace file, which is already kept on disk.
What Changed
logWslPaneDiagnostic(new,src/main/daemon/daemon-wsl-diagnostic-log.ts) prints the line as before. It also records a span in the local trace (<userData>/logs/main.trace.ndjson), with the full line plus its facts as separate fields.[history] Sleep folder for …line (chore(wsl): log what a Sleep's folder read saw for each terminal #35150) becomes spanwsl.sleep-folder, with fieldsprobe(wsl/live),distro,live,folderFound,elapsedMs, and for the WSL proberows,shells,timedOutandbudgetMs.[pty] WSL bridge exit: …verdict line becomes spanwsl.bridge-exit, with fieldsverdict,distro,codeandprobeMs.Why
ORCA_DIAGNOSTICS_DISABLED), is written by the same process, and is collected by the diagnostics bundle. That makes it the persisted log this process already has.daemon.logis written by the terminal daemon process, not by the process that logs these lines. Sending them there would need a new daemon request.Flag-off: not behind the WSL hosts gate. Bridge panes exist with it off, and the lines are emitted with the gate on or off.
User risk: none. This adds one small trace record per WSL pane Sleep and per bridge exit, and nothing changes in behaviour.
Linked Issue
Internal: verify-18 item (b); unblocks device diagnosis of the p8 Sleep→Wake folder branches.
Visual Proof
N/A.
Testing
daemon-pty-adapter-wsl-sleep-cwd.test.ts: a Sleep records awsl.sleep-folderspan carrying the same line and its probe facts.daemon-pty-adapter-wsl-distro-loss.test.ts: each bridge exit records awsl.bridge-exitspan with its verdict, distro and code.pnpm tc:node,oxlint,pnpm run check:code-quality:changedand the ast-grep gate pass.src/main/daemonandsrc/main/observability: 3,328 passed.AI Disclosure
Written with Claude Code.
Agent skill upstream boundary
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)