test(agents): cover human input flag on executor#6069
Conversation
|
I attempted to add the required |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds an ask_for_human_input property to AgentExecutor that proxies the internal state flag via self.state, and adds tests verifying getter/setter synchronization and SyncHumanInputProvider.handle_feedback behavior when prompt input is empty. ChangesHuman Input Property Exposure
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ba140f1 to
519855c
Compare
bfe1147 to
4bce2e0
Compare
|
Rebased this onto current Validation after the update: |
4bce2e0 to
9b80aa3
Compare
|
Rebased this PR onto current main again; the branch is mergeable and CI has re-run successfully. Validation after the rebase: |
9b80aa3 to
71c6f8f
Compare
71c6f8f to
87df41a
Compare
Summary
Fixes #6065.
After rebasing onto current
main, the implementation fix forAgentExecutor.ask_for_human_inputis already present upstream. This PR has been narrowed to regression coverage that verifies the executor exposes the human-input flag expected byExecutorContextconsumers and that the sync human-input provider can clear the executor state flag after feedback handling.Tests
uv run pytest lib/crewai/tests/agents/test_agent_executor.py::TestAgentExecutor::test_ask_for_human_input_delegates_to_state lib/crewai/tests/agents/test_agent_executor.py::TestAgentExecutor::test_human_input_provider_can_clear_executor_state_flag -q-> 2 passeduv run pytest lib/crewai/tests/agents/test_agent_executor.py -q-> 93 passeduv run ruff check lib/crewai/src/crewai/experimental/agent_executor.py lib/crewai/tests/agents/test_agent_executor.py-> passeduv run ruff format --check lib/crewai/src/crewai/experimental/agent_executor.py lib/crewai/tests/agents/test_agent_executor.py-> passeduv run mypy lib/crewai/src/crewai/experimental/agent_executor.py-> passeduv run python -m py_compile lib/crewai/src/crewai/experimental/agent_executor.py lib/crewai/tests/agents/test_agent_executor.py-> passedgit diff --check-> passedAI disclosure
This PR was authored with AI assistance and reviewed before submission. Per CONTRIBUTING.md, please apply the
llm-generatedlabel if I cannot apply it from my fork permissions.