Repository navigation
Conversation
Refs codewhale-hq#5587 A `--force-warn dead_code` pass over the workspace (`cargo check --workspace --all-targets`, then the non-test and test targets on their own) reports nothing inside any of these 30 attributes, in the build each one applies to. They suppress nothing: - palette: adapt.rs (5), contrast.rs (4), grammar.rs (2). These modules are `pub use`d from the crate root under the default `ratatui` feature. - runtime: model_context/fragment.rs (5), retry_status.rs (2). - tui: approval_log.rs, core/engine/dispatch.rs, llm_client/mod.rs (3), route_billing.rs (2), skills/mutation.rs, tui/hotbar/actions.rs, tui/transcript_cache.rs, tui/widgets/tool_card.rs (2). hotbar/actions.rs keeps `clippy::large_enum_variant`. The doc on `SECONDARY_CHROME_CONTRAST` said the constant only feeds the test-gate audit, "hence the dead_code allowance"; tui/whales.rs uses it at runtime, so that paragraph goes with the allow. Left alone although the pass found them stale too: - runtime prompt_zones.rs `TurnScratch`: its comment records that rustc 1.89 and newer rustc disagree about it (codewhale-hq#6543). - 22 allows in files other open PRs (the 0.10.2 wave among them) were changing when I ran the pass. Nothing here sits in a platform-gated block, and none of these items is reached only from `cfg(unix)` or `cfg(windows)` code. Budget: 252 -> 222 (`check-dead-code-budget.py --update`).
Hmbown
approved these changes
Oct 9, 2026
1 task done
This branch has not been deployed
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.
What and why
Another #5587 slice, the "stale allows" part of the tail. I ran
cargo check --workspace --all-targetswithRUSTFLAGS="--force-warn dead_code", then the non-test and test targets on their own, and matched everyallow(dead_code)against the warnings inside the item it covers. For these 30, rustc reports nothing in the build the attribute applies to, so they suppress nothing:adapt.rs(5),contrast.rs(4),grammar.rs(2). These modules arepub used from the crate root under the defaultratatuifeature.model_context/fragment.rs(5),retry_status.rs(2).approval_log.rs,core/engine/dispatch.rs,llm_client/mod.rs(3),route_billing.rs(2),skills/mutation.rs,tui/hotbar/actions.rs,tui/transcript_cache.rs,tui/widgets/tool_card.rs(2).hotbar/actions.rskeeps itsclippy::large_enum_variant. The doc onSECONDARY_CHROME_CONTRASTsaid the constant only feeds the test-gate audit, "hence the dead_code allowance";tui/whales.rsuses it at runtime, so that paragraph goes with the allow.Left alone even though the pass found them stale:
TurnScratchin runtimeprompt_zones.rs: its comment records that rustc 1.89 and newer rustc disagree about it (cargo +1.89 check fails on origin/main: 8 unfulfilled #[expect(dead_code)] lint expectations #6543).Nothing here sits in a platform-gated block, and none of these items is reached only from
cfg(unix)orcfg(windows)code, so the macOS result holds for the Windows build too.Main measures 252 against a ceiling of 258. With this change it is 222, and the budget file is regenerated with
--update. #6943 regenerates the same file, so whichever of the two lands second will conflict there; I'll redo--updateon that branch when it happens.Issue
Refs #5587
How I tested it
cargo +1.99.0 clippy --workspace --all-targets --all-featureswith CI's flags,cargo +1.99.0 fmt --check,cargo +1.99.0 check --workspace --lib --bins, and the MSRV job'scargo +1.89.0 check --workspace. All clean.cargo fmt --all -- --check, andcargo check/cargo clippy(CI's flags,--all-features) for palette, runtime and tui with--all-targets: clean.cargo nextest run -p codewhale-palette -p codewhale-runtime -p codewhale-tui --lib: 15623 passed, 47 failed. The 47 failures are exactly the ones current main fails on my machine (most need an extension-host Node version I don't have).check-dead-code-budget.pypasses.check-blocking-calls-budget.pyfails, but it fails the same way on current main (one newstd::fssite incrates/tui/src/oauth.rs), and this change doesn't touch it.No new tests; removing an attribute that suppresses nothing does not change behaviour.
Checklist
maincargo fmt --allpasses, and tests cover new or changed behaviordocs/features.toml(cargo test -p codewhale-tui --test feature_registrychecks it) — n/a