windows-compat

Solid

Audit and harden this Rust repo (code-graph-mcp) for Windows correctness: path-spelling drift between producers, the 32,767-char command-line cap, index-key mismatches, and path predicates that assume one ecosystem's layout. Use whenever touching code that builds, compares, prints, or stores a filesystem path; that spawns a process with a variable number of arguments (rg, git); that matches an executable name; or that classifies files by path shape — and whenever triaging a bug that reproduces only on Windows, reviewing a diff that touches path handling, or adding a predicate that has a SQL mirror. Reach for it even when the change looks small and nobody mentioned Windows: every defect in its catalogue shipped past a green CI matrix that already included windows-latest.

Code & Development 79 stars 16 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
63
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Windows compatibility (code-graph-mcp) Three defects reached a Windows user from **one** root cause: two spellings of the same path compared unequal. CI already ran `windows-latest` and caught none of them, because nothing asserted on path spellings at all. Closing that gap is what this skill is for. ## The invariant everything hangs off `indexer::merkle::normalize_rel_path` stores every indexed path as a **`/`-separated relative path**, rewriting separators only under `#[cfg(windows)]`. So any path that becomes a lookup key, a dedup key, or stdout must land in *exactly* that spelling. Almost every defect below is one producer handing over a different spelling of the same file. The producer table and the full catalogue are in [references/failure-modes.md](references/failure-modes.md) — read it before changing path-handling code. It is short and every entry is a real defect with its shipped fix. ## The doctrine: platform is a parameter, not a `cfg!` This is the single rule that makes everything else testable. ```rust // NO — the Windows branch only runs on Windows, so the Linux and macOS legs // prove nothing, and a Windows-only CI failure is expensive to debug. fn normalize(path: &str) -> String { if cfg!(windows) { path.replace('\\', "/") } else { path.into() } } // YES — one thin cfg! entry point, all logic in a function taking the platform. fn normalize(path: &str) -> String { normalize_on(path, cfg!(windows)) } fn normalize_on(path: &str, backslash_is_se...

Details

Author
sdsrss
Repository
sdsrss/code-graph-mcp
Created
6 months ago
Last Updated
today
Language
Rust
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category