Files
solution-erp/.claude/workflows/runs/2026-07-29-S161-khkk-w1-schema/run.md
2026-07-29 20:23:52 +07:00

29 lines
5.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# RUN — W1 KHKK: Schema Mig 69 + Permission + Designer type-10 (S161, 2026-07-29)
> **Wave đầu tiên của DRY-RUN TOÀN TRÌNH** (plan cha `../2026-07-29-S160-khkk-dryrun-plan/plan-cha-dry-run-toan-trinh-29-07-2026.md`).
> Spec thi công: `../2026-07-29-S160-khkk-dryrun-plan/spec-wave-w1-schema-designer-29-07-2026.md` (+ spec cũ `../2026-07-28-S157-ke-hoach-ky-ket-hd/spec-ke-hoach-ky-ket-hd-28-07-2026.md` §2.2 bảng chi tiết).
> **Gate 5-anchor: PASS 5/5 @S161** (slot 10 trống `ApprovalWorkflowsV2/ApprovalWorkflow.cs:53-67` · `MenuKeys.cs:41` const+comment · KeHoachKyKet ∉ All · `AuthorizePolicyRegressionTests.cs:138-139` lưới sống · `DbInitializer.cs:1779-1786` Khkk 7 key).
> **3 quyết owner @S161:** (1) mã phiếu `KHKK/{YYYY}/{Seq:D3}` OK · (2) "Bỏ MB" — dry-run cấm HĐ MuaBan, codegen giữ chờ format thay · (3) GĐ4 1-mốc (không đụng W1).
## taskList snapshot
| # | Stage | Vai / cách | Trạng thái |
|---|---|---|---|
| 1 | Đợt-1a BE: Domain 7 entity + 3 enum + ApplicableType=10 + EF Config ×7 + DbSets + **Mig 69** 3-file (apply 2 DB) + MenuKeys All+= + DbInitializer UPGRADE-if-exists (13/13 role) + CodeGen KHKK + 3 site AWV2AdminFeatures | hmw `implementer-backend` | [x] 3 chặng: lane-1 `wf_7d6fb81b-640` chết #53 sau Domain (8 entity + type-10 + 4/7 config) → lane-2 `wf_f8c806d2-5a3` cũng chết #53 NHƯNG sub-md 6.2KB ghi-trong-lúc-làm cứu trọn (audit 0-lệch + 3 config + DbSets + MenuKeys:179 + **Mig 69 `20260729122015` 3-file, apply 2 DB, sys.tables=96**, grep-proof trong sub-md) → **lead solo đuôi @S161**: seeder `SeedKeHoachKyKetAccessAsync` UPGRADE-if-exists+CanDelete (call sau revoke) + `ContractSigningPlanCodeGenerator` KHKK/{YYYY}/{Seq:D3} + DI + 3 site AWV2Admin (count/retained/orphan mirror VehicleBooking). **`dotnet build` 0W/0E 47s** |
| 2 | Đợt-1b FE: Designer type-10 `ApprovalWorkflowsV2Page.tsx` (TYPE_CODE_TO_INT + option + ẩn 2 checkbox early-finalize khi type=10) | hmw `implementer-frontend` | [x] `wf_7d6fb81b-640` lane-2 CLEAN — +67/9, containment 2-LỚP render+payload; **lead verify build tươi PASS** (bundle `index-iNZq9job`; diagnostics giữa-agent = stale #68); harvest diary xong. Cờ đỏ: type-10 chưa có đường sidebar (allowlist `Layout.tsx:162-168` — cả type-3 xưa nay cũng vậy, đúng spec "menu KHÔNG đổi") |
| 3 | Đợt-2a: schema test + codegen format test (`ContractSigningPlanSchemaTests` + `SigningPlanCodeGenerator_Format_KhkkYearSeqD3`, N ≥ 2) | hmw `test-specialist` | [x] `wf_a95c9909-14b`**4 test** (vượt sàn 2) + fault-inject 2 chiều chứng răng + bắt LỆCH prompt-vs-đĩa (LevelOpinion CỐ Ý không filter → assert thành invariant); vai chết #53 lúc đợi full-suite → lead chạy tươi + điền §2/§4 on-behalf |
| 4 | Đợt-2b: design-review Mig 69 TRƯỚC deploy (reversible Down · snapshot drift · FK/index) | hmw `database-agent` | [x] cùng wf — **PASS 8/8 + DB11, 0 blocker** (đo sys.foreign_keys/filter_definition; parity 2 DB tuyệt đối; Down script atomic sạch; IX superset khuôn PE; 4 advisory wave-sau) — `sub-database-agent-1.md` 21KB |
| 5 | Lead: build ×2 + `dotnet test` + sqlcmd 89→96 + Down-script sạch + acceptance §③-B sweep | lead | [x] build BE 0W/0E 47s + FE build tươi PASS · test **566/0** (562+4 ≥ sàn 564) · sys.tables 96 ×2 DB · Down script-proof · CÒN 2 vế prod-side @stage-7: đo-CỜ policy sau seed prod + Designer tạo type-10 3-Bước |
| 6 | Reviewer adversarial diff (schema mig >50 LOC — bắt buộc trước commit) | `reviewer` | [x] **PASS_WITH_FLAGS 10 issue (1H/3M/4m/2L), 0 chặn logic** — lượt-1 garble #53 giữa Trục-1 → SendMessage-resume về SẠCH đủ 6 trục. Disposition TỪNG DÒNG: 8 FIX cùng commit (F-0 git-add-tường-minh gate · F-7 label VN type-10 vào AwLabels · F-8 ép-false 2 cờ tầng BE · F-2 STATUS 55/220 · F-5 comment 7→8 · F-3 comment 2 chỗ · F-9 neo-tên-thay-số-dòng · F-6b khai giới hạn changelog) + 2 GIỮ (F-1 đo-CỜ chờ prod @stage-7 · F-4 kế thừa y PE prod). Sau fix: build 0W/0E + suite 566/0 GIỮ. Residual-write MEMORY tự-curate → verify ĐẠT, ACCEPT verified-KEPT (AS-10) — `sub-reviewer-2.md` |
| 7 | Commit + push + cicd-monitor 3-chân-kiềng (CI PASS · mig 69 prod · menu 142 giữ) | lead + `cicd-monitor` | [x] commit **`a8027c0`** PUSH → CI Run **#427 success 5m40s** · cicd **VERDICT=PASS 6/6** (`cicd-verify-a8027c0.md` 277 dòng END-line đủ; return garble #53 lần 5 — đĩa trọn): gate 566 · Mig 69 prod 96 bảng · menu **142 GIỮ** · marker 3-tầng-control-âm · **đo CỜ 13/13/13/2 + `Khkk_G1` control-âm-nội-họ đứng yên + log `0 added + 91 upgraded` khớp dự-đoán-ghi-trước** · label type-10 VN sống prod. Residual MEMORY cicd ACCEPT verified-KEPT; ⚠️ `_INDEX` cicd nay **99,2%** (167B) — slot 51-bis GẤP |
**⇒ W1 ĐÓNG — synthesis: `w1-synthesis.md` (VERIFIED). Tồn sang wave sau: setup WF tay trước W5 · tài khoản UAT non-Admin (nv.test không tồn tại prod) · slot 51-bis · F-4.**
## Ràng buộc mang theo
- 🔴 Seeder = **UPGRADE-if-exists khuôn `SeedProcurementMasterAccessAsync:2367-2374` + mở rộng vế CanDelete**, chạy SAU revoke (mirror `:2098-2101`) — KHÔNG insert (F-S1, 403 giết dry-run) · CẤM SQL tay (#84).
- 🔴 Acceptance đo CỜ không đếm ROW (F-04) · UNIQUE filtered WHERE IsDeleted=0 (#57) · enum bắt đầu 1 không 0 (falsy JS) · loose-Guid không FK vật lý sang PE/Supplier (convention Mig 49).
- 🔴 Lead commit SAU reviewer — worker KHÔNG commit/push.
## Stages
(cập nhật theo tiến độ)