16 — Phase P7: Harden · Release · Ops (post DONE_QUEUE)
Audit kế hoạch: 2026-07-31 · Refresh status: 2026-08-14 → STATUS.md
Thay «tiếp» mặc định khi P5f/P6/nextRecommended=null → OWNER e2e (không invent WP).
Nguồn bằng chứng: 15 · queue máy stub=0 · EAS APK ×3 DONE
0. Audit verdict (vì sao cần plan mới)
| Lớp |
Trạng thái 2026-07-31 |
Hệ quả cho plan |
| BE STUB queue |
0 STUB / 328 IMP / 34 tags |
Không mở vertical BE mới trừ bug/prod gap |
| Soft CON/PAR/DRV/ADM (P5–P6) |
DONE |
«tiếp» feature-UI = hết hàng đợi |
| Map / routing |
OSRM live (WP-ROUTE-OSM-01) |
Mapbox không còn blocker |
| Docs ↔ API ↔ FE prod |
THÔNG · seed nearby OK |
Không ưu tiên “nối data” nữa |
| ENV packaging |
IMP (env:bootstrap / env:check) |
Thiếu = OWNER secret, không thiếu template |
| Doc 12 (cũ) |
Vẫn nói next = P6 |
STALE — cần P7 |
| VPS prod flags (audit SSH) |
Xem §1 |
Harden trước feature mới |
Không làm: merge APP_DESIGN_BUILD (HomeFix/CRM) · bịa MoMo/SMS/OpenAI token · Figma sync khi chưa có quyền.
1. Rủi ro / lệch prod đã đo (bắt buộc vào P7)
| # |
Phát hiện |
Mức |
WP đề xuất |
| R1 |
ALLOW_INTERNAL_WALLET_CREDIT=true trên VPS |
High |
WP-SEC-WALLET-01 |
| R2 |
PAYMENTS_MOCK=true · thiếu MoMo/VNPay keys |
High (go-live $) |
WP-PAY-LIVE-01 (OWNER) |
| R3 |
SMS_PROVIDER=console · OTP chỉ email |
Med |
WP-AUTH-SMS-01 (OWNER) hoặc giữ email |
| R4 |
SWAGGER_ENABLED=true production |
Med |
WP-SEC-SWAGGER-01 |
| R5 |
HEALTH_DETAIL_ENABLED=true production |
Low–Med |
gộp WP-SEC-SWAGGER-01 |
| R6 |
OSRM public (router.project-osrm.org) |
Med (SLO) |
WP-ROUTE-OSRM-SELF-01 |
| R7 |
Không eas.json / không .github/workflows |
Med |
WP-EAS-01 · WP-CI-01 |
| R8 |
OpenAI empty |
Low (optional) |
WP-AI-KEY-01 (OWNER) |
| R9 |
MinIO app ≈ root pattern |
Med |
WP-S3-LEASTPRIV-01 |
| R10 |
Doc 12/09 soft-next trỏ P6 đã xong |
Process |
WP-DOC-P7-01 (doc này) |
2. Wave P7 — hàng đợi «tiếp» (thứ tự cứng)
Làm 1 WP / turn. Stop-gate: cần secret nhà cung cấp → đánh OWNER_REQUIRED, không fake.
P7a — Security harden (tuần 1, không cần secret ngoài)
| # |
WP |
Surfaces |
Việc |
AC |
Effort |
| 1 |
WP-SEC-WALLET-01 |
API · VPS |
ALLOW_INTERNAL_WALLET_CREDIT=false prod · smoke wallet/pay path |
Credit nội bộ 403; topup qua /payments/* vẫn mock-ok |
S · IMP 2026-07-31 |
| 2 |
WP-SEC-SWAGGER-01 |
API · VPS |
SWAGGER_ENABLED=false · HEALTH_DETAIL_ENABLED=false (hoặc JWT ADMIN only) |
/docs 404/off · /health vẫn ok · /health/deps 403 |
S · IMP 2026-07-31 |
| 3 |
WP-DOC-P7-01 |
docs |
Cập nhật 00/09/12/15 trỏ P7 |
Agent «tiếp» lấy P7 #1 |
S · IMP |
P7b — Reliability (tuần 1–2)
| # |
WP |
Surfaces |
Việc |
AC |
Effort |
| 4 |
WP-BACKUP-PG-01 |
Ops |
Cron dump Postgres + hướng dẫn restore |
File dump tồn tại · restore dry-run 1 lần |
M · IMP 2026-07-31 |
| 5 |
WP-ROUTE-OSRM-SELF-01 |
API · Docker |
Self-host OSRM (VN extract hoặc bbox HCM) · OSRM_BASE_URL nội bộ |
routing:osm:smoke PASS qua URL nội bộ · fallback Haversine nếu down |
L · IMP 2026-07-31 |
| 6 |
WP-OBS-02 |
Ops |
Uptime health + disk/mem alert tối thiểu |
Alert khi /health ≠ 200 5 phút |
M · IMP 2026-07-31 |
P7c — Release clients (tuần 2)
| # |
WP |
Surfaces |
Việc |
AC |
Effort |
| 7 |
WP-EAS-01 |
CON |
eas.json profiles development/preview/production · env EXPO_PUBLIC_* |
Config + cloud preview APK IMP (2026-08-13) |
M · IMP |
| 8 |
WP-EAS-DRV-01 |
DRV |
EAS driver mirror + projectId |
Linked + APK IMP (2026-08-13) |
M · IMP |
| 9 |
WP-EAS-PAR-01 |
PAR |
EAS partner mirror + projectId |
Linked + APK IMP (2026-08-13) |
M · IMP |
| 10 |
WP-CI-01 |
repo |
GitHub Actions: templates · api:build · routing smoke prod |
Workflow .github/workflows/ci.yml IMP (xanh sau push) |
M · IMP |
| 11 |
WP-ADM-DEPLOY-01 |
ADM |
Script deploy dashboard · admin trỏ prod API |
deploy/deploy-dashboard.sh · admin 200 |
S · IMP |
P7d — OWNER_REQUIRED (không schedule agent tự làm đủ)
Thứ tự khuyến nghị: Google → SMS → MoMo sandbox → MoMo production.
Checklist chi tiết: docs/OWNER-GATES.md.
| # |
WP |
Blocker |
Khi Owner cung cấp |
| 11b |
WP-AUTH-GOOGLE-LIVE-01 |
OAuth Web/Android/iOS |
Điền GOOGLE_CLIENT_ID + EXPO_PUBLIC_GOOGLE_*_CLIENT_ID · agent smoke idToken |
| 12 |
WP-AUTH-SMS-01 |
eSMS/Twilio |
SMS_PROVIDER=esms|twilio · brand WELIFE · OTP phone e2e |
| 13 |
WP-PAY-LIVE-01 |
MoMo/VNPay credentials |
PAYMENTS_MOCK=false · MOMO_* + IPN · e2e sandbox rồi production |
| 14 |
WP-AI-KEY-01 |
OpenAI key |
OpenAI key imported · IMP env 2026-07-31 |
| 15 |
WP-FE-ROUTE-05-FIGMA-SYNC |
Figma edit + node-id |
Pixel polish only |
P7e — Product polish (sau harden; optional)
Chỉ khi P7a–c xong hoặc Owner chỉ định:
| # | WP | Ghi chú |
| --- | -------------------------- | ---------------------------------------------------------------- | ------------------ |
| 16 | WP-FE-PROMO-02 | Promo apply checkout sâu (doc 15 §5.2) | IMP 2026-07-31 |
| 17 | WP-FE-NOTIF-02 | Notif detail screen | IMP 2026-07-31 |
| 18 | WP-RENT-VIEW-CANCEL-01 | Cancel/reschedule viewing | IMP 2026-07-31 |
| 19 | WP-S3-LEASTPRIV-01 | MinIO app user ≠ root | IMP 2026-07-31 |
| 20 | WP-FE-RIDE-ADDR-01 | Saved Nhà/Công ty thật (không shortcut cứng) | IMP 2026-07-31 |
| 21 | WP-FE-PAY-SMS-DISC-01 | Disclaimer sandbox/gateway + nạp ví /payments · OTP email copy | IMP 2026-08-03 |
| 22 | WP-FE-PAY-CHECKOUT-01 | FNB/Grocery settleOrderPayment · BE default provider VNPay>MoMo | IMP 2026-08-03 |
| 23 | WP-FE-PAY-RESULT-01 | PaymentResultScreen success/pending · deep link · FNB/Grocery/QR | IMP 2026-08-12 |
| 24 | WP-FE-PAY-RESULT-02 | Wallet topup gateway → PaymentResult (Account+Map) | IMP 2026-08-12 |
3. Dependency graph
flowchart TD
A[WP-SEC-WALLET-01] --> D[WP-PAY-LIVE-01 OWNER]
B[WP-SEC-SWAGGER-01] --> C[WP-CI-01]
E[WP-BACKUP-PG-01] --> F[go-live checklist]
G[WP-ROUTE-OSRM-SELF-01] --> F
H[WP-EAS-01] --> I[WP-EAS-DRV/PAR]
C --> H
A --> F
B --> F
D --> F
4. Definition of Done — Phase P7 “MVP cứng”
5. Agent behavior
| User nói |
Agent làm |
tiếp |
Stop-gate OWNER_REQUIRED · hoặc P7e nếu Owner chỉ định |
chạy autonomous |
Max 3 WP P7a/b; dừng trước mọi OWNER_REQUIRED |
| secret Pay/SMS |
Không bịa — báo OWNER |
| feature vertical mới |
Từ chối trừ Owner đổi brief |
Prompt copy:
Làm WP-SEC-WALLET-01 theo docs/16-PHASE-P7-HARDEN.md
Domain: D-WALLET · Surfaces: API · VPS
ALLOW_INTERNAL_WALLET_CREDIT=false trên prod; smoke; cập nhật 05-BACKLOG + 16 §2 Status IMP
Không đụng Pay live keys.
6. Liên kết
Phase: P7 Harden
Default next: **OWNER_REQUIRED** — xem [STATUS.md](./STATUS.html)
Done P7e: PROMO-02 · NOTIF-02 · RENT-VIEW-CANCEL · S3-LEASTPRIV · RIDE-ADDR · PAY-SMS-DISC
Done P7a–c: SEC · BACKUP · OSRM-SELF · OBS · EAS config+cloud APK · CI · ADM-DEPLOY
Done Figma sync: Home→Pharmacy (2026-08-13)
Queue feature STUB: EMPTY (396/0)
Owner gates remaining: Pay payUrl e2e · SMS phone e2e · MoMo merchant