2 Commits

Author SHA1 Message Date
CrazyBoyM
7d71386a8e test: comprehensive test coverage for v0-v4 agents
Unit tests (25 tests):
- TodoManager edge cases: empty list, status transitions, missing fields, invalid status, render format
- v3 subagent: AGENT_TYPES structure, get_tools_for_agent, get_agent_descriptions, Task tool schema
- v4 skills: SkillLoader init, parse valid/invalid SKILL.md, get_skill_content, list_skills, Skill tool schema
- Security: safe_path path traversal prevention
- Config: ANTHROPIC_BASE_URL support

Integration tests (21 tests):
- v0: bash echo, bash pipeline
- v1: read_file, write_file, edit_file, read_edit_verify
- v2: TodoWrite single task, TodoWrite multi-step
- Error handling: file not found, command fails, edit string not found
- Workflows: create Python script, find and replace, directory setup
- Edge cases: unicode content, empty file, special chars, multiline edit, nested directory, large output, concurrent files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:26:30 +08:00
CrazyBoyM
e5ef71fb15 test: add comprehensive unit tests
Unit tests (no API required):
- test_imports: All agent modules importable
- test_todo_manager_basic: TodoManager CRUD
- test_todo_manager_constraints: Max items, one in_progress
- test_reminder_constants: INITIAL_REMINDER, NAG_REMINDER
- test_nag_reminder_in_agent_loop: NAG injection in correct place
- test_env_config: MODEL_ID, ANTHROPIC_BASE_URL from env
- test_default_model: Default model fallback
- test_tool_schemas: v1 tool definitions valid

CI now runs unit-test and integration-test as separate jobs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 00:42:09 +08:00