Repository navigation
Conversation
Refs codewhale-hq#5587 Removed `#![allow(dead_code)]` from worker_profile.rs, model_profile.rs, tui/git_status.rs, fleet/roster.rs and fleet/task_spec.rs, then let `cargo check -p codewhale-tui --all-targets` (warnings are denied) say what each one was hiding: - worker_profile.rs: nothing. The allow and its "consumers are wired in a follow-up" note were stale. - model_profile.rs: `FactProvenance::LegacyModelHeuristics` has had no constructor since 5cf09da moved `model_profile()` off `model_registry::lookup`, so it is deleted. `supports_image_input`, `has_large_context`, `prefers_full_tool_surface` and `suitable_for_broad_fleet_worker` are only called from this module's tests and are now `#[cfg(test)]`. - git_status.rs: `chrome_label` and `chrome_ink` lost their last caller when 07a95e5 deleted the underwater header widget. Their own tests are all that is left, so `#[cfg(test)]`. - roster.rs: `load_with_personal_dir` and `shadowed_for` are only used by the roster tests and fleet/tests/roster_shadow_and_trust.rs. `#[cfg(test)]`. - task_spec.rs: `record_verification_receipt` is only called from its test. `#[cfg(test)]`, together with the `FleetLedger` import it was the last non-test user of. Nothing in these five files is reached only from `cfg(unix)` or `cfg(windows)` code, so the Windows build sees the same result as macOS. llm_client/mock.rs keeps its allow: tests/support pulls it into the integration crate by `#[path]`, and that crate never uses `FauxStep::Error` or `push_error`. Budget: main measures 252 against a ceiling of 258. This change makes it 247, and `check-dead-code-budget.py --update` writes that.
2 of 3 tasks
Hmbown
approved these changes
Oct 9, 2026
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
A slice of #5587. I took the
#![allow(dead_code)]off five modules and letcargo check -p codewhale-tui --all-targetsshow what each one was covering:worker_profile.rs: nothing. The allow was stale.model_profile.rs:FactProvenance::LegacyModelHeuristicshas had no constructor since 5cf09da movedmodel_profile()offmodel_registry::lookup, so it is deleted. Four predicates (supports_image_input,has_large_context,prefers_full_tool_surface,suitable_for_broad_fleet_worker) are only called from the module's tests and are now#[cfg(test)].tui/git_status.rs:chrome_labelandchrome_inklost their last caller when 07a95e5 deleted the underwater header widget. Only their tests use them now, so#[cfg(test)].fleet/roster.rs:load_with_personal_dirandshadowed_forare test seams.#[cfg(test)].fleet/task_spec.rs:record_verification_receiptis only called from its test.#[cfg(test)], along with theFleetLedgerimport.None of these files has items that are only reached from
cfg(unix)orcfg(windows)code, so Windows sees the same result as macOS.llm_client/mock.rslooked stale too but isn't:tests/supportpulls it into the integration crate by#[path], and that crate never usesFauxStep::Errororpush_error. I left it alone.Main measures 252 against a ceiling of 258. With this change it is 247, and the budget file is regenerated with
--update.Issue
Refs #5587
How I tested it
cargo check -p codewhale-tui --all-targetsandcargo clippy -p codewhale-tui --all-targets --all-featureswith CI's flags: clean.cargo fmt --all -- --check: clean.cargo nextest run -p codewhale-palette -p codewhale-runtime -p codewhale-tui --lib: 15623 passed, 47 failed. The 87 tests in the five touched modules all pass. 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.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.No new tests; nothing here changes 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