Skip to content

fix(fspy): ignore malformed tracked paths without panicking#330

Merged
branchseer merged 8 commits intovoidzero-dev:mainfrom
SegaraRai:fix/issue-325
Apr 14, 2026
Merged

fix(fspy): ignore malformed tracked paths without panicking#330
branchseer merged 8 commits intovoidzero-dev:mainfrom
SegaraRai:fix/issue-325

Conversation

@SegaraRai
Copy link
Copy Markdown
Contributor

Summary

Fixes #325.

Windows file access tracking could panic when fspy observed a malformed path such as foo/C:/bar. The path is initially accepted as relative, but lexical cleanup can turn it into a drive-prefixed path that no longer satisfies RelativePath invariants.

  • Make RelativePath::clean() fallible instead of panicking when cleanup produces a non-relative path
  • Ignore fspy-observed paths that cannot be represented as valid workspace-relative inputs after cleanup
  • Add a unit repro for the malformed Windows drive-path case
  • Add a Windows-only E2E snapshot repro through the fspy input-inference path
  • Add a changelog entry

Test plan

  • cargo test -p vite_path clean_malformed_drive_path
  • cargo test -p vite_task malformed_windows_drive_path_after_workspace_strip_is_ignored
  • cargo test -p vite_task_bin --test e2e_snapshots -- malformed-fspy-path
  • cargo check -p vite_path -p vite_task

@branchseer
Copy link
Copy Markdown
Member

Thank you!

@branchseer branchseer merged commit 3008bff into voidzero-dev:main Apr 14, 2026
9 checks passed
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.

[Windows] Panic in cache path tracking when a malformed observed path reaches RelativePathBuf::clean()

2 participants