Update TODO.md to reflect completed tests for P3 RunExecution, Runner, and Validator

- Marked several tests as completed, including those for task execution order, status updates, and validation logic.
- Added new tests for multi-turn conversation flow and error handling in the Runner tests.
- Updated the Validator tests to include scenarios for natural language rules and semantic validation.
- Revised the TODO section to outline future testing needs, specifically for the ContinueOnFailure option.
This commit is contained in:
Max 2026-01-18 10:20:33 +08:00
parent e0e68393a0
commit 1dd1785dc0

View file

@ -830,27 +830,33 @@ Created new `yao/assert` package for universal assertion/validation:
- [x] `tasks_test.go` - ParseTasks with validation rules format - [x] `tasks_test.go` - ParseTasks with validation rules format
- [x] Validation rules format aligned with `prompts.yml` guidelines - [x] Validation rules format aligned with `prompts.yml` guidelines
**TODO (Next Iteration):** **Completed Tests:**
- [ ] `executor/standard/run_test.go` - P3 RunExecution tests - [x] `executor/standard/run_test.go` - P3 RunExecution tests ✅
- [ ] Test: tasks executed in order - [x] Test: tasks executed in order (`TestRunExecutionBasic`)
- [ ] Test: task status updates (Running → Completed/Failed/Skipped) - [x] Test: task status updates (`TestRunExecutionTaskStatus`)
- [ ] Test: ContinueOnFailure option - [x] Test: remaining tasks marked as skipped on failure
- [ ] Test: remaining tasks marked as skipped on failure - [x] Test: error handling (robot nil, no tasks, non-existent assistant)
- [ ] `executor/standard/runner_test.go` - Runner tests - [x] Test: rule-based and semantic validation (`TestRunExecutionValidation`)
- [ ] Test: ExecuteWithRetry with multi-turn conversation flow - [x] Test: previous results passed as context to subsequent tasks
- [ ] Test: executeAssistantWithMultiTurn conversation continuation - [x] `executor/standard/runner_test.go` - Runner tests ✅
- [ ] Test: ExecuteMCPTask with correct ID parsing - [x] Test: ExecuteWithRetry with multi-turn conversation flow
- [ ] Test: ExecuteProcessTask with Yao process - [x] Test: max turns limit enforcement
- [ ] Test: BuildTaskContext with previous results - [x] Test: BuildTaskContext with previous results
- [ ] Test: FormatPreviousResultsAsContext formatting - [x] Test: FormatPreviousResultsAsContext formatting
- [ ] `executor/standard/validator_test.go` - Validator tests - [x] Test: BuildAssistantMessages with task content
- [ ] Test: ValidateWithContext with multi-turn state - [x] Test: FormatMessagesAsText (string, multipart, map)
- [ ] Test: isComplete determination logic - [x] Test: MCP and Process tasks (skipped - requires runtime)
- [ ] Test: checkNeedReply scenarios (clarification, feedback, incomplete) - [x] `executor/standard/validator_test.go` - Validator tests ✅
- [ ] Test: convertStringRule for natural language rules - [x] Test: ValidateWithContext with multi-turn state
- [ ] Test: parseRules for JSON assertions - [x] Test: isComplete determination logic
- [ ] Test: validateSemantic with Validation Agent - [x] Test: checkNeedReply scenarios
- [ ] Test: mergeResults logic - [x] Test: convertStringRule for natural language rules
- [x] Test: parseRules for JSON assertions (equals, regex, json_path, type)
- [x] Test: validateSemantic with Validation Agent
- [x] Test: mergeResults logic (rule + semantic)
**TODO (Future):**
- [ ] Test: ContinueOnFailure option (run_test.go)
### 9.4 Architecture ### 9.4 Architecture