Address GitHub review feedback for selective execution feature

- Enhanced error messages with specific action and available tags information
- Improved type safety by removing problematic TaskSelectorType alias
- Added comprehensive tag validation with normalization in Task class
- Fixed edge case handling for untagged tasks in tag selector
- Added test for invalid tag types validation
- Maintained backward compatibility while optimizing performance

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-06-03 17:17:00 +00:00
parent 0e963b6de1
commit b262f05c97
6 changed files with 215 additions and 26 deletions

View File

@@ -0,0 +1,18 @@
from crewai import Crew, Agent, Task, Process
print('Basic imports work')
agent = Agent(role="Test", goal="Test", backstory="Test")
task = Task(description='test', expected_output='test', agent=agent, tags=['test'])
print('Tags field works:', task.tags)
crew = Crew(agents=[agent], tasks=[task], task_selector=lambda inputs, task: True)
print('Task selector field works')
print('Process.selective exists:', hasattr(Process, 'selective'))
print('Process.selective value:', Process.selective if hasattr(Process, 'selective') else 'Not found')
selector = Crew.create_tag_selector()
print('create_tag_selector works:', callable(selector))
print('All basic functionality tests passed!')