deerflow2/tests/unit
Willem Jiang 36bf5c9ccd
fix: repair missing step_type fields in Plan validation (#653)
* fix: resolve issue #650 - repair missing step_type fields in Plan validation

- Add step_type repair logic to validate_and_fix_plan() to auto-infer missing step_type
- Infer as 'research' when need_search=true, 'processing' when need_search=false
- Add explicit CRITICAL REQUIREMENT section to planner.md emphasizing step_type mandatory for every step
- Include validation checklist and examples showing both research and processing steps
- Add 23 comprehensive unit tests for validate_and_fix_plan() covering all scenarios
- Add 4 integration tests specifically for Issue #650 with actual Plan validation
- Prevents Pydantic ValidationError: 'Field required' for missing step_type

* Update tests/unit/graph/test_plan_validation.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/unit/graph/test_plan_validation.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update the planner.zh_CN.md with recent changes of planner.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-24 21:26:48 +08:00
..
checkpoint feat: support dify in rag module (#550) 2025-09-16 20:30:45 +08:00
config feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00
crawler fix: resolve issue #651 - crawl error with None content handling (#652) 2025-10-24 17:06:54 +08:00
graph fix: repair missing step_type fields in Plan validation (#653) 2025-10-24 21:26:48 +08:00
llms feat: support dify in rag module (#550) 2025-09-16 20:30:45 +08:00
prompt_enhancer feat: 1. replace black with ruff for fomatting and sort import (#489) 2025-08-17 22:57:23 +08:00
rag feat: Add intelligent clarification feature in coordinate step for research queries (#613) 2025-10-14 13:35:57 +08:00
server fix: Refine clarification workflow state handling (#641) 2025-10-22 22:49:07 +08:00
tools fix: resolve issue #651 - crawl error with None content handling (#652) 2025-10-24 17:06:54 +08:00
utils feat: Add intelligent clarification feature in coordinate step for research queries (#613) 2025-10-14 13:35:57 +08:00