fix(ci): commit insta snapshots and fix Windows clippy errors (REF-172)#38
Merged
Conversation
PR #37 was merged with broken CI on Ubuntu, macOS, and Windows runners. Root causes: 1. `*.snap` in .gitignore excluded insta's baseline snapshot files, so CI saw "missing snapshot" failures for 4 pulse::site tests. Insta's convention is the opposite: commit `.snap` (baseline) and ignore `.snap.new` (pending). Replaced the blanket glob with that pair. 2. Windows-only clippy errors under `-D warnings`: - `use crate::output` was unused on Windows (only referenced inside a `#[cfg(unix)]` branch of `check_disk_space`) → gated import on unix. - `root: &Path` parameter of `check_disk_space` was unused on Windows for the same reason → added `cfg_attr(not(unix), allow(unused_variables))`. - `.arg(&path)` in the Windows-specific spawn block triggered `needless_borrows_for_generic_args` → matched the Unix branch's `.arg(path)`. Verified: - `cargo clippy --all-targets -- -D warnings` clean. - `cargo test` — all 855 tests pass (lib 704 + integration 80 + symbol_test 59 + mcp_jsonrpc 6 + doctests 6; 10 perf tests intentionally ignored in debug). - `cargo build --release` clean. Co-Authored-By: Paperclip <noreply@paperclip.ing>
…ailures (REF-173)
Normalize all resolved file paths to forward slashes and make
platform-specific helpers Windows-aware. With this change the same
21 tests that failed on `windows-latest` (path separator
mismatches, vendor/venv filters not matching `\vendor\`, missing
Windows asset for Pagefind/Zola, and `HOME` overrides ignored by
`dirs::home_dir()`) now behave identically on every OS.
Production normalizations:
- Indexer stores relative paths with `/` so the on-disk index is
deterministic and downstream `path.contains("src/...")` filters
work regardless of OS.
- `resolve_rust_import`, `resolve_rust_mod_declaration`,
`resolve_c_include_to_path`, `resolve_cpp_include_to_path`, the
TypeScript resolver and the Go/Python project-root strings all
emit forward-slash paths.
- Go vendor/Python venv filters operate on a normalized string so
the `.../vendor/...` check fires on Windows paths too.
Test-only adjustments:
- Pagefind/Zola `test_get_asset_name` now branches on supported
platforms: assert `Ok` where a binary exists, assert the
unsupported-platform error otherwise.
- Semantic config tests use `set_home`/`unset_home` helpers that
also set `USERPROFILE` on Windows so `dirs::home_dir()` picks up
the override.
- C/C++ resolver tests drop the `|| backslash` alternatives now
that the resolver guarantees forward slashes.
Verified locally with `cargo test` (704 lib + 145 integration tests
all green) and `cargo build --release`.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
… (REF-173) Second iteration of the Windows CI fix. The first push knocked the 21 failures down to 4; this addresses the remaining four: - Indexer was still passing the original `PathBuf` (with backslashes on Windows) into the trigram index and content store, so the query layer saw `src\main.rs` even though the metadata DB had `src/main.rs`. Rebuild the `PathBuf` from the already-normalized `path_str` and drop the now-unused `path` field on the intermediate result struct. - `dirs::home_dir()` queries `SHGetKnownFolderPath(FOLDERID_Profile)` on Windows and ignores `HOME` / `USERPROFILE`, so the semantic config tests could not redirect the lookup to a temp directory. Add `user_home_dir()` that checks `REFLEX_HOME`, `HOME`, then `USERPROFILE` before falling back to `dirs::home_dir()`, and route every `dirs::home_dir()` call inside `semantic/config.rs` through it. Tests on Unix and macOS keep using `HOME` as before. Verified locally with `cargo test --lib` (704 passed) and `cargo clippy --lib --all-targets -- -D warnings`. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores green CI on
mainacross all three platforms after PR #37 was merged red. Bundles two ticket scopes:Commits
ac1e5279721504c71962cRoot causes
REF-172 — PR #37 regressions
*.snapwas in.gitignore, which excluded insta's baseline snapshot files. CI saw "missing snapshot" failures for 4pulse::sitetests:snapshot_zola_config_all_surfacessnapshot_base_html_page_structuresnapshot_base_html_pagefind_integrationsnapshot_home_page_navigation_linksInsta's convention is the opposite: commit
.snap(baseline) and ignore.snap.new/.pending-snap(pending updates). Replaced the blanket glob with that pair.Windows-only clippy errors under
-D warningsinsrc/indexer.rsandsrc/cli/index.rs:use crate::output;was only referenced inside a#[cfg(unix)]branch ofcheck_disk_space→ gated the import on#[cfg(unix)].root: &Pathparameter ofcheck_disk_spacewas unused on Windows for the same reason → added#[cfg_attr(not(unix), allow(unused_variables))]on the function..arg(&path)in the Windows-specific spawn block triggeredclippy::needless_borrows_for_generic_args→ matched the Unix branch's.arg(path).REF-173 — Pre-existing Windows path bugs (revealed once Windows compiled)
Windows used backslash separators (
src\\models.rs) where tests asserted forward slashes (src/models.rs), and a handful of fixture walks picked up extra entries. Path overrides for storage/dirs lookups also weren't honored on Windows. See REF-173 for the full failing-test inventory.Test plan
cargo clippy --all-targets -- -D warningscleancargo test— all tests pass locallycargo build --releaseclean🤖 Generated with Claude Code