Appearance
Checklist phát hành (Go-Live) — Insight Ghi Âm cho BOD
Phiên bản: 1.0 Ngày: 15/05/2026 Mục đích: Release gates + pre-checks + Day-0/Day-1 operations + sign-off. Chỉ profile L+ mới có file này.
E1) Cổng phát hành (Release Gates)
Tất cả gates phải PASS trước khi ship P0. KHÔNG được skip.
E1.1) Code & build gates
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-CODE-1 | All FR implemented | FE Dev + BE Dev | 11/11 FR có code + commit | ⬜ |
| G-CODE-2 | Code review pass | Tech Lead | 2 reviewers approve | ⬜ |
| G-CODE-3 | Unit tests pass | FE Dev | ≥ 80% coverage cho chart transform, delta calc | ⬜ |
| G-CODE-4 | Build success staging | CI/CD | No errors, no warnings critical | ⬜ |
| G-CODE-5 | TypeScript strict mode | FE Dev | 0 type errors | ⬜ |
E1.2) Database & migration gates
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-DB-1 | Migration seed_view_insight_action run thành công trên staging | BE Dev | Verify SQL: SELECT * FROM module_permission_action WHERE module_id='voice_recording_management' AND action='view_insight' return 1 row; AND SELECT * FROM role_module WHERE 'view_insight' = ANY(actions) AND module_id='voice_recording_management' return ≥ 2 rows (BOD + ITLeader) | ⬜ |
| G-DB-2 | Migration create_record_insight_indexes (4 indexes) run thành công | BE Dev | Verify SQL SELECT indexname FROM pg_indexes WHERE tablename='record' có 4 indexes mới | ⬜ |
| G-DB-3 | EXPLAIN ANALYZE cho 7 GraphQL queries — KHÔNG có Seq Scan | BE Dev | Output có "Index Scan" hoặc "Bitmap Index Scan" | ⬜ |
| G-DB-4 | Migration rollback test | DevOps | DROP INDEX CONCURRENTLY chạy không lỗi | ⬜ |
| G-DB-5 | Backup DB trước production migration | DevOps | Backup snapshot có timestamp | ⬜ |
E1.3) Permission & security gates
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-PERM-1 | Action view_insight seeded cho BOD + ITLeader trên production | BE Dev + DevOps | DB query verify users có action | ⬜ |
| G-PERM-2 | Staff/BranchManager KHÔNG có action view_insight (P0) | BE Dev | DB query negative test | ⬜ |
| G-PERM-3 | E2E TC-CRITICAL-002: Staff truy cập URL trực tiếp → 403 | QA | Cypress pass | ⬜ |
| G-PERM-4 | JWT claim size với BOD (70 branches) < 8KB | BE Dev | curl + decode JWT | ⬜ |
| G-PERM-5 | Hasura permission cho 3 materialized views (P0 — moved sau code review B4) | BE Dev | Filter branch_id: { _in: X-Hasura-Allowed-Branches }. Verify Staff query direct view → empty result | ⬜ |
| G-PERM-6 (NEW review #5 — PD-011) | JWT claim x-hasura-allowed-branches middleware đã implement | BE Dev (auth) | Decode JWT 3 role test: BOD/ITLeader có 70 branch UUIDs; BranchManager có own branch IDs; Staff [] empty. Hasura filter _in: [] → trả 0 rows verified | ⬜ |
E1.4) Performance gates (DEC-012 mandatory)
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-PERF-1 | TTFMP < 2s với 7 ngày × 70 CN trên staging | Tech Lead + DevOps | Sentry transaction p95 | ⬜ |
| G-PERF-2 | TTFMP < 3s với 30 ngày × 70 CN | Tech Lead | Same | ⬜ |
| G-PERF-3 | Filter change → render < 800ms | Tech Lead | Sentry | ⬜ |
| G-PERF-4 | Slow query alert configured (Sentry > 3s) | DevOps | Alert rule active | ⬜ |
| G-PERF-5 | Hasura @cached(ttl:60) áp dụng cho 5 KPI/chart queries | FE Dev | Code review verify | ⬜ |
| G-PERF-6 | URQL requestPolicy: 'cache-and-network' áp dụng cho mọi useQuery | FE Dev | Code review verify | ⬜ |
E1.5) Functional gates (QA)
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-QA-1 | 100% TC-001 đến TC-011 PASS | QA | Test report | ⬜ |
| G-QA-2 | 100% TC-CRITICAL-001/002/003 PASS | QA | Critical path E2E | ⬜ |
| G-QA-3 | Regression suite PASS | QA | Existing /e/record không break | ⬜ |
| G-QA-4 | 0 P0 critical bugs | QA + Tech Lead | Bug tracker | ⬜ |
| G-QA-5 | 0 P1 high bugs (hoặc accepted với workaround) | QA + PO | Bug tracker + sign-off | ⬜ |
E1.6) Documentation gates
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-DOC-1 | PRD + Dev Spec + UI Spec + QA Test Plan reviewed | PO + Tech Lead | Sign-off in handoff.md | ⬜ |
| G-DOC-2 | Changelog updated | PO/BA | Entry mới trong dva-doc/docs/changelog.md | ⬜ |
| G-DOC-3 | User guide cho BOD (short tutorial) | PO/BA | Doc available trên VitePress | ⬜ (defer P1 OK) |
E1.7) Stakeholder approval
| # | Gate | Owner | Criteria | Status |
|---|---|---|---|---|
| G-APPROVE-1 | PO approve | NGUYỄN SƠN THỌ | Email/Slack confirmation | ⬜ |
| G-APPROVE-2 | Tech Lead approve | (Tech Lead name) | Code review + architecture review | ⬜ |
| G-APPROVE-3 | BOD demo session — họ confirm value | BOD | Demo + feedback session | ⬜ |
E2) Pre-checks (24h trước go-live)
E2.1) Pre-deploy checklist
bash
# 1. Backup production DB
pg_dump diva_production > backups/pre-record-insight-$(date +%Y%m%d-%H%M%S).sql
# 2. Verify staging benchmark passed
# - Check Sentry dashboard cho TTFMP p95 < 2s/7d
# - Check pg_stat_statements không có new top slow queries
# 3. Verify permission seed plan
# - Dry-run migration trên staging clone
# - Confirm rollback plan
# 4. Verify deployment order
# - Migration FIRST (indexes + permission seed)
# - FE bundle deploy AFTER migrations confirmed
# 5. Monitoring setup
# - Sentry alert: slow query > 3s
# - Sentry alert: 5xx errors trên `/e/record/insights`
# - DB monitoring: CPU > 60% peak
# 6. Communication plan
# - Slack channel #diva-release notify trước 1h
# - Email BOD trước 24h với link demo dashboardE2.2) Rollback plan
Trigger rollback nếu:
- Critical bug phát hiện trong 30 phút đầu sau deploy
- TTFMP > 5s production
- 5xx error rate > 5%
Rollback steps:
bash
# 1. Revert FE deployment
git revert <merge-commit-sha>
# Or: rollback via deployment platform UI
# 2. Drop indexes (optional — chỉ nếu nghi index gây issue)
# Indexes là additive, ít khi cần drop
# DROP INDEX CONCURRENTLY IF EXISTS idx_record_active_time;
# DROP INDEX CONCURRENTLY IF EXISTS idx_appointment_branch_start;
# DROP INDEX CONCURRENTLY IF EXISTS idx_reference_file_ref_duration;
# DROP INDEX CONCURRENTLY IF EXISTS idx_record_created_at_brin;
# 3. Revert permission seed (CAREFUL — affects users)
# UPDATE role_module SET actions = array_remove(actions, 'view_insight') WHERE module_id='voice_recording_management';
# DELETE FROM module_permission_action WHERE module_id='voice_recording_management' AND action='view_insight';
# 4. Notify stakeholders
# - Slack #diva-release: rollback reason + ETA fix
# - Email BOD: postpone demoE3) Day-0 / Day-1 Operations
E3.1) Day-0 (go-live day)
| Time | Action | Owner |
|---|---|---|
| T-2h | Pre-deploy checks (E2.1) | DevOps |
| T-1h | Slack notification "Insight Ghi Âm deploy in 1h" | PO |
| T-0 | Run migrations (indexes + permission seed) | BE Dev + DevOps |
| T+5m | Verify migration success qua DB query | BE Dev |
| T+10m | Deploy FE bundle | FE Dev + DevOps |
| T+15m | Smoke test: BOD login → mở dashboard → verify 5 KPI render | PO + Tech Lead |
| T+30m | Monitor Sentry + DB CPU 30 phút intensive | DevOps |
| T+1h | Send confirmation Slack + Email BOD "Dashboard ready" | PO |
| T+2h | BOD demo session (15 phút) | PO + BOD |
E3.2) Day-1 (24h sau go-live)
| Action | Owner |
|---|---|
| Review Sentry: 24h transaction stats, slow queries, errors | Tech Lead |
| Review DB: top queries, index usage | BE Dev |
| Collect BOD feedback (Slack/email) | PO |
| Bug triage cho any P0/P1 found | Tech Lead |
| Plan hotfix nếu cần | Tech Lead + PO |
E3.3) Week-1 review
- Adoption metrics: số BOD users daily access
- Performance: TTFMP p95 ổn định < 3s
- Feedback: BOD muốn gì khác? → input cho P1 backlog
- Bug count: < 5 P2/P3 acceptable
E4) Sign-off
E4.1) Pre-go-live sign-off
| Role | Người | Ngày | Status |
|---|---|---|---|
| PO/BA | NGUYỄN SƠN THỌ | ___ | ⬜ |
| Tech Lead | (tên) | ___ | ⬜ |
| FE Dev | (tên) | ___ | ⬜ |
| BE Dev | (tên) | ___ | ⬜ |
| QA Lead | (tên) | ___ | ⬜ |
| DevOps | (tên) | ___ | ⬜ |
E4.2) Post-go-live sign-off (Day+7)
| Role | Người | Ngày | Status |
|---|---|---|---|
| PO/BA | NGUYỄN SƠN THỌ | ___ | ⬜ |
| BOD representative | (tên) | ___ | ⬜ |
| Tech Lead | (tên) | ___ | ⬜ |
P0 considered "successful" khi:
- ✅ Tất cả Day-0/Day-1 actions complete
- ✅ Zero P0/P1 bugs trong 7 ngày đầu
- ✅ BOD adoption ≥ 3/5 users weekly
- ✅ Performance p95 stable < 3s
- ✅ Post-go-live sign-off complete
E5) Communication templates
E5.1) Slack release announcement
🎉 New release — Insight Ghi Âm cho BOD đã live!
Dashboard `/e/record/insights` hiện đã available cho role BOD + ITLeader.
📊 What's new:
- 5 KPI cards: cuộc tư vấn, thời lượng TB, NV active, tuân thủ ghi âm %, KH chờ TV
- 4 charts: trend, top staff, heatmap, top chi nhánh
- 2 anomaly alerts: missing records + KH chờ TV
- Drill-down vào /e/record để nghe sample audio
🔐 Permission: BOD + ITLeader + Admin tự động có access.
🚀 Performance: load < 2s với 7 ngày data, < 3s với 30 ngày × 70 CN.
📖 Docs: <link to feature docs>
🐛 Bug report: #diva-bugs channel
Feedback welcomed! Contact @PO NGUYỄN SƠN THỌ.E5.2) Email cho BOD
Tiêu đề: Insight Ghi Âm — Dashboard mới sẵn sàng cho BOD
Kính gửi anh/chị,
Hôm nay <DD/MM/YYYY>, dashboard "Insight Ghi Âm" đã chính thức ra mắt.
🎯 Mục đích: Giúp anh/chị theo dõi tình hình tuân thủ ghi âm tư vấn toàn 70 chi nhánh trong < 5 giây.
🔗 Truy cập: https://admin.diva-group.com/e/record/insights
📊 Tính năng chính:
1. 5 chỉ số tổng quan (cuộc tư vấn, thời lượng TB, NV active, tuân thủ %, KH chờ TV)
2. Biểu đồ xu hướng + heatmap giờ × thứ + ranking NV/chi nhánh
3. Cảnh báo bất thường: lịch hẹn thiếu ghi âm + KH chưa được tư vấn
4. Drill-down vào danh sách chi tiết + nghe sample audio
💡 Hỗ trợ: Vui lòng liên hệ NGUYỄN SƠN THỌ (IT Leader) nếu có thắc mắc hoặc cần demo.
Trân trọng,
PO/BA TeamTham chiếu chéo:
- PRD:
./prd.md- QA Test Plan:
./qa-test-plan.mdD5 Exit Criteria- Dev Spec:
./dev-spec.md- Handoff:
./handoff.md