Files
kite/.planning/phases/01-infrastructure-foundation/01-VALIDATION.md
T
curo1305 6fed5ba531 docs(01): create phase 1 plan — 5 plans in 4 waves
Research, pattern mapping, and verification complete.
Walking Skeleton mode active (MVP Phase 1).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 08:49:36 +02:00

4.0 KiB

phase, slug, status, nyquist_compliant, wave_0_complete, created
phase slug status nyquist_compliant wave_0_complete created
1 infrastructure-foundation draft false false 2026-05-21

Phase 1 — Validation Strategy

Per-phase validation contract for feedback sampling during execution.


Test Infrastructure

Property Value
Framework pytest 7.x (asyncio_mode = auto)
Config file backend/pytest.ini
Quick run command cd backend && pytest tests/test_health.py -v
Full suite command cd backend && pytest -v
Estimated runtime ~30 seconds

Sampling Rate

  • After every task commit: Run cd backend && pytest tests/test_health.py -v
  • After every plan wave: Run cd backend && pytest -v
  • Before /gsd:verify-work: Full suite must be green
  • Max feedback latency: 30 seconds

Per-Task Verification Map

Task ID Plan Wave Requirement Threat Ref Secure Behavior Test Type Automated Command File Exists Status
1-01-01 01 1 STORE-01 N/A unit cd backend && pytest tests/test_health.py -v W0 pending
1-01-02 01 1 STORE-01 MinIO key never contains human filename unit cd backend && pytest tests/test_storage.py::test_object_key_format -v W0 pending
1-02-01 02 1 STORE-01 N/A unit cd backend && pytest tests/test_alembic.py -v W0 pending
1-02-02 02 1 STORE-02 Object key is UUID-based, not filename unit cd backend && pytest tests/test_storage.py::test_minio_key_schema -v W0 pending
1-03-01 03 2 STORE-07 No file locks; multiple workers can run integration cd backend && pytest tests/test_documents.py -v W0 pending
1-03-02 03 2 STORE-01 End-to-end upload works with new storage layer integration cd backend && pytest tests/test_documents.py::test_upload_end_to_end -v W0 pending

Status: pending · green · red · ⚠️ flaky


Wave 0 Requirements

  • tests/test_health.py — rewrite to probe PostgreSQL + MinIO endpoints (not just {"status": "ok"})
  • tests/test_storage.py — new file: unit tests for StorageBackend ABC, MinIO key schema (STORE-02), and object CRUD
  • tests/test_alembic.py — new file: verify migration applies cleanly, all tables exist, columns match schema
  • tests/test_documents.py — rewrite to use PostgreSQL + MinIO storage layer (existing tests are coupled to flat-file storage)
  • tests/conftest.py — add async SQLAlchemy test engine fixture (in-memory SQLite for unit tests, real PostgreSQL for integration)

Manual-Only Verifications

Behavior Requirement Why Manual Test Instructions
docker compose up starts all services cleanly STORE-01 Requires Docker daemon Run docker compose up --build and confirm all health checks pass in the docker ps output
alembic upgrade head completes with no errors STORE-01 Requires live PostgreSQL Run cd backend && alembic upgrade head against the Docker PostgreSQL instance; confirm zero errors and all tables created
Celery worker starts and processes a task STORE-07 Requires running Redis + worker Trigger a document upload; confirm extraction + classification completes via Celery (check worker logs)
Existing document upload workflow works end-to-end STORE-01 Full integration Upload a PDF through the UI; confirm it appears in the document list with extracted text and AI classification

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