Skip to content

fix(fleet): preserve durable provider refusals during retries - #6430

Closed
Hmbown wants to merge 1 commit into
fix/read-only-agent-inspection-0.10.1from
fix/typed-agent-provider-retries
Closed

Hmbown wants to merge 1 commit into
fix/read-only-agent-inspection-0.10.1from
fix/typed-agent-provider-retries

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Summary

No-Issue: this is a bounded retry-classification repair found during the 0.10.1 Fleet availability investigation, not an implementation of automatic model replacement.

Stacked on #6423 to keep the tested runtime baseline and this two-file change separate. Retarget after that prerequisite lands.

A typed quota/auth/model/policy refusal can contain 429, stream request, or temporarily unavailable in its message/context. The child retry classifier previously reinterpreted those words as transient even after the HTTP boundary classified the refusal as durable.

  • Preserve durable account/model/policy classifications instead of string-matching them back into retries.
  • Reuse LlmError::is_retryable for typed transient errors, including server 500 and network failures without a magic phrase.
  • Preserve relay HTTP-400 timeout compatibility, untyped transport/decode retries, and ordinary rate-limit Retry-After behavior.

No role, permissions, provider choice, task replay, or model replacement behavior is added.

Verification

  • 10 targeted tests passed; 0 failed; 13,242 not selected. Covers HTTP 400/402/429 quota classification, misleading durable error text, normal 429 backoff, and the real local relay timeout-then-success request loop.
  • TUI all-target/all-feature Clippy with CI flags passed: -D warnings -A clippy::uninlined_format_args -A clippy::too_many_arguments -A clippy::unnecessary_map_or.
  • cargo fmt --all -- --check, owned diff check, dead-code and blocking-call ratchets passed.
  • A probe using extracted old/new classifier source and real anyhow context reproduced quota/authz misclassification before the fix and correct behavior after; typed server 500 also changes from incorrectly fatal to retryable. This probe is not HTTP acceptance; that boundary is covered by the focused tests.
  • Published patch and both owner baselines are byte-identical to the tested local slice. No unrelated shared-checkout work included.

The first, broader attempt failed an existing relay test (6 passed, 1 failed, expected two calls, saw one). The production logic was narrowed; the existing test was not changed. No tests were removed, ignored, or weakened.

Remaining work

Explicit operator-approved replacement routes, frozen route eligibility, first-request-only replacement, and original/effective-route receipts remain separate work. This PR does not claim to make unavailable Fleet members usable.

…ation

A classified quota/auth/model/policy error can contain transient wording or
HTTP codes in its body and context. Do not turn those durable refusals back
into retries by matching their text. Reuse LlmError::is_retryable for typed
transient failures, retaining the existing relay-400/parse/transport fallback.

Verification: 10 focused tests passed, 0 failed, 13242 not selected. Includes
quota HTTP-boundary tests, misleading refusal text, ordinary rate limits,
and the actual relay timeout-then-success request loop. TUI all-target/all-
feature Clippy with CI warning flags, fmt, diff check, static ratchets passed.
Extracted old/new classifier probe with real anyhow context reproduces quota
and authorization misclassification before and correct behavior after.

Initial broad attempt: 6 passed, 1 failed (relay retry expected 2 calls, saw
1). Narrowed production logic, not the existing test; the final run passes.
No existing test changed or removed. This does not implement model replacement.
Copilot AI lite review requested due to automatic review settings September 23, 2026 12:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-23T12:52:25.361145Z f2ead77 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Hmbown Hmbown closed this Sep 24, 2026
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.

2 participants