Skip to content

fix(tracing): recognize Windows skill paths - #118

Open
andrewjsu wants to merge 1 commit into
langfuse:mainfrom
andrewjsu:fix/windows-skill-paths
Open

andrewjsu wants to merge 1 commit into
langfuse:mainfrom
andrewjsu:fix/windows-skill-paths

Conversation

@andrewjsu

Copy link
Copy Markdown

Summary

Recognize Windows path separators when inferring skill access from tool calls. The current detector matches /SKILL.md and skills/.../scripts/ only, so a successful Windows read such as Get-Content C:\Users\dev\.codex\skills\pdf\SKILL.md is missed. The same command with forward slashes is recognized.

This also affects Windows paths escaped inside exec JavaScript source, where two literal backslashes can appear in the captured tool input.

Change

  • Accept one or more forward slashes or backslashes at the existing document/script separator positions.
  • Add eight table-driven regressions: native and escaped Windows document paths, argument arrays, mixed separators, and normal/escaped/system/mixed skill-script paths.
  • Keep tool allowlists, skill-name rules, prompt detection and existing path-inference semantics unchanged.

Verification

On Windows, Node 24.14.0 with the repository-pinned pnpm 9.5.0:

  • Before the source change: the eight new regressions failed with [] instead of ["pdf"]; the five existing skill tests passed.
  • After the source change: all 13 skill tests passed.
  • pnpm run lint passed (formatting and TypeScript).
  • Build passed. Full suite: 125 passed / 4 failed.
  • Unmodified upstream 586910c81eeaf21d8f54c1c86c89a29a5466c1ef on the same machine: 117 passed / the same 4 failed. These are three hook-command.test.ts cases and the sessions-tree indexing case in trace.test.ts; no skips or assertions were weakened.

Local setup notes: used a process-local pnpm 9.5.0 launcher because nested scripts otherwise resolved the machine's pnpm 11; restored canonical Git line endings in this isolated checkout for Prettier. No lockfile or unrelated file changes are included.

Scope

This repairs separator recognition, not proof of successful/effective skill use. The detector still infers from input text and can tag failed reads or incidental path mentions; changing that meaning should be a separate change. Fixtures are synthetic and contain no private transcripts, credentials or account identifiers. The installed plugin and tracing configuration were not modified.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants