Repository navigation
fix(windows): fix native runtime compatibility and enable workspace t… - #3378
Conversation
…ests Fix shell discovery, hook quoting, native path handling and OAuth randomness on Windows, make the test fixtures portable, and run the full workspace test suite in the Windows CI job.
Yeachan-Heo
left a comment
There was a problem hiding this comment.
The new Windows workspace test job will still fail in the plugins crate: plugin_registry_runs_initialize_and_shutdown_for_enabled_plugins calls write_lifecycle_plugin, which writes init.sh and shutdown.sh fixtures (rust/crates/plugins/src/lib.rs:2503-2516). On Windows, run_lifecycle_commands invokes an existing fixture path with cmd /C; cmd.exe cannot execute those .sh files, so registry.initialize() and registry.shutdown() return CommandFailed. Make the lifecycle fixtures platform-aware (for example, Windows .cmd scripts and Unix .sh scripts) while preserving the expected init\nshutdown\n log, then rerun the Windows workspace tests.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]
|
Fixed and pushed as — |
|
Fixed and pushed as Local formatter check, workspace Clippy, workspace tests, and Windows-target runtime — |
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Re-reviewed at exact head ba0e960711447ef26b5b01f42e5e2460b2f76300. The Windows lifecycle fixtures and workspace-path handling now cover the reported failures, including short-name aliases and fail-closed traversal checks. Rust CI and Rust build checks—including Windows workspace tests and PowerShell smoke—are green at this head. Local formatting, Clippy, workspace tests, and Windows-target runtime check also passed. No blocking findings remain.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]
Summary
Running the Rust workspace tests on native Windows exposed Unix-only test fixtures and failures in shell execution, hooks, path handling, and OAuth randomness. This PR fixes those compatibility issues and runs the complete workspace suite in the Windows CI job, alongside the existing PowerShell smoke checks.
Runtime changes:
cmddirectory is on PATH.cmd /D /S /C, including plugin script paths containing spaces.getrandomAPI for OAuth PKCE/state randomness instead of/dev/urandom. The dependency version already exists in the workspace lockfile.Test changes:
The Windows CI job installs Python 3 and runs
cargo test --workspace --locked --no-fail-fast. No new test exclusions or ignored tests are introduced. The separate CLI output-token override, tool-alias normalization, and repeated-read guard are outside this PR.Compatibility considerations: Windows shell and hook launch behavior changes intentionally, and
cmd /Ddisables AutoRun processing for those hooks. Executable discovery uses the caller's PATH rather than a login shell's environment. Session-directory error classification becomes explicit. No CLI flags, JSON field names, plugin manifest fields, or provider wire formats are added or removed. Windows prerequisites are the MSVC Rust toolchain/build tools, Git for Windows, and Python 3; no pip packages or live model service are needed.Anti-slop triage
cargo test --workspace --locked --no-fail-fastfromrust/on Windows. Before these fixes, failures included Unix-only fixture setup, hook quoting, native paths, environment-variable races, and plugin JSON parsing. The final native Windows run reports successful workspace tests, formatting, and strict Clippy.Verification
git diff --checkpasses.Native Windows verification reported by the contributor on 2026-11-08, all with exit code 0:
Additional local verification:
cargo test --workspace --locked --no-fail-fast): 1,826 passed, zero failures, one existing ignored live-provider test; strict workspace Clippy (--all-targets -- -D warnings) passed.Limits: Hosted GitHub CI has not run for this unpublished PR. No live-provider/API-credential integration run was performed.
Resolution gate