Repository navigation
Conversation
Five of the six files in `tests/` open with `#![cfg(unix)]`, so the Windows CI job compiled the binary and then exercised none of it. Every Windows regression the suite could have caught shipped instead. The gate was never really about Unix. Each of these tests shells out to `grep` or `rg` and already skips itself when that engine is missing, so the files run as-is wherever an engine exists -- including Git Bash, scoop, and WSL-adjacent setups, which is most Windows developer machines. Where no engine is installed the tests skip exactly as they already do on a Linux box without ripgrep. Two supporting changes: - `search_error_test` pins `CLAUDE_CONFIG_DIR` at a path that does not exist. Its assertions require empty stderr, which a developer with Claude Code installed but without the rtk hook cannot satisfy. CI passes either way only because a fresh runner has no `~/.claude`. - Renames a `nul.txt` fixture to `nul_bytes.txt`. `nul` is a reserved device name on Windows and cannot be created as a file. Adds `tests/windows_smoke_test.rs` for the behaviours that are genuinely Windows-specific rather than merely untested: CRLF line endings, backslash paths, paths containing spaces, and which shell `rtk summary` hands a command to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Problem
Five of the six files in
tests/open with#![cfg(unix)]. The Windows CI job compiles the binary and then exercises none of it — every suite reports0 passed:Every Windows regression the suite could have caught shipped instead.
The gate was never about Unix
Each of these tests shells out to
greporrgand already skips itself when that engine is missing. The#![cfg(unix)]was a blunt stand-in for "needs a search engine". Removing it means the files run wherever an engine exists — Git Bash, scoop, MSYS2, most Windows developer machines — and skip exactly as they already do on a Linux box without ripgrep.Result on this machine: 70 integration tests that previously never ran now execute and pass.
grep_context_testgrep_faithful_format_testsearch_compress_testsearch_error_testsearch_faithful_testwindows_smoke_test(new)Two supporting fixes
search_error_testpinsCLAUDE_CONFIG_DIRat a path that does not exist. Its assertions require empty stderr, which a developer who has Claude Code installed but not the rtk hook cannot satisfy. CI passes either way only because a fresh runner has no~/.claudeat all.nul.txt→nul_bytes.txt.nulis a reserved device name on Windows; a file by that name cannot be created.New:
tests/windows_smoke_test.rsCovers what is genuinely Windows-specific rather than merely untested: CRLF line endings, backslash paths, and paths containing spaces. It redirects the tracking DB into a temp dir so a test run never writes to the developer's own history.
Scope
Deliberately excluded: end-to-end tests for
rtk treeandrtk summaryshell routing. Those depend on #3616 and #3618 and would fail on this base. Both behaviours already have unit tests inside their own PRs, so nothing is left uncovered — only the end-to-end duplicate is deferred.Testing
Full suite on
x86_64-pc-windows-gnu: 2615 passed plus the 70 above.cargo fmt --checkandcargo clippy --all-targetsclean. The single unrelated failure on this toolchain is fixed in #3615.🤖 Generated with Claude Code