The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(redact): a2a superset test asserts every credential class; drop dead mask branch
teknium19401cc16437c
diff --git a/plugins/memory/honcho/oauth.py b/plugins/memory/honcho/oauth.pyindex b2153f3e2ad..7de658ca342 100644--- a/plugins/memory/honcho/oauth.py+++ b/plugins/memory/honcho/oauth.py@@ -13,7 +13,6 @@ import hashlibimport jsonimport loggingimport os-import reimport threadingimport timefrom contextlib import contextmanager, suppressdiff --git a/tests/gateway/test_telegram_noise_filter.py b/tests/gateway/test_telegram_noise_filter.pyindex 3c7b292bf95..b46613e2756 100644--- a/tests/gateway/test_telegram_noise_filter.py+++ b/tests/gateway/test_telegram_noise_filter.py@@ -222,10 +222,8 @@ def test_chat_gateways_redact_secret_in_non_error_body(platform):assert "sk-ABCDEF0123456789abcdef0123" not in sanitizedassert "sk-ABCDEF" not in sanitized- # The secret body is gone — assert the invariant, not the specific mask- # marker. The outbound redactor delegates to redact_sensitive_text (#23810),- # which masks as `***`/partial; the local pattern fallback uses `[REDACTED]`.- assert "***" in sanitized or "[REDACTED]" in sanitized+ # redact_for_egress masks a prefix token through _mask_token: `***` or a head...tail stub.+ assert "***" in sanitized# Non-secret prose is preserved — redaction is surgical, not a wholesale# rewrite, on bodies that are not provider-error envelopes.assert "here is the example request you asked for" in sanitizeddiff --git a/tests/plugins/test_a2a_plugin.py b/tests/plugins/test_a2a_plugin.pyindex 6a9b0aada7a..4dcd1870f2b 100644--- a/tests/plugins/test_a2a_plugin.py+++ b/tests/plugins/test_a2a_plugin.py@@ -192,12 +192,9 @@ class TestOutboundRedaction:token = next((prefix + body for body in bodies if re.fullmatch(pattern, prefix + body)), None)assert token, f"could not synthesize a token for {pattern!r}"tokens.append(token)+ assert len(tokens) == len(R._PREFIX_PATTERNS) + len(R._plugin_patterns())for token in tokens:- leaked = R.redact_sensitive_text(f"peer, here: {token}", force=True)- if token in leaked:- continue # the canonical redactor itself passes it (word-boundary/shape rule); not our contractassert token not in security.redact_outbound(f"peer, here: {token}"), token- assert len(tokens) >= 50def test_bearer_and_email_redacted(self):out = security.redact_outbound("Authorization: Bearer opaque0123456789abcdef; contact me at [email protected]")