wal: pause
This commit is contained in:
@ -14,17 +14,109 @@
|
||||
- 🔴 **KHÔNG có file nào trong `*Migrations*`** ⇒ đợt 2 NO-MIG (đúng như lead nói).
|
||||
- Không file nào khớp `paths-ignore` 7-glob ⇒ CI PHẢI chạy.
|
||||
|
||||
## 0bis. PRE-DEPLOY BASELINE (chụp 14:07–14:08, khi run #417 còn `running`)
|
||||
|
||||
Chụp TRƯỚC khi deploy xong ⇒ mọi thay đổi thấy sau này là DO ĐỢT NÀY, không phải "sẵn có".
|
||||
|
||||
**Bundle (14:07:54):** admin js `CiUBEEJr` css `DX5ew0wg` · eoffice js `DFh7GK0t` css `BHsBUA8e`
|
||||
(= đúng baseline đợt 1 run #416 ⇒ chưa ship đợt 2 tại thời điểm chụp)
|
||||
|
||||
**Menu `Pe_*` (10 hàng, KHÔNG có `_Approved`/`_Deleted`):**
|
||||
```
|
||||
Pe_DuyetNcc | Duyệt NCC | vis=1 Pe_DuyetNccPhuongAn | Duyệt NCC và Giải pháp | vis=0
|
||||
Pe_DuyetNcc_Create | Thao tác Pe_DuyetNccPhuongAn_Create | Thao tác
|
||||
Pe_DuyetNcc_List | Danh sách Pe_DuyetNccPhuongAn_List | Danh sách
|
||||
Pe_DuyetNcc_Pending | Duyệt ← NHÃN CŨ Pe_DuyetNccPhuongAn_Pending | Duyệt ← NHÃN CŨ
|
||||
Pe_DuyetNcc_WfView | Luồng duyệt Pe_DuyetNccPhuongAn_WfView | Luồng duyệt
|
||||
```
|
||||
🔑 **Kỹ thuật đọc nhãn tiếng Việt qua ssh→sqlcmd:** output mặc định mangle (`Duy?t`) không phân
|
||||
biệt được "Duyệt" vs "Đang duyệt" đủ chắc ⇒ dùng
|
||||
`CONVERT(varchar(400), CAST(Label AS varbinary(400)), 2)` → hex, decode `utf-16-le` phía client.
|
||||
Pre-deploy hex-decode CHÍNH XÁC: `Pe_DuyetNcc_Pending -> 'Duyệt'` · `Pe_DuyetNccPhuongAn_Pending -> 'Duyệt'`.
|
||||
|
||||
**Mig top:** `20260727033522_AddPeAllowApproverDelete` (Mig 68) · `sys.tables`(is_ms_shipped=0) = **89**
|
||||
|
||||
## 1. Gitea Actions run — ĐANG ĐO
|
||||
|
||||
(chưa có)
|
||||
✅ **PASS.** Run **#417** (task id=**530**), `head_sha=4464a464`.
|
||||
- created `14:06:29` → `status=success` @ `14:12:16+07:00` ⇒ **5m47s** (bình thường, ~5m30 gần đây).
|
||||
- `conclusion=None` — đúng khuôn Gitea `tasks` (trust `status`, đã tái-xác-nhận từ S126).
|
||||
- Path-filter: 15 file đổi, KHÔNG file nào khớp `paths-ignore` 7-glob ⇒ CI trigger ĐÚNG.
|
||||
- URL: https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp/actions/runs/417
|
||||
|
||||
## 2. Menu prod — ĐANG ĐO
|
||||
**Test gate — số THẬT trích từ log CI** (`…/actions/runs/417/jobs/0/logs`, 17.864 B):
|
||||
```
|
||||
07:06:53Z Passed! - Failed: 0, Passed: 45, Skipped: 0, Total: 45 — SolutionErp.Domain.Tests.dll
|
||||
07:09:25Z Passed! - Failed: 0, Passed: 517, Skipped: 0, Total: 517 — SolutionErp.Infrastructure.Tests.dll
|
||||
```
|
||||
⇒ **562 PASS / 0 FAIL / 0 SKIP** (45 + 517). **Khớp CHÍNH XÁC số lead đo local (562)** = cross-check
|
||||
2 nguồn độc lập. Tăng **+11 so với run #416 đợt 1 (551)** — khớp file test mới `PeDeleteByApproverTests.cs`.
|
||||
Gate chạy TRƯỚC build/deploy ⇒ `success` ⟹ gate đã qua.
|
||||
|
||||
(chưa có)
|
||||
## 2. Menu prod — ✅ PASS (TRỌNG-TÂM, gồm cả chỗ dễ trượt nhất)
|
||||
|
||||
## 3. Permission seed — ĐANG ĐO
|
||||
Đo lúc 14:12 (sau `success`), cùng câu lệnh hex-decode như baseline 14:08 ⇒ so được 1:1.
|
||||
|
||||
(chưa có)
|
||||
```
|
||||
Pe_DuyetNcc 'Duyệt NCC' vis=1 ord=1
|
||||
Pe_DuyetNcc_WfView 'Luồng duyệt' vis=1 ord=2
|
||||
Pe_DuyetNcc_List 'Danh sách' vis=1 ord=3
|
||||
Pe_DuyetNcc_Create 'Thao tác' vis=1 ord=4
|
||||
Pe_DuyetNcc_Pending 'Đang duyệt' 🔴ĐÃ ĐỔI vis=1 ord=5
|
||||
Pe_DuyetNcc_Approved 'Đã duyệt' 🆕MỚI vis=1 ord=6
|
||||
Pe_DuyetNcc_Deleted 'Đã xóa' 🆕MỚI vis=1 ord=7
|
||||
Pe_DuyetNccPhuongAn 'Duyệt NCC và Giải pháp' vis=0 ord=8
|
||||
Pe_DuyetNccPhuongAn_WfView 'Luồng duyệt' vis=1 ord=9
|
||||
Pe_DuyetNccPhuongAn_List 'Danh sách' vis=1 ord=10
|
||||
Pe_DuyetNccPhuongAn_Create 'Thao tác' vis=1 ord=11
|
||||
Pe_DuyetNccPhuongAn_Pending 'Đang duyệt' 🔴ĐÃ ĐỔI vis=1 ord=12
|
||||
Pe_DuyetNccPhuongAn_Approved 'Đã duyệt' 🆕MỚI vis=1 ord=13
|
||||
Pe_DuyetNccPhuongAn_Deleted 'Đã xóa' 🆕MỚI vis=1 ord=14
|
||||
```
|
||||
|
||||
| Điểm kiểm | Kỳ vọng | Thật | |
|
||||
|---|---|---|---|
|
||||
| `Pe_{code}_Approved` nhãn "Đã duyệt" | 2/2 type | 2/2 có, nhãn ĐÚNG | ✅ |
|
||||
| `Pe_{code}_Deleted` nhãn "Đã xóa" | 2/2 type | 2/2 có, nhãn ĐÚNG | ✅ |
|
||||
| 🔴 `Pe_{code}_Pending` "Duyệt"→"Đang duyệt" | 2/2 đổi | 2/2 đổi (**pre-deploy 14:08 còn là `'Duyệt'`**) | ✅ |
|
||||
| `Pe_*` tổng | 10 → 14 | 10 → **14** (+4) | ✅ |
|
||||
|
||||
🔑 **3 chứng cứ cùng lúc, khoá chặt trọng-tâm "API phải restart thì seed mới ăn":**
|
||||
(i) 4 key mới KHÔNG có ở baseline 14:08 và CÓ ở 14:12 ⇒ seeder chạy TRONG cửa-sổ deploy, không phải sẵn có;
|
||||
(ii) nhãn `Pending` đổi được ⇒ **`labelBackfill` (`DbInitializer.cs:1918-1924`) ĐÃ CHẠY THẬT** — đây là
|
||||
đường RIÊNG, không đi qua upsert `:1893-1905` (upsert gặp key cũ chỉ update `Order` rồi `continue`,
|
||||
không đụng `Label`). Nhãn vẫn "Duyệt" sẽ là FAIL đáng báo động — **KHÔNG xảy ra**;
|
||||
(iii) `Order` cả cụm được ghi lại liền mạch 1→14 (Approved=6/13, Deleted=7/14 chèn sau Pending) ⇒
|
||||
nhánh upsert cũng chạy trọn, không nửa vời.
|
||||
|
||||
## 3. Permission seed — ✅ PASS (cả 2 danh sách đều ăn)
|
||||
|
||||
`Permissions` prod (cột thật: `RoleId` + **`MenuKey` nvarchar**, KHÔNG phải FK `MenuItemId`).
|
||||
Prod có **13 role**. Gom nhóm theo `MenuKey LIKE 'Pe[_]%'`:
|
||||
|
||||
```
|
||||
Pe_DuyetNcc rows=13 read=13 cre=13 upd=7 del=1
|
||||
Pe_DuyetNcc_WfView rows=13 read=13 cre=13 upd=7 del=1
|
||||
Pe_DuyetNcc_List rows=13 read=13 cre=13 upd=7 del=1
|
||||
Pe_DuyetNcc_Create rows=13 read=13 cre=13 upd=7 del=1
|
||||
Pe_DuyetNcc_Pending rows=13 read=13 cre=13 upd=7 del=1
|
||||
Pe_DuyetNcc_Approved 🆕 rows=13 read=13 cre=13 upd=7 del=1
|
||||
Pe_DuyetNcc_Deleted 🆕 rows=13 read=13 cre=13 upd=7 del=1
|
||||
… (khối `DuyetNccPhuongAn` 7 dòng GIỐNG HỆT, kể cả 2 key mới)
|
||||
```
|
||||
⇒ **4 key mới đều có đủ 13 hàng/13 role**, và profile quyền (13/13/7/1) **trùng khít** key `Pe_*` cũ
|
||||
⇒ CẢ HAI danh sách được vá (`DbInitializer.cs:2110-2111` `UpgradeReviewModulePermissions…` **và**
|
||||
`:2514-2515` `SeedPurchaseEvaluationPermissionDefaults…`) — không lệch bên nào.
|
||||
Tổng: `Permissions` 718 hàng / **68 MenuKey distinct** · `MenuItems` 105 hàng.
|
||||
|
||||
**Số canonical KHÔNG đổi (đúng chủ đích):** đếm từ mã `MenuKeys.All` = **54** phần tử ·
|
||||
`Actions` = 4 ⇒ **Policies = 216**. Trong `All` chỉ có root `PurchaseEvaluations`, KHÔNG có
|
||||
`Pe_*` leaf. Diff `MenuKeys.cs` đợt này chỉ 1 hunk `@@ -135,6 +135,15 @@` (2 factory + chú thích),
|
||||
**không chạm mảng `All`** (dòng 156). ✅
|
||||
|
||||
**NO-MIG confirm:** `git diff HEAD~1 HEAD -- '*Migrations*'` = RỖNG · `__EFMigrationsHistory` top
|
||||
vẫn `20260727033522_AddPeAllowApproverDelete` (Mig 68) · `sys.tables`(is_ms_shipped=0) = **89**.
|
||||
Đúng kỳ vọng "đợt 2 không có migration".
|
||||
|
||||
## 4. Endpoint mới — ĐANG ĐO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user