wal: flush 20260812T2229

This commit is contained in:
pqhuy1987
2026-08-12 22:29:59 +07:00
parent 2fed7540ad
commit edad406f31
3 changed files with 120 additions and 10 deletions

View File

@ -0,0 +1,103 @@
# CI/CD Deploy Verify — YC-029 + YC-030 GĐ3 Duyệt Hợp đồng
**Agent:** cicd-monitor (READ-only) · **Session:** S190 · **Date:** 2026-08-12
**Run:** #600 (task id=600, run_number **#487**) · **Commit HEAD:** `091073f9` · **Workflow:** deploy.yml
---
## VERDICT: ✅ PASS (full) — prod SỐNG, anh vào kiểm được
Deploy SAU sự cố P0 disk-0 hôm qua (S189/YC-028) chạy TRỌN VẸN. Disk-death KHÔNG tái diễn (25.9 GB free). Test gate 697 khớp claim tới từng số. Mig 73 áp prod. Bundle rotate ×2 với byte-match CI↔prod. Smoke 200/401 chuẩn.
Run URL: https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp/actions/runs/487
---
## 1. Run status + disk guard (task item 1 + S189 context)
| Item | Value | Status |
|---|---|---|
| Run #600 (id=600, #487) | `status=success` (concl=None — tasks API không populate, tin status) | ✅ |
| Commit | `091073f9` Docs YC-029/YC-030 (HEAD của push chứa 8 code commit) | ✅ |
| Wall time | push 22:11 → done 22:22:54 (~11m; Infra tests 3m11s + 2 FE build) | ✅ |
| **Disk C: VPS** | **25.9 GB free** (PRE-deploy probe; lead dọn 4.7→26.6GB giữ) — KHÔNG chết disk lần 2 | ✅ |
deploy.yml = test-gate (Domain+Infra) TRƯỚC build+deploy ⇒ `status=success` = gate PASS + build + ship đều xanh.
## 2. Test gate — baseline SỐNG (task item 2)
CI log #487 (`/actions/runs/487/jobs/0/logs`), 2 dòng `Passed!`:
```
Passed! - Failed: 0, Passed: 45, Skipped: 0, Total: 45 - SolutionErp.Domain.Tests.dll
Passed! - Failed: 0, Passed: 652, Skipped: 0, Total: 652 - SolutionErp.Infrastructure.Tests.dll
```
| Project | #486 baseline | #600 actual | Δ |
|---|---|---|---|
| Domain | 45 | **45** | 0 |
| Infrastructure | 635 | **652** | +17 |
| **Total** | **680** | **697** | **+17** |
**697 KHỚP CLAIM TỚI SỐ** (693 YC-029 + 4 YC-030). Δ+17 nằm TRỌN ở Infra.Tests (YC-029 +13 cumulative + YC-030 finalize +4 = `ContractApproveFinalizeTests.cs`). 0 Failed / 0 Skipped.
## 3. Mig 73 áp prod (task item 3)
SSH `vietreport-vps``sqlcmd -E` (integrated auth, `$env:PROD_DB_PASSWORD` trống là bình thường):
| Check | PRE-deploy | POST-deploy | Status |
|---|---|---|---|
| `__EFMigrationsHistory` top | `20260806..._AddMaHangMuc...` (Mig 72) | **`20260812141501_AddContractEndedByLevelFinalize`** | ✅ applied |
| `EndedByLevelFinalize` col trên Contracts | 0 (absent) | **has_col=1**`bit`, `is_nullable=0` (NOT NULL) | ✅ khớp Mig73 (AddColumn bit NOT NULL default false) |
| `sys.tables` count | 97 | **97** (unchanged) | ✅ đúng — AddColumn không tạo bảng |
| App pool recycle | — | w3wp PID 8696 StartTime **22:21:57** (trong deploy-window) + DbInitializer chạy MigrateAsync khi startup ⇒ mig 73 land = pool ĐÃ recycle | ✅ |
## 4. Bundle rotate ×2 app (task item 4)
| App | PRE (old) | POST (new, live prod) | CI-log build size | Status |
|---|---|---|---|---|
| eoffice JS | `index-DqJszev6.js` (S189 hotfix) | **`index-BIN1bEGo.js`** | `1,803.88 kB` | ✅ rotate |
| eoffice CSS | `index-C2BeQj5C.css` | **`index-b_d2fusd.css`** | `94.18 kB` | ✅ rotate |
| admin JS | `index-RZy2dzPC.js` | **`index-D2FHMRPX.js`** | `1,819.49 kB` | ✅ rotate |
| admin CSS | `index-CTIZKsjE.css` | **`index-DVHtHLex.css`** | `88.39 kB` | ✅ rotate |
**Ship-proof 3 chân kiềng (gotcha #69/#77):**
1. **Rotate** — cả 4 hash đổi so PRE.
2. **Byte-match CI↔prod**`curl -w size_download`: admin js = **1,819,492 B** == CI `1,819.49 kB`; eoffice js = **1,803,881 B** == CI `1,803.88 kB`. Artifact CI build = artifact prod serve, tới byte. `Content-Type: application/javascript` (KHÔNG SPA-fallback trap).
3. **Control âm overwrite** — hash CŨ `index-DqJszev6.js` giờ trả **`text/html` 876 B** = SPA-fallback ⇒ file cũ ĐÃ bị ghi đè trên đĩa (không phải thêm-cạnh). Deploy REPLACE thật.
## 5. Smoke (task item 5)
| Check | Expected | Actual | Status |
|---|---|---|---|
| POST /api/auth/login (admin) | 200 + token | **200**, accessToken len=468 | ✅ |
| GET /api/contracts | 200 bearer / 401 none | **200 / 401** | ✅ |
| GET /api/purchase-evaluations | 200 / 401 | **200 / 401** | ✅ |
| GET /api/menus | 200 / 401 | **200 / 401** | ✅ |
| api /health/ready | 200 | **200** | ✅ |
| admin root / eoffice root | 200 | **200 / 200** | ✅ |
Auth gate đúng 2 tầng (200 có token / 401 không) — không silent-403 (#44).
## 6. Gotcha #91 guard (task item 6)
| Signal | Value | Status |
|---|---|---|
| `repo.updated_at` (DB tier) | `2026-08-12T22:11:20+07:00` ≥ commit ts `22:10:10` | ✅ app tier THẤY push |
| `branches/main` head (disk tier) | `091073f910b7` = HEAD | ✅ khớp |
| ActionRun tồn tại | id=600 sinh ra + chạy tới success | ✅ notifier KHÔNG câm |
Hai nguồn (updated_at vs branch-head) KHÔNG lệch ⇒ không có ca #91 (push land mà app câm). Đối lập hoàn toàn S189.
---
## Critical issues
KHÔNG có. Zero FAIL, zero PARTIAL. Không có gotcha tái phát.
## Notes cho em main
- Mig 73 = mirror PE Mig 60 (`EndedByLevelFinalize` runtime-flag), reversible Down (DropColumn) — an toàn rollback nếu cần.
- YC-030 BE commit khai "tắt seeder QT-HD-V2-001" — nằm trong DbInitializer diff (/+9 dòng); ngoài scope post-deploy-verify, đã confirm test 697 xanh + mig land ⇒ không cản deploy.
- Baseline MỚI cho lần sau: gate **697** (45 Domain + 652 Infra) · Mig **73** · bundle admin `D2FHMRPX`/`DVHtHLex` · eoffice `BIN1bEGo`/`b_d2fusd`.
**Token cost:** ~52K.
END — VERDICT=PASS (6/6 task items green; prod SỐNG, anh vào kiểm được)