Gate native harness helpers out of WASM builds
Problem
Native-only code, unused helpers and feature checks inside source-included fuzz/model modules break warning-denied builds. #802 needs these closures to compile before enabling its gates.
Design
Match definitions/imports to their actual platform and feature callers. The filesystem command helpers live in an ungated module shared by Harness and its fuzzer. Arc, atomic and Mutex each have one shared std/Loom import file; only Harness's module composition has Cargo feature gates. The fuzz crate gains no substitute features.
Keep the portable usage fold available to the new client views. Retain main's native client/CLI composition. Gate TUI/local helpers and goal-line caches with their consumers, retaining native property tests. Source-including memory models compile the trace hooks; the capture helpers belong only to the unit-fixture composition. Journal models now exercise the linked library journal and its real lock shim instead of compiling another copy.
Merged main 1b26e4a77 solely to resolve reported conflicts; retain the shared accounting helper renamed by #837. No runtime synchronization or admission policy changes.
Deletions
Delete unused condition-variable wrappers and wrapper-only models, obsolete helpers/copies whose callers were removed, the duplicate command splitter, and ineffective drops of borrowed handles in test cleanup. Repoint the stale fuzz HeadFile.bytes caller to its segments and length. Keep the pure tool-file checker shared with the fuzzer.
Delta over the PR merge base: +1695/-1367, net +328, across 228 files.
Tests run
Signed head 272d42a2d. Re-ran the complete eight-closure compiler matrix after the conflict merge.
All Linux-portable compilation/tests ran sequentially through bs.ps1. Compiler gates use -Dwarnings; times below are compilation wall time unless labeled runtime.
| Closure | Result |
|---|---|
| Native full: filesystem-local,native-execution,terminal,grpc,test-support,search-http,tui; --lib --tests | Passed, 163.66 s |
| Native filesystem-local alone; --lib | Passed, 32.44 s |
| Native native-execution alone; --lib | Passed, 27.23 s |
| Native no default features; --lib | Passed, 9.96 s |
| WASM browser alone; --lib | Passed, 16.21 s |
| WASM wasm alone; --lib | Passed, 10.45 s |
| WASM no default features; --lib | Passed, 12.12 s |
| Windows GNU full native/TUI; Harness/providers/filesystem/stream --lib --tests | Passed, 106.11 s |
| Default-feature harness-fuzz --bins | Passed, 53.39 s |
| Dedicated model cfg, model-checking alone; --lib, without test-support/MCP | Passed, 16.56 s |
| Dedicated model cfg, filesystem-local,model-checking; --lib | Passed, 35.01 s |
Post-merge mailbox/journal/MCP models: 10 passed, groups 0.00-0.01 s runtime, including negative controls. Memory accounting: 6 passed, 0.18 s runtime, including negative controls. Unchanged workflow models: 2 passed, 0.03 s runtime. Reuse completed models when later edits only tighten unrelated feature gates or delete reference-drop no-ops.
Command tokenizer and routing properties: 6 passed, groups <0.01 s runtime. Tool-file identity/sequence property and its negative mutations: 1 passed, 0.01 s runtime.
Earlier unchanged-code checks: provider WASM 15 passed in 0.11 s; parser fuzz 256 runs in <1 s. Caller searches, LF/NUL/source-size audits and git diff --check passed. No live credentials.
Decisions
Shared source files do not depend on the including crate's Cargo features. The journal model declares its real tempfile dependency through model-checking; dedicated cfg selects Loom, never a Cargo-feature-derived build.rs flag. Preserve every live lock model and its negative controls. No warning suppressions, raised limits or reduced assertions.
Whole WASM --tests warning cleanup stays in separate #825, as directed. Earlier main/branch comparisons are recorded in this PR's review replies; this PR claims warning denial for production WASM libraries, not that whole-test closure. #802 adds the production library/fuzz/model closures; its whole --tests warning denial waits until #825 lands.
Upstream ts-rs prints serde-attribute notices directly to stderr, independently of compiler warning denial. No generated output or README edits. Replaces #641.
Live steps
The standalone Windows GNU libfuzzer-sys 0.4.13 engine cannot compile its MSVC-only __pragma in FuzzerExtFunctionsWindows.cpp. A later focused check supplied a hash-verified matching MinGW C++ package in private temporary storage and exposed that upstream limitation. The production Windows crate/test cross-check is listed above; the same parser properties compile there and fuzz execution passes on Linux GNU. Browser test execution uses the existing runner; the new closure gates are compile checks.
Native owner follow-up
Signed head cf02e7629ecb25cb4800022a9c93125b19d19db6. The review delta moves the unchanged owner helper and its unchanged Shuttle model into one private scheduling/owner.rs module beneath a single wasm32 exclusion. The module follows its actual native caller/test feature closure. The existing native-only helper entry remains a re-export; qualification selects the relocated tests. Both readiness cases and the parked-owner deadlock negative control remain intact. Three files: +81/-78, net +3. No other cleanup was folded in.
The exact requested canonical bb1 command was run:
cargo check --locked -p acyclic-harness --no-default-features --features browser,test-support --target wasm32-unknown-unknown --target-dir /home/var/targets/gc-providers-706a68a1/harness-wasm --lib --tests
That full integration closure still FAILS on 98 unrelated diagnostics: default_tools 83, task_view 2, client-notifications 4 and client_session 9. There are zero Shuttle diagnostics. These targets are already in the separate #825 cleanup; this scoped follow-up does not pull that work into #804 or claim the entire closure passes. Log: Q:/lanes/gc-providers-804-owner-gate.log.
The subsequent sequential bb1 batch passes:
- Canonical native library tests built with -Dwarnings; both owner model tests pass in 0.00 s suite runtime / 0.011 s process time, including the deadlock negative control. Compilation: 16m14s.
- Canonical Windows GNU Harness --lib --tests with -Dwarnings: passed, 279.318 s compile time.
- Canonical WASM browser,test-support unit-test binary, --lib --no-run: passed, 217.159 s compile time. No WASM binary was executed natively. This proves the library test closure containing the reported Shuttle failure; it does not substitute for the failed integration closure above.
- bash -n scripts/qualify-graphcoder.sh: passed.
Exact remaining batch: Q:/lanes/bs.ps1 python3 -u -c (Get-Content Q:/lanes/gc-providers-804-owner-remaining-gate.py -Raw). Log: Q:/lanes/gc-providers-804-owner-remaining-gate.log. Native artifact: /home/var/targets/gc-providers-706a68a1/debug/deps/acyclic_harness-c31d9c3547dbe435; filter client::commands::scheduling::owner::tests::. All commands ran sequentially. Caller searches, LF/NUL/size checks, signature verification and git diff --check passed. Handoff updated; stopping here as directed.
Conflict merge revalidation
Signed merge 26f929718509aaa4fe9506aee2fe8353bf080376 brings origin/main 18ba969406c73332225d4a33a636e252757ca7f8 into the reviewed branch. The sole root.rs conflict preserves main's metadata-only stat path and this PR's caller gates, including the non-Linux fallback. Signed follow-up 122dc6c72cdf533c8f7b4a7c5a6e29479b041001 places the three new metadata-capture helpers under their native-watch caller closure (retaining unit-test access). No function body changed in the conflict resolution or follow-up.
The native full Harness + filesystem --lib test build passes -Dwarnings (929.205 s build). Direct test binaries run the unchanged owner models and main's metadata stat/rescan properties: 5 passed, including negative controls; groups take 0.00-0.43 s. The initial batch then exposed three capture-only helpers in the local-only closure; after matching their gates to the native-watch callers, the remainder driver checks the remaining matrix sequentially. Unit-test cfg and bodies are unchanged, so the already-built focused binaries remain applicable.
Exact commands and logs:
- Q:/lanes/bs.ps1 python3 -u -c (Get-Content Q:/lanes/gc-providers-804-merge-main-gate.py -Raw); matching .log records the full native build and five passing tests, then the diagnosed feature-gate failure.
- Q:/lanes/bs.ps1 python3 -u -c (Get-Content Q:/lanes/gc-providers-804-merge-remaining-gate.py -Raw); matching .log records the corrected remainder checks.
| Current post-merge closure | Result |
|---|---|
| Native full Harness + filesystem --lib test build, -Dwarnings | Passed, 929.205 s build |
| Owner models + metadata stat/rescan properties | 5 passed; groups 0.00-0.43 s runtime |
| Native filesystem-local-only --lib, -Dwarnings | Passed, 50.040 s |
| Native native-execution-only --lib, -Dwarnings | Passed, 75.454 s |
| Native minimal --lib, -Dwarnings | Passed, 44.312 s |
| WASM browser-only --lib, -Dwarnings | Passed, 33.287 s |
| WASM wasm-only --lib, -Dwarnings | Passed, 19.308 s |
| WASM minimal --lib, -Dwarnings | Passed, 10.776 s |
| Windows GNU full native Harness + filesystem --lib --tests, -Dwarnings | Passed, 315.620 s |
| WASM browser,test-support unit --lib --no-run | Passed, 116.639 s |
| Qualification bash syntax | Passed |
The earlier full-WASM integration failure stays explicitly tracked by #825 above. The new unit compile does not claim that unrelated integration closure passes. No suppressions, changed limits or weaker assertions. All commits are signed; caller searches, LF/NUL/source-size audits and git diff --check pass. No unresolved review threads. Handoff updated; stop after pushing as requested.