Skip to content

Windows path handling in PathNormalizer + Windows e2e runner #77

Description

@jleni

Summary

Two coupled gaps that should land together so the implementation has its test backing on day one.

What's missing

PathNormalizer Windows support

Current `PathNormalizer::normalize` and `remap_args` are byte-literal `String::replace`. On Windows that breaks in three ways:

  1. Separator mismatch. PathNormalizer's canonicalized prefix uses `\` (Windows path); rustc dep-info often reports paths with `/`. Literal-replace finds no match → leak.
  2. Drive-letter case. `C:\` vs `c:\` are the same NTFS path; `String::replace` is case-sensitive.
  3. Missing standard prefix sentinels. Windows dev paths live under `%USERPROFILE%` (covered via `dirs::home_dir`), but also `%APPDATA%`, `%LOCALAPPDATA%`, `%PROGRAMFILES%`. None are in the rule list today.

Windows e2e runner

`.github/workflows/ci.yml` has a `windows-check` exploratory job that only does `cargo check --target x86_64-pc-windows-msvc`. The harness (`crates/kache-e2e`) doesn't run on Windows at all, so:

Proposed fix

  • Add separator + case normalization in `PathNormalizer`'s prefix matching (canonicalize to `/` and lowercase the drive letter at construction).
  • Add ``, ``, `` rules in `from_env` when running on Windows.
  • Stand up a Windows runner in CI and run the existing e2e harness on it. Both the new Windows path code and existing fixtures get validated.

Why bundled

Landing the implementation without Windows e2e weakens the test-first invariant the rest of the path-handling work has been built on. Pair them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:lowAcknowledged but not on the active roadmap; pick up when relevant

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions