[AAASM-4790] 🐛 (adapters): Fail closed on missing langchain check + warn on adapter register failure - #274
Merged
Chisanan232 merged 4 commits intoJul 17, 2026
Conversation
on_tool_start allowed unconditionally when the wired interceptor exposed no check_tool_start, silently skipping pre-execution governance under enforce. Mirrors the other adapters' _missing_interceptor_decision fallback: deny under enforce, fail open under observe/disabled. Refs AAASM-4790
Covers AAASM-4790: on_tool_start blocks under enforce and allows under observe/disabled when the interceptor has no check_tool_start.
_register_adapters swallowed register_hooks exceptions with a bare continue, leaving a co-installed framework running fully ungoverned with no trace. Emits an unconditional stderr warning naming the framework, mirroring _warn_agent_unregistered; init still proceeds. Refs AAASM-4790
Covers AAASM-4790: _register_adapters warns on stderr naming the broken framework and still registers the remaining healthy adapters.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
Claude Code — automated reviewCI: green. Scope: matches the ticket. Side effects: none — green full-suite CI (incl. build/lint/impacted tests) validates no existing-function breakage. Front-End: no FE/dashboard code touched → no Playwright validation applies. Verdict: ✅ ready to approve & merge. |
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
Closes two enforce-consistency gaps left after the recent adapter fail-closed work:
AssemblyCallbackHandler.on_tool_start(LangChain adapter) allowed unconditionallywhen the wired interceptor exposed no
check_tool_start, silently skippingpre-execution governance under
enforce. It now mirrors the other adapters'_missing_interceptor_decisionfallback: deny (raiseToolExecutionBlockedError)under
enforce, fail open underobserve/disabled._register_adapters(core/assembly.py) swallowed anyregister_hooksexceptionwith a bare
continue, leaving a co-installed framework running fully ungovernedwith no trace. It now emits an unconditional stderr warning naming the framework
that failed to attach, mirroring
_warn_agent_unregistered. Init still proceeds(the
continueis unchanged) — other adapters may register fine.agent_assembly/adapters/openai_agents/patch.pyis intentionally untouched (owned byAAASM-4782). The haystack duplication noted during investigation is INFO-level and
out of scope for this ticket.
Type of Change
Breaking Changes
Related Issues
Fixes AAASM-4790
Testing
Added regression tests:
test/unit/adapters/langchain/test_callback_handler_sync.py:on_tool_startblocks under enforce and allows under observe/disabled when the interceptor has
no
check_tool_start.test/unit/test_assembly.py:_register_adaptersemits a stderr warning namingthe broken framework when
register_hooksraises, and still registers theremaining healthy adapters.
Ran only the impacted test files (per ticket scope), not the full suite:
ruff check,ruff format --check, andmypy agent_assembly/mypy test/unit/test_assembly.pyare clean on the touched files (pre-existing unrelated
agent_assembly._core/grpcstub errors are unchanged baseline noise, not introduced by this PR).Checklist