jouleclaw-omni: declare 23 modules that were compiled by nothing #314

Merged
dcharlot merged 1 commit from tidy/clippy-sweep into main 2026-10-18 13:18:54 -04:00
Owner

Twenty-five source files in this crate were named by no mod line, so they were not in the build at all — roughly 19,000 lines that nothing type-checked, tested or linted. scripts/check-orphan-sources.py pinned them as a baseline so the count could only fall. This is that fall: 25 → 1.

The surprise is how little it costs. Twenty-three compile clean, and the two that do not are blocked by facts outside the code:

  • video_decode.rs wants ffmpeg_next, which is not a dependency (extern crate ffmpeg_next → E0463). A system library and a licensing choice, so it stays undeclared — the baseline now holds it alone, with the reason written beside it.
  • fusion.rs has every one of its use lines behind #[cfg(feature = "metal")] while the items needing those types do not, so a default build loses the imports and keeps the code: 31 unresolved types. It only ever compiled with that feature on. Now gated the same way, as gpu_ops and the sana_wm draft already are.

sana_wm_gpu_dispatchers_draft.rs is gated likewise — it imports crate::hal::metal, which is #[cfg(feature = "metal")].

Verified on the build host, rebased onto current main

With --keep-going throughout, so an early error cannot hide what is behind it:

cargo check --keep-going     errors=0  warnings=29
clippy --all-targets         errors=0  warnings=3959
cargo test                   44 passed, 0 failed
jouleclaw workspace --locked PASS
orphan guard + self-test     PASS

The one cost, split honestly

Of those 3959 clippy warnings, 1412 come from the newly-declared files and 2547 were already there. The new ones are almost entirely pedantic-tier style — doc_markdown 554, redundant_closure_for_method_calls 292, cast_possible_truncation 286 — which this crate opts into. The only substantive category is 28 unused_imports, left for a follow-up rather than mixed into a declaration-only change; some unused imports elsewhere in this tree are cfg-gated and live in other configurations, so they need checking one at a time, not a sweep. Nothing here can break a build: the crate carries no #![deny(warnings)].

Separately, and not from this change

--features metal does not compile on main at all — 3063 errors, concentrated in files that were already declared (hunyuan3d.rs 300, audiogen.rs 269, trellis.rs 213). Measured on origin/main before this change, so it is pre-existing. No CI job builds that feature, which is how it drifted this far.

🤖 Generated with Claude Code

Twenty-five source files in this crate were named by no `mod` line, so they were not in the build at all — roughly **19,000 lines that nothing type-checked, tested or linted**. `scripts/check-orphan-sources.py` pinned them as a baseline so the count could only fall. This is that fall: **25 → 1**. The surprise is how little it costs. **Twenty-three compile clean**, and the two that do not are blocked by facts outside the code: - **`video_decode.rs`** wants `ffmpeg_next`, which is not a dependency (`extern crate ffmpeg_next` → E0463). A system library and a licensing choice, so it stays undeclared — the baseline now holds it alone, with the reason written beside it. - **`fusion.rs`** has every one of its `use` lines behind `#[cfg(feature = "metal")]` while the items needing those types do not, so a default build loses the imports and keeps the code: 31 unresolved types. It only ever compiled with that feature on. Now gated the same way, as `gpu_ops` and the `sana_wm` draft already are. `sana_wm_gpu_dispatchers_draft.rs` is gated likewise — it imports `crate::hal::metal`, which is `#[cfg(feature = "metal")]`. ### Verified on the build host, rebased onto current main With `--keep-going` throughout, so an early error cannot hide what is behind it: ``` cargo check --keep-going errors=0 warnings=29 clippy --all-targets errors=0 warnings=3959 cargo test 44 passed, 0 failed jouleclaw workspace --locked PASS orphan guard + self-test PASS ``` ### The one cost, split honestly Of those 3959 clippy warnings, **1412 come from the newly-declared files** and 2547 were already there. The new ones are almost entirely pedantic-tier style — `doc_markdown` 554, `redundant_closure_for_method_calls` 292, `cast_possible_truncation` 286 — which this crate opts into. The only substantive category is **28 `unused_imports`**, left for a follow-up rather than mixed into a declaration-only change; some unused imports elsewhere in this tree are `cfg`-gated and live in other configurations, so they need checking one at a time, not a sweep. Nothing here can break a build: the crate carries no `#![deny(warnings)]`. ### Separately, and not from this change **`--features metal` does not compile on `main` at all — 3063 errors**, concentrated in files that were already declared (`hunyuan3d.rs` 300, `audiogen.rs` 269, `trellis.rs` 213). Measured on `origin/main` before this change, so it is pre-existing. No CI job builds that feature, which is how it drifted this far. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jouleclaw-omni: declare 23 modules that were compiled by nothing
All checks were successful
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 59s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 33s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 3m15s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 10m2s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 3m49s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 3m3s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 7m35s
130123f648
Twenty-five source files in this crate were named by no `mod` line, so they
were not in the build at all: ~19,000 lines that nothing type-checked, tested
or linted. `scripts/check-orphan-sources.py` pinned them as a baseline so the
count could only fall, and this is that fall: 25 -> 1.

Declaring them costs almost nothing, which is the surprise. Twenty-three
compile clean, and the two that do not are blocked by facts outside the code:

  video_decode.rs wants `ffmpeg_next`, which is not a dependency
  (`extern crate ffmpeg_next` -> E0463). That is a system library and a
  licensing choice, so it stays undeclared, and the baseline now holds it
  alone, with the reason written beside it.

  fusion.rs has every one of its `use` lines behind
  `#[cfg(feature = "metal")]` while the items that need those types do not, so
  a default build loses the imports and keeps the code: 31 unresolved types.
  It only ever compiled with that feature on. The module is now gated the same
  way, as `gpu_ops` and the sana_wm draft already are.

sana_wm_gpu_dispatchers_draft.rs is gated likewise: it imports
`crate::hal::metal`, which is `#[cfg(feature = "metal")]`.

Measured on the build host, with --keep-going so an early error cannot hide
what is behind it: `cargo check` 0 errors, `cargo clippy --all-targets` 0
errors, 44 tests pass, the whole jouleclaw workspace still checks, and the
orphan guard passes on the new baseline, its planted-orphan self-test included.

⚠️ Separately, and not from this change: `--features metal` does not compile on
main at all -- 3063 errors, concentrated in files that were already declared
(hunyuan3d.rs 300, audiogen.rs 269, trellis.rs 213). Measured on origin/main
before this change, so it is pre-existing. No CI job builds that feature.

Co-Authored-By: Claude Opus 5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!314
No description provided.