90 lines
3.0 KiB
Markdown
90 lines
3.0 KiB
Markdown
---
|
|
phase: 02
|
|
slug: data-persistence-file-management
|
|
status: draft
|
|
nyquist_compliant: false
|
|
wave_0_complete: false
|
|
created: 2026-03-12
|
|
---
|
|
|
|
# Phase 2 — Validation Strategy
|
|
|
|
> Per-phase validation contract for feedback sampling during execution.
|
|
|
|
---
|
|
|
|
## Test Infrastructure
|
|
|
|
| Property | Value |
|
|
|----------|-------|
|
|
| **Framework** | pytest (Python) + Flask test client |
|
|
| **Config file** | tests/ (Wave 0 creates) |
|
|
| **Quick run command** | `pytest tests/test_api.py -v` |
|
|
| **Full suite command** | `pytest tests/ -v` |
|
|
| **Estimated runtime** | ~15 seconds |
|
|
|
|
---
|
|
|
|
## Sampling Rate
|
|
|
|
- **After every task commit:** Run `pytest tests/test_api.py -v`
|
|
- **After every plan wave:** Run `pytest tests/ -v`
|
|
- **Before `/gsd-verify-work`:** Full suite must be green
|
|
- **Max feedback latency:** 30 seconds
|
|
|
|
---
|
|
|
|
## Per-task Verification Map
|
|
|
|
| task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|
|
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
|
|
| 02-01-01 | 01 | 1 | BACK-04 | API | `pytest tests/test_api.py::test_list_files -v` | ⚠️ W0 | ⬜ pending |
|
|
| 02-01-02 | 01 | 1 | FILE-01 | API | `pytest tests/test_api.py::test_get_file_contents -v` | ⚠️ W0 | ⬜ pending |
|
|
| 02-01-03 | 01 | 1 | FILE-04 | API | `pytest tests/test_api.py::test_delete_file -v` | ⚠️ W0 | ⬜ pending |
|
|
| 02-02-01 | 02 | 1 | FILE-02 | UI | Browser test or manual | - | ⬜ pending |
|
|
| 02-02-02 | 02 | 1 | FILE-03 | UI | Manual (touch scroll) | - | ⬜ pending |
|
|
| 02-02-03 | 02 | 2 | FILE-05 | API | `pytest tests/test_api.py::test_export_tideda -v` | ⚠️ W0 | ⬜ pending |
|
|
|
|
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
|
|
|
|
---
|
|
|
|
## Wave 0 Requirements
|
|
|
|
- [ ] `tests/conftest.py` — Flask test client fixture
|
|
- [ ] `tests/test_api.py` — API endpoint stubs for:
|
|
- `test_list_files`
|
|
- `test_get_file_contents`
|
|
- `test_delete_file`
|
|
- `test_export_tideda`
|
|
- [ ] `tests/__init__.py` — Package marker
|
|
|
|
*Existing Flask test client pattern from src/app.py can be reused.*
|
|
|
|
---
|
|
|
|
## Manual-Only Verifications
|
|
|
|
| Behavior | Requirement | Why Manual | Test Instructions |
|
|
|----------|-------------|------------|-------------------|
|
|
| File list scroll navigation | FILE-03 | Touch UI interaction | Visit /files, scroll through list |
|
|
| File content display formatting | FILE-02 | Visual verification | Click file, verify content renders |
|
|
| Delete confirmation dialog | FILE-04 | UX flow | Click delete, verify confirmation |
|
|
| tidEDA export download | FILE-05 | File download | Click export, verify file downloads |
|
|
|
|
*These require browser/UI interaction that automated tests don't reliably capture.*
|
|
|
|
---
|
|
|
|
## Validation Sign-Off
|
|
|
|
- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
|
|
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
|
|
- [ ] Wave 0 covers all MISSING references
|
|
- [ ] No watch-mode flags
|
|
- [ ] Feedback latency < 30s
|
|
- [ ] `nyquist_compliant: true` set in frontmatter
|
|
|
|
**Approval:** pending
|
|
|