Uh oh!
There was an error while loading. Please reload this page.
fix(shared): stop tracing individual command probes - #8519
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, isolated observability fix that removes noisy per-candidate filesystem spans while preserving command resolution and higher-level tracing. The added test directly verifies the intended tracing behavior. You can add or adjust custom eligibility rules. Learn more. |
6b92224 to
8c7e63aCompare
What Changed
isExecutableFileinpackages/shared/src/shell.tsis nowEffect.fnUntraced, so each PATH and PATHEXT candidate check no longer emits ashell.isExecutableFilespan. Theshell.resolveCommandPathandshell.resolveCommandPathForPlatformspans stay. Command resolution and caching are unchanged. A test asserts the resolution spans are still emitted and the per-candidate span is not.Why
On Windows, command and editor discovery probes every PATH entry against every PATHEXT extension. Each probe opened its own span, producing thousands of near-empty spans on cold discovery and inflating server traces.
Related to #4210. Complements #5050.
Verification
vp test run packages/shared/src/shell.test.ts(31 passed)Checklist
Built with Claude Fable 5.1 in Claude Code.
Note
Low Risk
Observability-only change to an internal probe helper; resolution and caching logic are unchanged.
Overview
Windows command resolution was emitting a
shell.isExecutableFiletrace span for every PATH/PATHEXT candidate check, which could produce thousands of spans during session bootstrap and bloat server traces.isExecutableFileis now defined withEffect.fnUntracedinstead of a named tracedEffect.fn, so per-candidate filesystem probes no longer create spans. Higher-level spans such asshell.resolveCommandPathandshell.resolveCommandPathForPlatformare unchanged, and command resolution plus caching behavior is the same.A new test drives
resolveCommandPathwith a custom tracer and asserts those resolution spans appear whileshell.isExecutableFiledoes not.Reviewed by Cursor Bugbot for commit 6b92224442cc7463c0b198da06299623ef85276c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Stop tracing individual command probes in
isExecutableFileReplaces the
Effect.fn("shell.isExecutableFile")wrapper withEffect.fnUntracedin shell.ts, so executability checks no longer create per-probe trace spans. Adds a test in shell.test.ts confirming higher-levelshell.resolveCommandPathspans still emit whileshell.isExecutableFiledoes not. Comments around memoization are generalized fromshell.isExecutableFilecounts to "filesystem probes".shell.isExecutableFilespan names in trace dashboards or alerting will no longer see them.Macroscope summarized 8c7e63a.