Conversation
…y points
Neither public entry point had a caller; the live path is the bridge's
recursive run_rlm_turn_inner_with_usage. Their pub signatures put
CodewhaleClient and Event into the crate's public API, which kept a set of
test-only items looking "live" to rustc. Removing them unmasks that set, so
this also:
- gates test-only helpers with #[cfg(test)]: run_rlm_turn_inner,
CodewhaleClient::refresh_catalog_cache + publish_provider_lake_scope,
ErrorEnvelope::{fatal,network}, redact_api_key_from_message,
LlmError::from_http_response_with_request_context,
replace_provider_live_snapshot, ProviderAvailability::label,
ToolInspectionSnapshot::from_prepared_request,
UserInputRequest::{from_value,validate} (production uses the *_with_limits
forms). No production behavior changes.
- deletes items nothing used, not even tests: ToolVisibility::{RegistryOnly,
Hidden}, AuthenticationErrorContext::new,
AuthenticationErrorDetail::message, ErrorEnvelope::tool.
- marks Event::ElevationRequired with cfg_attr(not(test), expect(dead_code)):
every consumer handles it, but the engine never emits it. Wiring an emitter
or removing the elevation flow is a separate decision.
The RLM wall-clock bound (rest of #6511) is untouched and still open.
Verification:
- scripts/dev-cargo.sh clippy -p codewhale-tui --all-targets --locked with
CI's flags (-D warnings, 3 allows): clean
- scripts/dev-cargo.sh test -p codewhale-tui --lib -- rlm:: tool_inspection::
tools::user_input:: error_taxonomy:: llm_client:: refresh_catalog_cache
provider_lake:: : 201 passed, 0 failed
- cargo fmt --check, blocking-calls budget, dead-code budget (260 <= 272),
command-crate boundaries, module_graph --check: pass
Refs #6511
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Hmbown
force-pushed
the
ms-6511-rlm-dead-entry
branch
from
September 27, 2026 02:55
5be5010 to
e22c862
Compare
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.
Refs #6511
Removes the last dead RLM entry points from #6511. The wall-clock bound is a separate question waiting on a founder decision, so this PR leaves it alone.
turn_timeout()and the module doc about it are unchanged.What changed
pub async fn run_rlm_turnandrun_rlm_turn_with_root(crates/tui/src/rlm/turn.rs) and their re-export inrlm/mod.rs.rgover the workspace and tests found no callers. The only live path isbridge.rs→run_rlm_turn_inner_with_usage.CodewhaleClientandEventinto the crate's public API. That made rustc treat a set of test-only items as live. Removing the entry points unmasked 15 dead-code errors. This PR resolves them without changing production behavior:#[cfg(test)](only tests use them):run_rlm_turn_inner,CodewhaleClient::refresh_catalog_cacheandpublish_provider_lake_scope,ErrorEnvelope::{fatal, network},redact_api_key_from_message,LlmError::from_http_response_with_request_context,provider_lake::replace_provider_live_snapshot,ProviderAvailability::label,ToolInspectionSnapshot::from_prepared_request,UserInputRequest::{from_value, validate}. Production already calls the*_with_limitsforms, so validation at the trust boundary is unchanged.ToolVisibility::{RegistryOnly, Hidden},AuthenticationErrorContext::new,AuthenticationErrorDetail::message,ErrorEnvelope::tool.Event::ElevationRequirednow hascfg_attr(not(test), expect(dead_code)). The TUI, runtime threads, exec agent and protocol parity all handle it, but the engine never emits it (git log -Sshows no emitter incore/). Choosing between wiring an emitter and removing the sandbox-elevation flow is out of scope here. This adds oneexpectto the dead-code count, which goes from 259 to 260 and stays under the budget of 272.Verification (local)
CARGO_BUILD_JOBS=4 scripts/dev-cargo.sh clippy -p codewhale-tui --all-targets --locked -- -D warnings -A clippy::uninlined_format_args -A clippy::too_many_arguments -A clippy::unnecessary_map_or: clean. The same command without--all-targetson origin/main was also clean, and the errors listed above appeared only after the deletion.scripts/dev-cargo.sh test -p codewhale-tui --lib --locked -- rlm:: tool_inspection:: tools::user_input:: error_taxonomy:: llm_client:: refresh_catalog_cache provider_lake::: 201 passed, 0 failed.cargo fmt --all -- --check,check-blocking-calls-budget.py,check-dead-code-budget.py,check-command-crate-boundaries.py,split/module_graph.py --check: all pass.🤖 Generated with Claude Code