chore(tui): gate audited test-only helpers - #5666
Closed
wuisabel-gif wants to merge 1 commit into
Closed
Conversation
Convert the first audited test-only dead-code slice to cfg(test), covering rendering/text fixtures and helper surfaces while preserving runtime behavior. Add direct tests for scroll and exploration wrappers for Hmbown#5587.
Owner
|
Thank you, Isabel. I verified this patch is already on I’m closing this duplicate PR because the contribution is already shipped on |
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.
Summary
Addresses the approved bounded first slice of #5587.
This PR converts 13 audited test-only helper surfaces from
#[allow(dead_code)]to#[cfg(test)]across TUI rendering/text fixtures:Where a gated helper had no existing direct consumer, a small property test now exercises the helper (
FileTreeState::adjust_scroll,ExploringCell::lines_with_motion, and whale state priority). Production consumers were verified withcargo check -p codewhale-tui --lib; no runtime behavior or production code path changes are intended.Stale production-use allowances, blanket conversions, and Tier C intent-check items remain out of scope.
Tests
Passed locally:
cargo fmt --all -- --checkgit diff --checkRUST_MIN_STACK=16777216 cargo test -p codewhale-tui --lib --locked— 11,228 passed, 0 failed, 13 ignoredcargo check -p codewhale-tui --lib --lockedThe default-stack full TUI test run is blocked by the known #5585 baseline stack overflow in
runtime_api::tests::reload_config_preserves_profile_selected_named_custom_route; the documented 16 MiB stack setting passes the full suite.Strict Clippy is currently blocked on the untouched
runtime_threads.rs:2562baseline functionaccumulate_runtime_cost_coverage(clippy::too_many_arguments, 9/7), which is outside this cleanup slice and already present onorigin/main.No provider credentials or network access are required.
No-Issue: This PR addresses the approved first #5587 test-only-marker slice without automatically closing the broader audit issue.