From 547bf1ee9e5baaf05924a50f6a6f3cc95f706517 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 23 Jul 2026 08:21:53 -0700 Subject: [PATCH] test: isolate unmatched-hint regression from live ~/.claude credentials Follow-up to the #65844 salvage: the new anthropic pool test must stub read_claude_code_credentials like the sibling tests, otherwise a dev machine's live claude_code singleton seeds a third entry and the no-benching assertion fails outside CI. --- tests/agent/test_credential_pool.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/agent/test_credential_pool.py b/tests/agent/test_credential_pool.py index 8e3884ca37a6a..30d0dd0150436 100644 --- a/tests/agent/test_credential_pool.py +++ b/tests/agent/test_credential_pool.py @@ -453,6 +453,10 @@ def test_unmatched_api_key_hint_rotates_without_benching_innocent_key(tmp_path, innocent credential. Now it rotates without marking anything. """ monkeypatch.setenv("HERMES_HOME", str(tmp_path / "hermes")) + # Keep the dev machine's live ~/.claude credentials from seeding a + # claude_code singleton entry into this pool (same isolation as the + # other anthropic pool tests in this file). + monkeypatch.setattr("agent.anthropic_adapter.read_claude_code_credentials", lambda: None) _write_auth_store( tmp_path, {