Skip to content

fix(test): gate use std::sync::Arc behind cfg(unix) to complete the Windows-red fix#6308

Merged
houko merged 2 commits into
mainfrom
fix/transform-tests-arc-cfg-unix
Jun 24, 2026
Merged

fix(test): gate use std::sync::Arc behind cfg(unix) to complete the Windows-red fix#6308
houko merged 2 commits into
mainfrom
fix/transform-tests-arc-cfg-unix

Conversation

@houko

@houko houko commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Problem

main is still red after #6306. That PR gated the scriptable transform_tool_result hook tests behind #[cfg(unix)] (including make_transform_engine), but missed one import: use std::sync::Arc in the same test module is now referenced only by the Unix-gated make_transform_engine (Arc::new(MemorySubstrate::open_in_memory(..))). The rest of the module uses the fully-qualified std::sync::Arc (e.g. StubDriver's driver()), so on Windows the short import is unused and the build fails:

error: unused import: `std::sync::Arc`
  --> crates/librefang-runtime/src/context_engine/scriptable/engine.rs:1254
  = note: `-D unused-imports` implied by `-D warnings`

Both Windows shards fail at the cargo test --no-run compile step, so main's post-merge CI stayed red and every PR keeps inheriting it.

Fix

Gate use std::sync::Arc behind #[cfg(unix)], matching the already-gated make_transform_engine / MemorySubstrate / ToolExecutionStatus. Verified Arc (short name) is used only at the single gated site; everything else in the module uses std::sync::Arc fully-qualified.

Verification

Linux / macOS are unaffected — cfg(unix) is true there, so Arc stays 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 on main after 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.

…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.
@github-actions github-actions Bot added size/XS < 10 lines changed area/docs Documentation and guides area/runtime Agent loop, LLM drivers, WASM sandbox labels Jun 24, 2026
@houko
houko enabled auto-merge (squash) June 24, 2026 05:12
@houko
houko merged commit 883f2a5 into main Jun 24, 2026
31 checks passed
@houko
houko deleted the fix/transform-tests-arc-cfg-unix branch June 24, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation and guides area/runtime Agent loop, LLM drivers, WASM sandbox size/XS < 10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants