docs(phase-08): mark VALIDATION.md complete — Nyquist-compliant 9/9
Audit confirmed all phase-8 requirements are COVERED: - CR-01/02/03: session revocation tests promoted from stubs → 3 passing - CODE-01/02/03: route regression — 58 passed, 4 xfailed - CODE-04: frontend smoke — 136/136 passed - CODE-08: single CloudConnectionOut definition confirmed - PERF-01: npm packages verified Full suite: 405 passed, 6 skipped, 7 xfailed (1 pre-existing env gap: no local python-docx) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
cd4f372e46
commit
ee3d2d2d3d
@@ -1,10 +1,11 @@
|
||||
---
|
||||
phase: 8
|
||||
slug: stack-upgrade-backend-decomposition
|
||||
status: draft
|
||||
nyquist_compliant: false
|
||||
wave_0_complete: false
|
||||
status: complete
|
||||
nyquist_compliant: true
|
||||
wave_0_complete: true
|
||||
created: 2026-06-07
|
||||
audited: 2026-06-12
|
||||
---
|
||||
|
||||
# Phase 8 — Validation Strategy
|
||||
@@ -24,7 +25,7 @@ created: 2026-06-07
|
||||
| **Frontend framework** | Vitest 4.1.7 |
|
||||
| **Frontend config** | `frontend/vitest.config.js` |
|
||||
| **Frontend quick run** | `cd frontend && npm test` |
|
||||
| **Estimated runtime** | ~30 seconds (backend), ~10 seconds (frontend) |
|
||||
| **Estimated runtime** | ~60 seconds (backend), ~10 seconds (frontend) |
|
||||
|
||||
---
|
||||
|
||||
@@ -38,43 +39,42 @@ created: 2026-06-07
|
||||
|
||||
## Phase Requirements → Test Map
|
||||
|
||||
| Req ID | Behavior | Test Type | Automated Command | File Exists? |
|
||||
|--------|----------|-----------|-------------------|-------------|
|
||||
| CR-01 | `change_password` revokes other sessions, keeps current | unit/integration | `pytest tests/test_auth.py::test_change_password_revokes_other_sessions -x` | ❌ Wave 0 |
|
||||
| CR-02 | `enable_totp` revokes other sessions, keeps current | unit/integration | `pytest tests/test_auth.py::test_enable_totp_revokes_other_sessions -x` | ❌ Wave 0 |
|
||||
| CR-03 | `disable_totp` revokes other sessions, keeps current | unit/integration | `pytest tests/test_auth.py::test_disable_totp_revokes_other_sessions -x` | ❌ Wave 0 |
|
||||
| CODE-01 | All admin URLs still respond on same paths after split | integration | `pytest tests/test_admin.py -x` | ✅ |
|
||||
| CODE-02 | All document URLs still respond on same paths after split | integration | `pytest tests/test_documents.py -x` | ✅ |
|
||||
| CODE-03 | All auth URLs still respond on same paths after split | integration | `pytest tests/test_auth.py -x` | ✅ |
|
||||
| CODE-04 | All existing consumer imports resolve; no 35+ files changed | smoke | `cd frontend && npm test` | ✅ |
|
||||
| CODE-08 | No model defined twice across packages | static/grep | `grep -rn "class CloudConnectionOut" backend/` | N/A |
|
||||
| PERF-01 | npm list confirms all packages present | install verification | `cd frontend && npm list` | N/A |
|
||||
| Req ID | Behavior | Test Type | Automated Command | Status |
|
||||
|--------|----------|-----------|-------------------|--------|
|
||||
| CR-01 | `change_password` revokes other sessions, keeps current | integration | `pytest tests/test_auth.py::test_change_password_revokes_other_sessions -x` | ✅ COVERED |
|
||||
| CR-02 | `enable_totp` revokes other sessions, keeps current | integration | `pytest tests/test_auth.py::test_enable_totp_revokes_other_sessions -x` | ✅ COVERED |
|
||||
| CR-03 | `disable_totp` revokes other sessions, keeps current | integration | `pytest tests/test_auth.py::test_disable_totp_revokes_other_sessions -x` | ✅ COVERED |
|
||||
| CODE-01 | All admin URLs still respond on same paths after split | integration | `pytest tests/test_admin_api.py -x` | ✅ COVERED |
|
||||
| CODE-02 | All document URLs still respond on same paths after split | integration | `pytest tests/test_documents.py -x` | ✅ COVERED |
|
||||
| CODE-03 | All auth URLs still respond on same paths after split | integration | `pytest tests/test_auth.py -x` | ✅ COVERED |
|
||||
| CODE-04 | All existing consumer imports resolve; no 35+ files changed | smoke | `cd frontend && npm test` | ✅ COVERED |
|
||||
| CODE-08 | No model defined twice across packages | static/grep | `grep -rn "class CloudConnectionOut" backend/` | ✅ COVERED |
|
||||
| PERF-01 | npm list confirms all packages present | install verification | `cd frontend && npm list` | ✅ COVERED |
|
||||
|
||||
---
|
||||
|
||||
## Wave 0 Gaps
|
||||
## Wave 0 Gaps (Resolved)
|
||||
|
||||
New tests to write before decomposition work begins:
|
||||
All stubs promoted to real passing tests:
|
||||
|
||||
- [ ] `backend/tests/test_auth.py` — add 3 xfail stubs promoted to real tests for CR-01/02/03:
|
||||
- `test_change_password_revokes_other_sessions`
|
||||
- `test_enable_totp_revokes_other_sessions`
|
||||
- `test_disable_totp_revokes_other_sessions`
|
||||
- [ ] Frontend: verify `useToastStore` mock wiring in `SettingsAccountTab.test.js` and `TotpEnrollment.test.js` after stub creation
|
||||
- [x] `backend/tests/test_auth.py:173` — `test_change_password_revokes_other_sessions` (PASSED)
|
||||
- [x] `backend/tests/test_auth.py:217` — `test_enable_totp_revokes_other_sessions` (PASSED)
|
||||
- [x] `backend/tests/test_auth.py:270` — `test_disable_totp_revokes_other_sessions` (PASSED)
|
||||
- [x] Frontend: `SettingsAccountTab.test.js` and `TotpEnrollment.test.js` — 136 frontend tests pass
|
||||
|
||||
---
|
||||
|
||||
## Critical Test Gates
|
||||
|
||||
| Gate | Command | Must pass before |
|
||||
|------|---------|-----------------|
|
||||
| Wave 0 stubs xfail | `pytest --tb=no -q` | Any decomposition work |
|
||||
| Admin split | `pytest tests/test_admin.py -x -v` | Advancing past CODE-01 |
|
||||
| Documents split | `pytest tests/test_documents.py -x -v` | Advancing past CODE-02 |
|
||||
| Auth split | `pytest tests/test_auth.py -x -v` | Advancing past CODE-03 |
|
||||
| Full backend suite | `pytest -v` | Phase gate |
|
||||
| Frontend smoke | `npm test` | Phase gate |
|
||||
| URL regression | `pytest tests/test_admin.py tests/test_documents.py tests/test_auth.py -v` | Phase complete |
|
||||
| Gate | Command | Status |
|
||||
|------|---------|--------|
|
||||
| Wave 0 stubs xfail | `pytest --tb=no -q` | ✅ Complete |
|
||||
| Admin split | `pytest tests/test_admin_api.py -x -v` | ✅ Passed |
|
||||
| Documents split | `pytest tests/test_documents.py -x -v` | ✅ Passed |
|
||||
| Auth split | `pytest tests/test_auth.py -x -v` | ✅ Passed |
|
||||
| Full backend suite | `pytest -v` | ✅ 405 passed, 6 skipped, 7 xfailed |
|
||||
| Frontend smoke | `npm test` | ✅ 136/136 passed |
|
||||
| URL regression | `pytest tests/test_admin_api.py tests/test_documents.py tests/test_auth.py -v` | ✅ 58 passed |
|
||||
|
||||
---
|
||||
|
||||
@@ -83,6 +83,26 @@ New tests to write before decomposition work begins:
|
||||
| Threat | Test | Evidence |
|
||||
|--------|------|---------|
|
||||
| Router prefix doubling | `pytest -v` — all existing route tests pass | URL paths unchanged |
|
||||
| Admin endpoint auth leakage | `pytest tests/test_admin.py -k "not_admin"` | 403 on all admin routes for non-admin |
|
||||
| Admin endpoint auth leakage | `pytest tests/test_admin_api.py -k "not_admin"` | 403 on all admin routes for non-admin |
|
||||
| Circular import crash | App starts cleanly: `uvicorn main:app --reload` exits 0 | No ImportError |
|
||||
| CloudConnectionOut import break | `pytest tests/test_cloud.py -x` | cloud.py imports succeed |
|
||||
| CloudConnectionOut import break | `pytest tests/test_cloud.py -x` | Single definition in `backend/api/schemas.py` |
|
||||
|
||||
---
|
||||
|
||||
## Known Environment Note
|
||||
|
||||
`tests/test_extractor.py::test_extract_docx` fails with `ModuleNotFoundError: No module named 'docx'` in the local macOS Python 3.9 environment only. `python-docx` is in `requirements.txt` and runs correctly inside Docker. This is a pre-existing local environment gap unrelated to Phase 8.
|
||||
|
||||
---
|
||||
|
||||
## Validation Audit 2026-06-12
|
||||
|
||||
| Metric | Count |
|
||||
|--------|-------|
|
||||
| Gaps found (Wave 0) | 3 |
|
||||
| Resolved | 3 |
|
||||
| Escalated | 0 |
|
||||
| Total requirements | 9 |
|
||||
| COVERED | 9 |
|
||||
| PARTIAL | 0 |
|
||||
| MISSING | 0 |
|
||||
|
||||
Reference in New Issue
Block a user