From 76783377ecb4e1035f276dc0cbcd84d26c8f401e Mon Sep 17 00:00:00 2001 From: TheArchitectit Date: Wed, 3 Jun 2026 13:19:25 -0500 Subject: [PATCH] fix: address CI failures and reviewer feedback on #3214 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing retry_after: None field to ApiError::Api construction in main.rs test. This field was introduced by the Retry-After header support but was not added to the test's error initializer, causing a compile error under CI's strict mode. - Remove duplicate #[must_use] attribute on retry_after() method in error.rs (lines 134+138 both had it; kept the outer one above the doc comment per convention). - Cargo fmt --all run. - Reviewer question "Are defaults preserved?" — answered yes: ApiTimeoutConfig defaults to 30s connect / 300s request / 8 retries. with_retry_policy() is opt-in. No behavior change without explicit configuration. --- rust/crates/api/src/error.rs | 1 - rust/crates/rusty-claude-cli/src/main.rs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/crates/api/src/error.rs b/rust/crates/api/src/error.rs index 60ae1f5f..6c93ee9b 100644 --- a/rust/crates/api/src/error.rs +++ b/rust/crates/api/src/error.rs @@ -135,7 +135,6 @@ impl ApiError { /// Return the `Retry-After` delay if this error came from a 429 response /// that included a `retry-after` header. Callers should prefer this value /// over the computed backoff delay when it exists. - #[must_use] pub fn retry_after(&self) -> Option { match self { Self::Api { retry_after, .. } => *retry_after, diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 417d1e09..ce91f018 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -11693,6 +11693,7 @@ mod tests { body: String::new(), retryable: false, suggested_action: None, + retry_after: None, }; let rendered = format_user_visible_api_error("session-issue-32", &error); @@ -11728,7 +11729,7 @@ mod tests { retryable: false, suggested_action: None, retry_after: None, -}), + }), }; let rendered = format_user_visible_api_error("session-issue-32", &error);