fix(delegate): normalize ACP args before delegation#19472
Open
LeonSGP43 wants to merge 1 commit into
Open
Conversation
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.
Summary
AIAgent, delegated child agents, orCopilotACPClientSimpleNamespacewithout raisingTypeErrorWhy
Fixes #19462. The failing path reports
TypeError: types.SimpleNamespace object is not iterablebefore the ACP delegated task can complete. The fix keeps ACP arg handling list-shaped and drops invalid namespace/dict values instead of iterating them.Test
scripts/run_tests.sh tests/run_agent/test_run_agent.py::test_aiagent_ignores_namespace_acp_args_alias tests/tools/test_delegate.py::TestDelegationProviderIntegration::test_build_child_agent_drops_non_iterable_acp_args tests/agent/test_copilot_acp_client.py::CopilotACPClientSafetyTests::test_namespace_acp_args_do_not_crash_client_initNote
scripts/run_tests.sh tests/tools/test_delegate.py tests/agent/test_copilot_acp_client.pycurrently hits the existing heartbeat timing assertionTestDelegateHeartbeat::test_heartbeat_does_not_trip_idle_stale_while_inside_tool; the ACP regression tests above pass.