- Add per-file ignores for S101 (assert statements) in test files
- Add per-file ignore for PERF203 (try-except in loop) in lite_agent.py
- Replace assert with proper error handling in lite_agent.py
- Replace eval() with ast.literal_eval() for security compliance
Co-Authored-By: João <joao@crewai.com>
- Replace simple model_validate_json with convert_to_model function
- Add get_output_converter method to support converter pattern
- Handle malformed JSON wrapped in markdown code blocks
- Add comprehensive test for malformed JSON extraction
- Fixes#3480
Co-Authored-By: João <joao@crewai.com>
refactor(events): relocate events module & update imports
- Move events from utilities/ to top-level events/ with types/, listeners/, utils/ structure
- Update all source/tests/docs to new import paths
- Add backwards compatibility stubs in crewai.utilities.events with deprecation warnings
- Restore test mocks and fix related test imports
fix: resolve flaky tests and race conditions in test suite
- Fix telemetry/event tests by patching class methods instead of instances
- Use unique temp files/directories to prevent CI race conditions
- Reset singleton state between tests
- Mock embedchain.Client.setup() to prevent JSON corruption
- Rename test files to test_*.py convention
- Move agent tests to tests/agents directory
- Fix repeated tool usage detection
- Remove database-dependent tools causing initialization errors