fix(retryProvider): Populate mismatch diagnostics on the no-fallback quorum error - #1484
Open
droplet-rl wants to merge 1 commit into
Open
fix(retryProvider): Populate mismatch diagnostics on the no-fallback quorum error#1484droplet-rl wants to merge 1 commit into
droplet-rl wants to merge 1 commit into
Conversation
…quorum error Codex review follow-up: the early-exit path passed no quorum candidate to throwQuorumError, so the warn log reported mismatchedProviders: [] even though the only way to reach that path is that the successful providers disagreed. Extract the result-frequency counting into findQuorumCandidate and use it on both quorum-failure paths, so the most frequent result stands in for the quorum result and the log identifies which providers diverged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Follow-up to #1483, addressing the Codex P2 finding (#1483 (comment)). The fix was committed to the PR branch but #1483 was squash-merged moments before the push landed, so it never reached master.
When quorum fails on the early-exit path (no fallback providers left),
throwQuorumError()was called without a quorum candidate, so the diagnostic warn log reportedmismatchedProviders: []— even though the only way to reach that path is that the successful providers disagreed.This extracts the result-frequency counting into a
findQuorumCandidatehelper and uses it on both quorum-failure paths: the early-exit path now computes the most frequent result from the successful providers' responses and measures mismatches against it, so the log identifies which providers diverged.Includes a test asserting
mismatchedProvidersis populated on the no-fallback path.🤖 Generated with Claude Code