Repository navigation
fix(tools): fail-closed when require_confirmation callable returns non-bool - #7514
FOWEPJF255 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
f37e401 to
0b34d0a
Compare
|
Ran this merged onto current main. main got require_confirmation on FunctionNode in 988fd1a (12 Oct), and One catch before copying the isinstance check over: main's test_node_require_confirmation_callable_predicate uses a predicate that returns "" for no confirmation, and |
|
Thanks for spotting the new |
45a5faa to
7ec671e
Compare
Summary
FunctionToolorMCPToolconfirmation predicate returns a non-boolean value, includingNonefrom an unhandled branch.FunctionNodeconfirmation path:Nonerequires confirmation, while other results retain its existing truth-value behavior (including the empty-string predicate case).Fixes #7010
Testing plan
231 passed.ruff checkpassed on all six changed files.pyink --checkpassed on the changed workflow source and test files.toxsuite and manual end-to-end run were not performed.The workflow regression drives an in-memory
Workflowthrough the confirmation pause and approved resume; it checks that the guarded node does not execute before approval.AI disclosure: Assisted by an AI coding agent; I reviewed the change and can explain and maintain it.