Skip to content

Phase 1 Exit Report

Date: 2026-03-01

Summary

Phase 1 implementation is complete and verified in local environment with Docker-enabled test run.

Verification Results

  • ruff check src tests - passed
  • ruff format --check src tests - passed
  • python -m compileall -q src tests migrations - passed
  • PYTHONPATH=src pytest -q tests -rs - passed (66 passed)

Exit Criteria Mapping

  1. Contract tests (tests/contract/) - passed.
  2. Idempotency scenarios (tests/idempotency/) - passed:
  3. single delivery
  4. concurrent delivery
  5. partial failure recovery
  6. Reorg scenarios (tests/reorg/test_reorg_scenarios.py) - passed (5 scenarios on real Postgres via testcontainers).
  7. E2E pipeline (tests/e2e/test_pipeline.py) - passed.
  8. Ownership reconciliation (tests/reconciliation/test_ownership_reconciliation.py) - passed.
  9. Domain isolation (tests/api/test_domain_isolation.py) - passed.
  10. API health/readiness/metrics checks in Docker runtime - passed (200).

Runtime Validation (Docker)

Validated during run:

  • docker compose -f docker/docker-compose.yml -f docker/docker-compose.prod.yml up -d
  • docker compose ... exec -T api bash /app/scripts/migrate.sh
  • health checks from inside API container:
  • /health -> 200
  • /health/ready -> 200
  • /metrics -> 200
  • worker runtime sanity checks:
  • services started: worker_outbox, worker_normalizer_polygon, worker_normalizer_ton, worker_state, worker_projection
  • stream smoke test: chain.polygon.raw_events event was processed end-to-end into ledger.normalized_events, market.ownership_current, projection.ownership_view
  • system.outbox_events pending count reached 0 after processing

Cleanup done:

  • docker compose -f docker/docker-compose.yml -f docker/docker-compose.prod.yml down

Notes

  • Docker volumes were not removed during cleanup (down without -v).
  • CI includes coverage gate: pytest --cov=src/ft --cov-fail-under=90.