[AAASM-1678] ✅ (adapters/google_adk): Add Google ADK interception integration test#47
Merged
Chisanan232 merged 1 commit intoMay 21, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Two tests:
* A two-tool async flow under a `monkeypatch`ed `google.adk.tools.BaseTool`
that verifies a denied tool raises `PolicyViolationError("blocked by
governance policy")` while a subsequent safe tool still executes its
patched `run_async` path through `record_result`.
* A real-`BaseTool` patch-path test guarded by `pytest.importorskip` that
asserts the patched flag is set after `apply()` and cleared after
`revert()` against the live `google.adk.tools.BaseTool` class.
Test marked `@pytest.mark.integration`; skips cleanly without `google-adk`.
Refs: AAASM-1678
9cc0efb to
c107b9d
Compare
|
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.



Description
Adds an integration test exercising
GoogleADKPatchagainst thegoogle.adk.tools.BaseToolpatch path. Two tests:monkeypatch-installedFakeBaseTool— verifies a denied tool raisesPolicyViolationError("blocked by governance policy")while a sibling safe tool's patchedrun_asyncstill executes and records its result.BaseToolpatch path — guarded bypytest.importorskip("google.adk.tools"). Asserts the patched flag is set afterapply()and cleared afterrevert()against the liveBaseToolclass whengoogle-adkis installed.This is sub-task 2 of AAASM-1550. Stacked on top of #46 (AAASM-1677). Once #46 merges, this PR will show only the new test file in its diff.
Type of Change
Breaking Changes
Related Issues
Testing
Local run:
```text
test/integration/test_google_adk_interception_integration.py
test_google_adk_two_tool_flow_continues_after_blocked_tool PASSED
test_google_adk_real_base_tool_class_patch_path_when_available SKIPPED (no google-adk locally)
```
Checklist
🤖 Generated with Claude Code