fix(test): gate use std::sync::Arc behind cfg(unix) to complete the Windows-red fix#6308
Merged
Conversation
…indows-red fix Follow-up to #6306. Gating make_transform_engine left use std::sync::Arc referenced only by Unix-gated code, so the Windows build failed -D warnings with an unused_imports error (the rest of the test module uses fully-qualified std::sync::Arc). The import is now #[cfg(unix)] too. Completes #6304.
houko
enabled auto-merge (squash)
June 24, 2026 05:12
This was referenced Jun 24, 2026
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
mainis still red after #6306. That PR gated the scriptabletransform_tool_resulthook tests behind#[cfg(unix)](includingmake_transform_engine), but missed one import:use std::sync::Arcin the same test module is now referenced only by the Unix-gatedmake_transform_engine(Arc::new(MemorySubstrate::open_in_memory(..))). The rest of the module uses the fully-qualifiedstd::sync::Arc(e.g.StubDriver'sdriver()), so on Windows the short import is unused and the build fails:Both Windows shards fail at the
cargo test --no-runcompile step, somain's post-merge CI stayed red and every PR keeps inheriting it.Fix
Gate
use std::sync::Arcbehind#[cfg(unix)], matching the already-gatedmake_transform_engine/MemorySubstrate/ToolExecutionStatus. VerifiedArc(short name) is used only at the single gated site; everything else in the module usesstd::sync::Arcfully-qualified.Verification
Linux / macOS are unaffected —
cfg(unix)is true there, soArcstays imported and used. Windows is the platform that was failing and can't be reproduced locally (no native Rust toolchain / Docker this session), so the Windows lane onmainafter merge is the authoritative check (PR CI skips Windows by design). The fix is the exact, minimal counterpart of the compile error CI reported.Completes #6304. Follow-up to #6306.