Skip to content

test(anthropic): follow the renamed refusal rotators in source oracles - #6349

Merged
lidge-jun merged 1 commit into
devfrom
codex/fix-sidecar-on429-oracle
Oct 1, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/fix-sidecar-on429-oracle

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

#6347 folded the Anthropic 429 and proven-403 recovery into rotateAnthropicAccountOnResponse (call sites) and rotateAnthropicAccountOnRefusal / recordAnthropicAccountRefusal (pool policy). Two source-oracle tests still searched for the old names. The final dev Cross-platform CI run 36806598410 failed on Linux, macOS and Windows with:

  • tests/oauth/generic-oauth-failover.test.ts "sidecar on429 wiring" (two cases): the rotator count and reachability checks looked for rotateAnthropicAccountOn429(.
  • tests/routing/always-on-429-failover.test.ts "the rotator cannot be re-gated behind the pool flag": it read the body of rotateAnthropicAccountOn429, which now only delegates.

The tests now follow the renamed functions and keep the same invariants. The recovery count is still 3 at the same sites, reachability ordering is unchanged, and the pool flag is still checked only together with the quorum inside the recorder.

Verification

  • bun test tests/oauth/generic-oauth-failover.test.ts tests/routing/always-on-429-failover.test.ts plus the five other tests that read the dispatch/sidecar/continuation sources and the layout/ratchet guards: 142 pass / 0 fail.
  • Cross-platform CI reruns once on the dev tip after this merge.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Tests
    • Updated automated checks for Anthropic account rotation and refusal handling, including the order of refusal recording and failover eligibility checks.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 1, 2026 02:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-10-01T02:50:03.186027Z a79913a 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.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6807a170-f61e-4928-9c2c-b0e3367a40b3

📥 Commits

Reviewing files that changed from the base of the PR and between c4a5219 and a79913a.

📒 Files selected for processing (2)
  • tests/oauth/generic-oauth-failover.test.ts
  • tests/routing/always-on-429-failover.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Two source-inspection tests now check shared Anthropic response and refusal handler names instead of 429-specific names. The routing test retains its assertions about recorder call order and pool-flag conditions.

Changes

Anthropic failover test assertions

Layer / File(s) Summary
Update handler name assertions
tests/oauth/generic-oauth-failover.test.ts, tests/routing/always-on-429-failover.test.ts
The OAuth test checks rotateAnthropicAccountOnResponse in two assertions. The routing test checks rotateAnthropicAccountOnRefusal and recordAnthropicAccountRefusal; its call-order and pool-flag assertions remain.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to a7991

The test assertions now follow the shared Anthropic handlers and match their current responsibilities. No merge-blocking issue was identified.

Architecture Summary

Architecture risk: 🔵 Low · up to a7991

The change affects 1 system.

Changed systems: tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in tests/oauth/generic-oauth-failover.test.ts: The sidecar-hook assertion now searches for rotateAnthropicAccountOnResponse instead of rotateAnthropicAccountOn429.
  • observed — Modified behavior in tests/oauth/generic-oauth-failover.test.ts: The rotator-count assertion now matches rotateAnthropicAccountOnResponse instead of rotateAnthropicAccountOn429.
  • observed — Modified behavior in tests/routing/always-on-429-failover.test.ts: Updated the source-inspection test from the 429-specific rotator and recorder to the shared refusal-handling functions. It continues to assert that the rotator calls the recorder before any pool-flag check.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: updating Anthropic source-oracle tests to follow renamed refusal rotators. It is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration into dev by @lidge-jun: fixes the final dev Cross-platform CI failure (run 36806598410, Linux/macOS/Windows) caused by stale source-oracle names after #6347. The same invariants are kept; 142 pass locally across the oracle and guard tests. Cross-platform CI reruns once on the new dev tip.

@lidge-jun
lidge-jun merged commit 82a4955 into dev Oct 1, 2026
31 of 34 checks passed
@lidge-jun
lidge-jun deleted the codex/fix-sidecar-on429-oracle branch October 1, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant