Phases & Gates
Five phases. Each ends in a hard go/no-go gate owned by a named person. A later phase may overlap an earlier one, but a gate must pass before the work it guards is declared done. Phase 4 (cutover) cannot begin until Gates 0–3 are ✅.
Status legend: ⬜ not started · 🟡 in progress · ✅ done · 🔴 blocked
Phase 0 — Stand up test infrastructure (blocker for everything)
The docs claim this exists; it does not. Build it first or the rest is fiction.
| # | Task | Owner | Status |
|---|---|---|---|
| 0.1 | Install + configure Vitest in apps/ionic and packages/*; add test:unit + coverage scripts; wire into turbo.json (cached) | Saiqul + Afif | ⬜ |
| 0.2 | Install + configure Cypress (component + E2E) against dev-server; add test:e2e script | Afif | ⬜ |
| 0.3 | Add Playwright for cross-browser + mobile-viewport smoke (Capacitor web target) | Afif | ⬜ |
| 0.4 | Make lint, typecheck, test:unit, test:e2e required PR checks (GitHub Actions + branch ruleset on main) | Saiqul | ⬜ |
| 0.5 | Define coverage targets per FSD layer; fail CI below threshold | Detta | ⬜ |
| 0.6 | Correct stale “tests exist” claims in CLAUDE.md + project note | Saiqul | ⬜ |
Gate 0 — owner: Saiqul. CI green on all four checks against a placeholder test = infra proven end-to-end. State: ⬜
Phase 1 — Parity inventory + test pyramid (overlaps Phase 0)
Cannot test “parity” without a parity definition. Consolidate the 11 loose migration docs.
| # | Task | Owner | Status |
|---|---|---|---|
| 1.1 | Build screen-by-screen parity checklist — every customer-facing legacy screen mapped to monorepo status. See 04-parity-checklist.md | Tompi | ⬜ |
| 1.2 | Critical-path catalogue — rank flows by revenue/traffic (discovery → booking → package → payment → account → reviews) | Tompi + Growth | ⬜ |
| 1.3 | Unit tests land with each ported shared-* function/store (TDD per PR, not after) | Afif + Growth | ⬜ |
| 1.4 | Component tests for ported shared-ui | Growth | ⬜ |
Gate 1 — owner: Tompi + Detta. Parity checklist 100% populated; every “ported” screen has its critical-path E2E written (may still be red). State: ⬜
Phase 2 — E2E critical-flow coverage + feature freeze
| # | Task | Owner | Status |
|---|---|---|---|
| 2.1 | Feature freeze on hh-pegasus — new features → monorepo only; legacy = bugfix only | Tompi | ⬜ |
| 2.2 | Author E2E (Cypress + Playwright) for all ranked critical paths against staging (hh-ionic-staging.pages.dev) | Afif + Detta | ⬜ |
| 2.3 | Payment/booking flows tested against sandbox/test-mode API — never prod payment rails | Detta + backend | ⬜ |
| 2.4 | Cross-device matrix: iOS Safari, Android Chrome, desktop Chrome/Safari/Firefox + mobile viewports | Detta | ⬜ |
| 2.5 | Accessibility smoke (axe in Cypress) on critical screens | Afif | ⬜ |
Gate 2 — owner: Detta (QA sign-off). 100% of ranked critical-path E2E green on staging across the device matrix; coverage thresholds met. State: ⬜
Phase 3 — Non-functional / stability hardening
Functional parity ≠ stable. Cutover failures are usually perf/error-rate, not missing buttons.
| # | Task | Owner | Status |
|---|---|---|---|
| 3.1 | Performance budgets — Lighthouse CI on staging (LCP, CLS, TTI, bundle). Must be ≥ legacy parity. Use PERFORMANCE_IMPROVEMENT_PLAN.md | Saiqul + Afif | ⬜ |
| 3.2 | Error monitoring live before any traffic — Sentry (or equiv) + JS error-rate alerting | Saiqul | ⬜ |
| 3.3 | Load/soak synthetic traffic against staging at expected peak; watch API error rate + CF Pages | Saiqul | ⬜ |
| 3.4 | Rollback rehearsal — practice reverting CF Pages traffic split in staging; document runbook | Irfan | ⬜ |
| 3.5 | Analytics/conversion-event parity (booking funnel events fire identically) | Tompi + Growth | ⬜ |
Gate 3 — owner: Saiqul + Irfan. Perf ≥ legacy parity; error monitoring live + alerting; rollback runbook tested + documented. State: ⬜
Phase 4 — Canary cutover (gated, reversible)
Detailed steps in 05-canary-cutover-runbook.md.
| # | Task | Owner | Status |
|---|---|---|---|
| 4.1 | Internal dogfood (team + beta, header/cookie routing) — 3–5 days | Tompi | ⬜ |
| 4.2 | Canary 5% real users — 24–48h | Irfan + Saiqul | ⬜ |
| 4.3 | 25% → 48h | Irfan | ⬜ |
| 4.4 | 50% → 48h | Irfan | ⬜ |
| 4.5 | 100% → 1-week soak | Irfan | ⬜ |
| 4.6 | Decommission hh-pegasus infra | Irfan | ⬜ |
Gate 4 (final) — owner: Tompi (business) + Irfan (execution). 100% on monorepo, 1-week clean soak, no rollback trigger fired → decommission legacy. State: ⬜