Task 18: AgentEnumValidator Tests
Status: NOT STARTED Agent: @python-pytest-architect Dependencies: Task 11 Priority: 4 Complexity: M Accuracy Risk: Low
Context
AgentEnumValidator needs comprehensive test coverage for enum validation and suggestion quality.
Objective
Create complete test suite for AgentEnumValidator achieving 90%+ coverage.
Required Inputs
- Architecture spec: ./architect-plugin-linter.md lines 983-995 (AgentEnumValidator test requirements)
- Completed Task 11: AgentEnumValidator implementation
- Test pattern: plugins/plugin-creator/tests/test_frontmatter_validator.py
Requirements
- Create test_agent_enum_validator.py with pytest test class
- Test valid agent enum combinations (parametrized)
- Test invalid model values → AG001 with suggestions
- Test invalid permissionMode values → AG002 with suggestions
- Test invalid memory values → AG003 with suggestions
- Test missing required fields → AG004, AG005
- Test invalid maxTurns → AG006
- Test invalid color values → AG007 (warning)
- Test disallowedTools validation → AG008 (warning)
- Test tools/disallowedTools conflict → AG009
- Test hooks reference validation → AG010
- Parametrize valid enum combination tests
- Verify suggestion quality for invalid enum values
- Achieve 90%+ coverage
Constraints
- MUST verify enum value suggestions are accurate
- MUST test all valid enum combinations
- MUST test file type filtering (only runs on AGENT files)
- MUST achieve minimum 90% coverage
Expected Outputs
- New file:
plugins/plugin-creator/tests/test_agent_enum_validator.py(~250 lines) - Test fixtures for valid/invalid agent frontmatter
- Parametrized tests for enum combinations
- Coverage report showing 90%+ for AgentEnumValidator
Acceptance Criteria
- Test file created with all required test cases
- All 10 error codes (AG001-AG010) have dedicated tests
- Enum value suggestions tested and verified accurate
- Valid enum combinations tested via parametrize
- File type filtering tested (validator skips non-agent files)
- Coverage ≥90% for AgentEnumValidator class
- All tests pass
Verification Steps
- Run tests:
pytest plugins/plugin-creator/tests/test_agent_enum_validator.py -v - Check coverage:
pytest --cov=plugin_validator --cov-report=term-missing - Verify AG001 suggests valid model values
- Verify validator doesn't run on skill files
- Run
mypy tests/test_agent_enum_validator.py --strict
Can Parallelize With: Task 15 (HookConfig tests), Task 16 (MCPConfig tests), Task 17 (LSPConfig tests) Reason: Independent test files Handoff: Provide test file, coverage report, suggestion verification