The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(mcp): pin the redacted token-error excerpt by contract, not by exact redaction span
teknium12d5d12c33f53
diff --git a/tests/tools/test_mcp_oauth.py b/tests/tools/test_mcp_oauth.pyindex 9c0abbaddcb..38a321b32b1 100644--- a/tests/tools/test_mcp_oauth.py+++ b/tests/tools/test_mcp_oauth.py@@ -331,7 +331,8 @@ class TestBuildOAuthAuth:await provider._handle_token_response(httpx.Response(403, content=waf.encode()))message = str(exc_info.value)- assert message.startswith("Token exchange failed (403): ERROR 403 ERROR Request blocked. Bearer [REDACTED]")+ assert message.startswith("Token exchange failed (403): ERROR 403 ERROR Request blocked.")+ assert "[REDACTED]" in messageassert "<" not in message and "leaked-bearer-token" not in messageassert len(message) <= len("Token exchange failed (403): ") + 200assert provider.context.current_tokens is None