Keep WASM test feature closures free of native host fixtures
Depends on #804. This branch contains only the test cleanup, with no #804 history.
Problem
WASM --tests builds native journal/allocation fixtures and filesystem-only fixture helpers outside their supported platform or feature closure. Main's whole-test closure cannot deny warnings.
Design
Keep native file-journal and allocator cases in native builds. Compile filesystem fixture modules and helper exports with their consuming filesystem tests. Keep portable access, recovery and session tests on WASM: use a portable volume config and the existing platform future bounds instead of requiring native Send futures.
Deletions
Remove native imports and fixture helpers from closures without callers. No assertions or native cases removed. No README, generated output or qualification changes. Delta over its main base: +69/-33, net +36 across 13 files; +34 after #804 lands.
Tests run
Sequential bb1 batch with -Dwarnings:
- Harness wasm32 --no-default-features --tests --features browser: passed, 55.15 s.
- The same check with wasm alone: passed, 34.96 s.
- The canonical browser,test-support test closure: passed, 64.12 s.
- Windows GNU Harness --lib --tests, canonical full native/TUI features: passed, 149.79 s.
- Focused native client_session suite: 66 passed, 0.79 s (0.80 s process wall time).
- rustfmt, git diff --check, LF/NUL/source-size audits and caller searches passed.
Decisions
Separate this cleanup from #804 as requested. Depends on #804's library gates. #802 adds whole wasm32 --tests warning denial only after this PR lands. Native test constraints stay identical through ProviderPlatform/ProviderTask; WASM uses the SDK's existing local-future contract.
#804 has landed. The earlier validation used the combined tree c483bb01f; the current-head results are below.
Current head (0b1cefb40): main merged, gate rerun
- Merges of origin/main: cf969cb09 (a9eb39b62, #876) and 2710e4dd6 (10 later commits).
- Conflicts resolved:
contract.rsanddurable_host/timer.rskeep this PR's#[cfg(feature = "filesystem")], because their only test users, the durable_host timer tests, are filesystem-gated. tests/client_session_headless.rsis deleted, as on main.client_session_recovery.rskeeps its native-onlyFileClientState/OpenOptionsimports behindcfg(not(target_arch = "wasm32")).
- Conflicts resolved:
- 0b1cefb40, a new main-side warning:
- The gate's first run failed:
ProcessError::set_exit_code(from #833) is never used on wasm32, because hooks build only for native targets. - Fix:
Error::process_exit(error, exit_code)sets the code at construction,process_iodelegates to it, and the mutator is deleted (13 insertions, 19 deletions). There is no#[allow]and no new cfg on the mutator. - Negative control: that failing
-Dwarningsrun.
- The gate's first run failed:
- Gate
Q:/lanes/gc-providers-wasm-tests-gate.pyon bb1:- wasm32
--testswith-Dwarnings, browser: passed, 59.6 s. - wasm32
--testswith-Dwarnings, wasm: passed, 111.5 s. - wasm32
--testswith-Dwarnings, browser,test-support: passed, 88.7 s. - Windows GNU canonical
--lib --testswith-Dwarnings: passed, 342.6 s. - Native
client_session: 53 passed, 0 failed. - Native
--lib hooks::with-Dwarnings: 46 passed in 0.09 s. These tests exercise the hook exit-code path, includingdiagnostics[0].cause.exit_code().
- wasm32
- Follow-up, not addressed here: native
client_sessionnow takes 221.6 s, far over the test-speed bar. The earlier run had 66 tests in 0.79 s; main has since moved tests out of this target and changed recovery. That needs its own investigation.
🤖 Generated with Claude Code