test/ci(windows): Windows-safe engine tests + functional Windows CI leg (#209)#211
Merged
Conversation
…s-safe Prep for a Windows functional-validation run (the engines are compiled on the Windows CI job but never executed there; validated so far only on macOS/Linux). - brush engine: under `do_not_inherit_env(true)` a spawned child on Windows needs the OS-minimal vars (`SystemRoot`, …) or `CreateProcess`/CRT init fails to start it at all. Seed them on Windows (not secrets — every process needs them) so external commands and the carried-coreutils re-exec are runnable under confinement. No-op on unix. - carried_coreutils test: replace `env_clear()` with a `scrubbed()` helper that drops `PATH` (so only carried tools satisfy a bare `ls`/`cat`) but keeps the Windows OS-minimal env, so the harness process can start on Windows. Unix behavior unchanged (the `#[cfg(windows)]` blocks compile out); Linux brush_real 3/3 + carried_coreutils 2/2 still green, clippy -D warnings clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRv5vteHCw4jUayHGL5esx
) Windows verification of 0.7.0-rc.1 found carried_ls/carried_cat failing on Windows: the command strings were built with a raw, unquoted path (e.g. `cat C:\Users\...\hello.txt`) fed straight into brush's POSIX-style parser, which treats an unescaped `\` as an escape character and silently collapses the path (`C:\Users\...` -> `C:Users...`), so the file can never resolve. The carried-coreutils re-exec/dispatch machinery itself was never broken -- confirmed by hand that the same command succeeds once the path is shell-quoted. Mirrors agent-bridle-jaild::vm::shell_quote's single-quote + embedded-quote escaping. Co-authored-by: Shawn Hartsock <hartsock@users.noreply.github.com>
) The Windows CI job compiled the brush engine + carried coreutils (via --all-features clippy) but never executed them — they were validated only on macOS/Linux until the #209 Windows pass. Add a step that RUNS brush_real + carried_coreutils with `--features brush,carried-coreutils` on windows-latest, so the in-process brush engine and the carried-coreutils dispatch/re-exec are permanently gated on Windows. Mirrored in `just check-windows` (hook parity). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRv5vteHCw4jUayHGL5esx
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.
Lands the Windows verification work from #209 (all green on Windows 11 / rustc 1.93): the brush engine + carried-coreutils are Windows-safe (SystemRoot seed for confined children; shell-quoted paths — the W4 fix from #210), and the Windows CI job now RUNS them (not just compiles). Root cause of the one W4 failure was test path-quoting, not the dispatch machinery — carried coreutils work on Windows. Linux stays green. Feeds rc.2.
Refs #209, #210. risk:low (tests + a Windows CI step).