Skip to content

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

#GateOwnerCriteriaStatus
G-CODE-1All FR implementedFE Dev + BE Dev11/11 FR có code + commit
G-CODE-2Code review passTech Lead2 reviewers approve
G-CODE-3Unit tests passFE Dev≥ 80% coverage cho chart transform, delta calc
G-CODE-4Build success stagingCI/CDNo errors, no warnings critical
G-CODE-5TypeScript strict modeFE Dev0 type errors

E1.2) Database & migration gates

#GateOwnerCriteriaStatus
G-DB-1Migration seed_view_insight_action run thành công trên stagingBE DevVerify 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-2Migration create_record_insight_indexes (4 indexes) run thành côngBE DevVerify SQL SELECT indexname FROM pg_indexes WHERE tablename='record' có 4 indexes mới
G-DB-3EXPLAIN ANALYZE cho 7 GraphQL queries — KHÔNG có Seq ScanBE DevOutput có "Index Scan" hoặc "Bitmap Index Scan"
G-DB-4Migration rollback testDevOpsDROP INDEX CONCURRENTLY chạy không lỗi
G-DB-5Backup DB trước production migrationDevOpsBackup snapshot có timestamp

E1.3) Permission & security gates

#GateOwnerCriteriaStatus
G-PERM-1Action view_insight seeded cho BOD + ITLeader trên productionBE Dev + DevOpsDB query verify users có action
G-PERM-2Staff/BranchManager KHÔNG có action view_insight (P0)BE DevDB query negative test
G-PERM-3E2E TC-CRITICAL-002: Staff truy cập URL trực tiếp → 403QACypress pass
G-PERM-4JWT claim size với BOD (70 branches) < 8KBBE Devcurl + decode JWT
G-PERM-5Hasura permission cho 3 materialized views (P0 — moved sau code review B4)BE DevFilter 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 đã implementBE 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)

#GateOwnerCriteriaStatus
G-PERF-1TTFMP < 2s với 7 ngày × 70 CN trên stagingTech Lead + DevOpsSentry transaction p95
G-PERF-2TTFMP < 3s với 30 ngày × 70 CNTech LeadSame
G-PERF-3Filter change → render < 800msTech LeadSentry
G-PERF-4Slow query alert configured (Sentry > 3s)DevOpsAlert rule active
G-PERF-5Hasura @cached(ttl:60) áp dụng cho 5 KPI/chart queriesFE DevCode review verify
G-PERF-6URQL requestPolicy: 'cache-and-network' áp dụng cho mọi useQueryFE DevCode review verify

E1.5) Functional gates (QA)

#GateOwnerCriteriaStatus
G-QA-1100% TC-001 đến TC-011 PASSQATest report
G-QA-2100% TC-CRITICAL-001/002/003 PASSQACritical path E2E
G-QA-3Regression suite PASSQAExisting /e/record không break
G-QA-40 P0 critical bugsQA + Tech LeadBug tracker
G-QA-50 P1 high bugs (hoặc accepted với workaround)QA + POBug tracker + sign-off

E1.6) Documentation gates

#GateOwnerCriteriaStatus
G-DOC-1PRD + Dev Spec + UI Spec + QA Test Plan reviewedPO + Tech LeadSign-off in handoff.md
G-DOC-2Changelog updatedPO/BAEntry mới trong dva-doc/docs/changelog.md
G-DOC-3User guide cho BOD (short tutorial)PO/BADoc available trên VitePress⬜ (defer P1 OK)

E1.7) Stakeholder approval

#GateOwnerCriteriaStatus
G-APPROVE-1PO approveNGUYỄN SƠN THỌEmail/Slack confirmation
G-APPROVE-2Tech Lead approve(Tech Lead name)Code review + architecture review
G-APPROVE-3BOD demo session — họ confirm valueBODDemo + 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 dashboard

E2.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 demo

E3) Day-0 / Day-1 Operations

E3.1) Day-0 (go-live day)

TimeActionOwner
T-2hPre-deploy checks (E2.1)DevOps
T-1hSlack notification "Insight Ghi Âm deploy in 1h"PO
T-0Run migrations (indexes + permission seed)BE Dev + DevOps
T+5mVerify migration success qua DB queryBE Dev
T+10mDeploy FE bundleFE Dev + DevOps
T+15mSmoke test: BOD login → mở dashboard → verify 5 KPI renderPO + Tech Lead
T+30mMonitor Sentry + DB CPU 30 phút intensiveDevOps
T+1hSend confirmation Slack + Email BOD "Dashboard ready"PO
T+2hBOD demo session (15 phút)PO + BOD

E3.2) Day-1 (24h sau go-live)

ActionOwner
Review Sentry: 24h transaction stats, slow queries, errorsTech Lead
Review DB: top queries, index usageBE Dev
Collect BOD feedback (Slack/email)PO
Bug triage cho any P0/P1 foundTech Lead
Plan hotfix nếu cầnTech 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

RoleNgườiNgàyStatus
PO/BANGUYỄ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)

RoleNgườiNgàyStatus
PO/BANGUYỄ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 Team

Tham chiếu chéo:

  • PRD: ./prd.md
  • QA Test Plan: ./qa-test-plan.md D5 Exit Criteria
  • Dev Spec: ./dev-spec.md
  • Handoff: ./handoff.md