Skip to content

refactor: remove dead resilience flags and modules#1050

Merged
joshrotenberg merged 1 commit into
mainfrom
chore/code-02-remove-resilience
Jul 23, 2026
Merged

refactor: remove dead resilience flags and modules#1050
joshrotenberg merged 1 commit into
mainfrom
chore/code-02-remove-resilience

Conversation

@joshrotenberg

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of the de-complexification (#1049), finding CODE-02. Pure deletion, behavior-preserving.

The five global flags --no-resilience, --no-circuit-breaker, --no-retry, --retry-attempts, --rate-limit showed in every command's --help but did nothing: crates/redisctl/src/resilience.rs is a stub whose wrap_* functions return the client unchanged, and it was never declared in main.rs, so it only ever compiled into the lib target. A user passing --retry-attempts 5 got no retries.

Removed

  • The five flags from Cli (crates/redisctl/src/cli/mod.rs).
  • Both resilience modules: crates/redisctl/src/resilience.rs and crates/redisctl-core/src/config/resilience.rs, plus the mod/pub use lines and the ResilienceConfig re-exports.
  • The unused resilience field on Profile and all its initializers. serde ignores unknown fields, so an existing config with a resilience section still loads.
  • The --retry-attempts/--rate-limit/--no-* entries in the main.rs prefix scanner.

Re-introduce the flags under the same names if and when tower middleware actually lands.

Validation

  • Flags gone from every command's help (0 mentions).
  • cargo build --workspace, cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo test --workspace --all-features: all pass.

The five global flags --no-resilience, --no-circuit-breaker, --no-retry,
--retry-attempts, and --rate-limit appeared in every command's help but
were wired to nothing: crates/redisctl/src/resilience.rs is a stub whose
wrap_* functions return the client unchanged, and it was not even
declared in main.rs, so it only ever compiled into the lib target.

Remove the flags, both resilience modules (redisctl and redisctl-core),
the ResilienceConfig re-exports, the unused `resilience` field on
Profile (silently ignored by serde, so existing configs still load),
and the prefix-scanner entries in main.rs. Re-introduce the flags under
the same names if and when tower middleware actually lands.

Part of #1049 (CODE-02), phase 1 of the de-complexification.
@joshrotenberg
joshrotenberg merged commit 4b2b1ad into main Jul 23, 2026
16 checks passed
@joshrotenberg
joshrotenberg deleted the chore/code-02-remove-resilience branch July 23, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant