Files
stonks-oracle/.kiro/specs/integration-test-pipeline/tasks.md
T

2.3 KiB

Integration Test Pipeline — Tasks

Phase 1: Sandbox Infrastructure Manifests

  • 1. Create infra/inttest/postgres.yaml — PostgreSQL 16 Deployment with migrations as init container, no PV
  • 2. Create infra/inttest/redis.yaml — Redis 7 Deployment, no persistence
  • 3. Create infra/inttest/minio.yaml — MinIO Deployment + bucket init Job
  • 4. Create infra/inttest/services.yaml — query-api, symbol-registry, risk, trading-engine Deployments pointing at sandbox infra
  • 5. Create infra/inttest/runner.yaml — test runner Job template

Phase 2: Seed Data

  • 6. Create tests/integration/seed_sandbox.py — deterministic seed script with fixed UUIDs for 5 companies, 10 documents, 5 trends, 5 recommendations, 3 orders, 2 positions, 2 global events, 2 competitive signals, 3 agents, trading config, portfolio snapshot
  • 7. Create tests/integration/seed_minio.py — seed MinIO buckets with sample normalized text files

Phase 3: API Integration Tests

  • 8. Create tests/integration/conftest.py — pytest fixtures for HTTP client, base URLs, seed IDs
  • 9. Create tests/integration/test_query_api.py — tests for all 17 query API endpoints
  • 10. Create tests/integration/test_registry_api.py — tests for all 8 symbol registry endpoints
  • 11. Create tests/integration/test_risk_api.py — tests for all 4 risk engine endpoints
  • 12. Create tests/integration/test_trading_api.py — tests for all 12 trading engine endpoints
  • 13. Create tests/integration/test_frontend_data_deps.py — tests verifying every frontend page's API dependencies return valid data

Phase 4: Profiling

  • 14. Create tests/integration/profiler.py — timing wrapper that records per-endpoint latency and produces a summary report
  • 15. Add profiling output to test runner (JSON report with P50/P95/P99 per endpoint, stage timings)

Phase 5: Pipeline Runner

  • 16. Create infra/inttest/run_pipeline.sh — orchestration script that creates namespace, deploys infra, seeds, deploys services, runs tests, collects results, tears down
  • 17. Create .github/workflows/integration.yml — GitHub Actions workflow that triggers the pipeline on demand or on PR

Phase 6: Documentation

  • 18. Add integration test section to docs/LOCAL_DEV_SETUP.md with instructions for running locally