- Rewrite vram_detect in Python with fixed config parsing and 10KB read limit
- Add pytest suite (72 tests) covering dashboard core, app security, and VRAM
- Standardize all prompts to .automaton/tasks/{task-name}/ path
- Reconcile dashboard spec with web implementation; remove themes.py
- Remove half-implemented refresh.py file watcher
- Harden dashboard static-file serving and task-name validation
- Add uncommitted-change guard to update.sh and real Gitea URLs
- Add AGENTS.md, Gitea CI workflow, and template documentation
1.2 KiB
1.2 KiB
SPEC: Add pytest Test Suite
Goal
Add automated tests for the dashboard and the new VRAM detection script.
Requirements
- Create
tests/test_scope.pyfor scope detection. - Create
tests/test_task.pyfor task state determination and sub-task parsing. - Create
tests/test_board.pyfor Kanban board grouping and filtering. - Create
tests/test_stats.pyfor statistics calculations. - Create
tests/test_config.pyfor config validation and defaults. - Create
tests/test_app.pyfor dashboard HTTP API endpoints and path-traversal guard. - Create
tests/test_vram_detect.pyfor the VRAM detector using mocked system data. - Update
pyproject.tomlwith optional dependencies:testextra:pytestdashboardextra:inotify(optional)
- Update
.gitignorefor.pytest_cache/.
Acceptance Criteria
python -m pytestdiscovers and passes all tests.- Tests exercise state determination, filtering, API responses, config validation, and VRAM detection.
pyproject.tomlincludes the optional dependency groups.
Non-Goals
- Achieving 100% coverage.
- Testing shell scripts (handled separately).
Stop Condition
When all acceptance criteria are met, output "CONTRACT_MET".