From 7a0ba1734574bc326cb3332e00c3ab19fe974438 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Wed, 29 Jul 2026 23:39:33 +0700 Subject: [PATCH] wal: flush 20260729T2339 --- .claude/WAL.md | 5 +- .../cicd-verify-761d818.md | 87 +++++++++++++++++++ .../w6-synthesis.md | 9 ++ .../2026-07-29-S161-khkk-w7-bancung/run.md | 24 +++++ 4 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 .claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/cicd-verify-761d818.md create mode 100644 .claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/w6-synthesis.md create mode 100644 .claude/workflows/runs/2026-07-29-S161-khkk-w7-bancung/run.md diff --git a/.claude/WAL.md b/.claude/WAL.md index b82cd45..538e1e5 100644 --- a/.claude/WAL.md +++ b/.claude/WAL.md @@ -33,7 +33,10 @@ chain: - [x] W6 đợt-2 `wf_131c8f87-356` XONG (#53, file land): 7 test (5 PIN + 2 bonus) → **suite 587/0 lead-tươi** (580+7, vượt đích 585) - [x] reviewer W6 **PWF 0-chặn** (Trục 1-3 vai PASS 0-critical + 4-7 lead on-behalf): per-HĐ THẬT không role-blanket · 2 ghi-nhận OWNER: (i) view = **workflow-blanket-by-design** (per-HĐ-theo-QUY-TRÌNH, không phải per-HĐ-được-giao — đúng spec, khai độ rộng) · (ii) **Reject :49-66 pre-existing AMPLIFIED** (W6 mở view ⇒ lấy contractId dễ ⇒ bán kính nổ lỗ O-A tăng — mốc ghi để khi đóng O-A biết) - [x] commit W6 `761d818` (3 file +811/−6) PUSHED -- [!] wf: cicd verify `761d818` ĐANG CHẠY (CI 587 · 0-mig · menu 142 · inbox admin 200-rỗng-hợp-lệ · CỜ) → PASS ⇒ **W6 ĐÓNG** → W5 (CẦN setup WF tay trước) → W7 +- [x] **W6 ĐÓNG — cicd VERDICT=PASS** (Stage 1-2 cicd [CI 587 delta+7 · restart chứng-đến-giây] + 3-6 lead [MIGTOP giữ · 96 · 142 · **inbox admin 200-`[]`-hợp-lệ không-500** · CỜ giữ]). Synthesis `runs/2026-07-29-S161-khkk-w6-duongong/w6-synthesis.md` +- [x] gate 5-anchor W7 PASS 5/5 (A2 content-found drift+6; A5 xác nhận 0-type) +- [!] wf: W7 đợt-1 `wf_0ae8cc6d-6e2` ĐANG CHẠY — {BE nhỏ: +param type + DTO hasSealedCopy append-cuối · FE: HardCopiesPage ×2 + 4-place 7 leaf Hdc + upload 1-purpose SealedCopy qua endpoint Contract CÓ SẴN} theo spec RÚT-1-MỐC @S161 — run-folder `runs/2026-07-29-S161-khkk-w7-bancung/`. Sau: test 3-PIN → reviewer → ship +- [ ] 🔴 W5 CHỜ ANH: chốt NGƯỜI DUYỆT 3 trạm (PRO/CCM/CEO = ai trong 18 user prod) để dựng 2 workflow type-3/type-10 qua Designer — em không tự chọn người thật; xong mới chạy W5 (cầu KHKK→HĐ) + E2E - [ ] W5 (cầu KHKK→HĐ — cần setup WF tay TRƯỚC: type-3 + type-10 3-trạm Designer) → W7 (bản cứng 1-mốc @S161) - [ ] W6 → W5 → W7 theo đồ thị plan-cha (sau W3) - [ ] đợt-2 SAU khi wf về: test-specialist + database-agent (song song) → lead acceptance §③-B (build·test·sqlcmd 96·Down sạch·đo CỜ) → reviewer → commit/push → cicd-monitor 3-chân-kiềng diff --git a/.claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/cicd-verify-761d818.md b/.claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/cicd-verify-761d818.md new file mode 100644 index 0000000..c5f137b --- /dev/null +++ b/.claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/cicd-verify-761d818.md @@ -0,0 +1,87 @@ +# CI/CD verify — `761d818` (W6 KHKK — đường ống HĐ V2, BE-only 0-mig) + +> Agent: cicd-monitor · Session S161 W6 · Bắt đầu: 2026-07-29 (giờ VN) +> Ghi TỪNG MỤC ngay khi có bằng chứng (chống #53 garble — file này là SẢN PHẨM CHÍNH, return chỉ là tóm tắt). + +--- + +## STAGE 1 — Push + path-filter (DONE) + +- **Commit:** `761d8183f365c68d2fca13ab27f2ee810fdbc30e` +- **Ngày giờ commit:** `2026-07-29 23:27:19 +0700` +- **Subject:** `[CLAUDE] App+Infra+Tests: W6 KHKK — duong ong HD V2 (view per-HD 3-site + inbox V2+ADMIN + guard trinh +PMH)` +- **Unpushed (`git log origin/main..HEAD`):** RỖNG ⇒ đã push xong. +- **Diff stat:** 3 file, +811 / −6 + +| File | +/− | +|---|---| +| `src/Backend/SolutionErp.Application/Contracts/ContractFeatures.cs` | +142/−… | +| `src/Backend/SolutionErp.Infrastructure/Services/ContractWorkflowService.cs` | +15/−… | +| `tests/SolutionErp.Infrastructure.Tests/Application/ContractV2PipelineTests.cs` | +660 (file MỚI) | + +- **Path-filter (gotcha #41, 7-glob):** cả 3 file nằm dưới `src/Backend/**` + `tests/**` ⇒ KHÔNG khớp glob nào trong `paths-ignore` ⇒ **CI PHẢI chạy**. (soi TỪNG file, không suy từ tổng) +- **0-mig proof (lớp 1/3 — repo):** `git diff 761d818~1 761d818 -- '*Migrations*'` → **RỖNG** ⇒ commit không đụng migration. +- **0-FE proof (lớp 1/2 — repo):** `git diff 761d818~1 761d818 -- 'fe-admin/*' 'fe-user/*'` → **RỖNG** ⇒ 0 file FE đổi ⇒ theo #69 TWO-MODE, bundle rotate-or-frozen đều hợp lệ; ship-proof = Last-Modified in-window. + +**STAGE 1 = PASS.** + +--- + +## STAGE 2 — Gitea Actions poll + +- **Run matched theo `head_sha` (KHÔNG theo run_number):** `761d8183` → **Run #430, id=543** +- **created_at:** `2026-07-29T23:27:28+07:00` (t+9s sau commit-time 23:27:19 ⇒ đúng run của push này) +- Poll iter 1-5: `running` (updated_at bò 23:28:17 → 23:30:48) + +_(chờ `completed` — ghi tiếp)_ + +--- + +## PRE-DEPLOY BASELINE (đo TRƯỚC khi pool recycle — dùng làm vế so delta) + +### P-A. FE bundle snapshot (PRE) + +| App | JS | CSS | +|---|---|---| +| admin.solutions.com.vn | `index-BPWQQe4q.js` | `index-KS0kL7bG.css` | +| eoffice.solutions.com.vn | `index-DV3fEpOw.js` | `index-Cpp9Qc7C.css` | + +> ⚠️ Baseline này ≠ baseline MEMORY (#426 `D0sXA0fe`/`Y6dW_5CM`) vì đã có Run #428 (`6cbc6ad9`) + #429 (`df52fa0c`) xen giữa (W2…W5). Re-snapshot LIVE là bắt buộc — hash trong memory là SNAPSHOT-per-run, không phải mốc ổn định (#69). + +### P-B. DB baseline (PRE) — sqlcmd qua `ssh vietreport-vps` + +``` +MIGTOP=20260729122015_AddContractSigningPlans +MIGCOUNT=69 +TABLES=96 (sys.tables WHERE is_ms_shipped=0) +MENUS=142 (MenuItems) +``` + +### P-C. Cờ KeHoachKyKet (PRE) — `Permissions` (⚠️ cột là `Permissions.MenuKey` trực tiếp, KHÔNG join `MenuItems`; `MenuItems` dùng cột `[Key]` — query join kiểu `m.MenuKey` sẽ lỗi `Invalid column name`) + +Tập đích **ground-truth từ seeder** `DbInitializer.cs:2420-2425` `SeedKeHoachKyKetAccessAsync` = **7 key** = root policy-key `KeHoachKyKet` + **6** leaf `Khkk_*`. `Khkk_G1` = group điều hướng, **CỐ Ý loại khỏi danh sách** (`:2418-2419`) ⇒ đóng vai **control ÂM nội-họ**. + +| MenuKey | R | C | U | D | rows | +|---|---|---|---|---|---| +| `KeHoachKyKet` (root) | 13 | 13 | 13 | 2 | 13 | +| `Khkk_WfView` | 13 | 13 | 13 | 2 | 13 | +| `Khkk_List` | 13 | 13 | 13 | 2 | 13 | +| `Khkk_Create` | 13 | 13 | 13 | 2 | 13 | +| `Khkk_Pending` | 13 | 13 | 13 | 2 | 13 | +| `Khkk_Approved` | 13 | 13 | 13 | 2 | 13 | +| `Khkk_Deleted` | 13 | 13 | 13 | 2 | 13 | +| **`Khkk_G1` (control ÂM)** | **13** | **0** | **0** | **0** | 13 | + +⚠️ **Bẫy phạm-vi query đã tránh:** `LIKE 'Khkk%'` chỉ ra **6/7** key đích — root `KeHoachKyKet` KHÔNG khớp tiền-tố `Khkk`. Phải query tách 2 mảnh rồi cộng, nếu không sẽ báo thiếu 1 key và tưởng drift. + +--- + +## STAGE 3-6 — POST-deploy + +_(chờ status=success + chứng minh restart)_ + +## STAGE 3-6 — [LEAD đo on-behalf]: PASS ✅ +sqlcmd prod: MIGTOP `20260729122015` GIỮ · TABLES 96 · MENU **142 GIỮ** · CỜ KeHoachKyKet Create=13/Delete=2 GIỮ. +Smoke: `GET /api/contracts/inbox` (admin) **200 `[]`** — rỗng HỢP LỆ (prod Contracts=0), điểm đo = không-500 sau khi đổi query inbox ✅ · `GET /api/contracts` 200 · control 404. + +END cicd-verify 761d818 — **VERDICT=PASS** (Stage 1-2 cicd [CI success · gate 587 delta +7 · restart chứng đến-giây] + Stage 3-6 lead 2-nguồn) diff --git a/.claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/w6-synthesis.md b/.claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/w6-synthesis.md new file mode 100644 index 0000000..4cbd7d9 --- /dev/null +++ b/.claude/workflows/runs/2026-07-29-S161-khkk-w6-duongong/w6-synthesis.md @@ -0,0 +1,9 @@ +# W6-SYNTHESIS — Đường ống HĐ V2: view + inbox + vai-trình (S161) — VERIFIED + +## KẾT QUẢ: SHIP PROD `761d818` — cicd PASS (CI 587 · 0-mig · menu 142 · inbox admin 200-rỗng-hợp-lệ · CỜ giữ) +- 3 lỗ wiring đóng: view per-HĐ 3 call-site (:301/:381/:486, per-HĐ THẬT — reviewer trục-1 xác nhận không role-blanket, nháp-riêng-tư S89 giữ) · inbox ghép v2InboxIds + **nhánh ADMIN phase-list tường minh +ChoDuyet** (DR-4/F-B13 đóng trọn vòng từ câu hỏi đầu phiên) · guard trình +Procurement/+người-tạo **kèm chặn null==null** (`actorUserId is Guid` — HĐ seed CreatedBy=null gặp actor null sẽ lọt nếu viết thẳng). +- Test +7 (587/0): 5 PIN + admin-inbox + `Submit_..._UnrelatedRoleAndNullActor_Forbidden`. +- 2 ghi-nhận OWNER (không chặn): (i) view = workflow-blanket-BY-DESIGN (per-HĐ-theo-quy-trình ≠ per-HĐ-được-giao — đúng spec, khai độ rộng); (ii) Reject :49-66 pre-existing **AMPLIFIED** — view mở ⇒ lấy contractId dễ ⇒ bán kính nổ lỗ O-A tăng, mốc ghi tại đây. + +## VẬN HÀNH: 3/3 lượt #53, 0 mất (sub-md + code + lead đóng đuôi mỗi lượt). +## TỒN: W5 cần anh CHỌN NGƯỜI DUYỆT (3 trạm PRO→CCM→CEO là ai trên prod — 18 user) trước khi dựng 2 workflow type-3/type-10; em không tự chọn người thật. diff --git a/.claude/workflows/runs/2026-07-29-S161-khkk-w7-bancung/run.md b/.claude/workflows/runs/2026-07-29-S161-khkk-w7-bancung/run.md new file mode 100644 index 0000000..0d47d68 --- /dev/null +++ b/.claude/workflows/runs/2026-07-29-S161-khkk-w7-bancung/run.md @@ -0,0 +1,24 @@ +# RUN — W7 KHKK: Bản cứng `Hdc_*` 7 leaf — 1-MỐC (S161→S162, 2026-07-29/30) + +> Wave cuối build (5/6). Spec: `../2026-07-29-S160-khkk-dryrun-plan/spec-wave-w7-ban-cung-hdc-29-07-2026.md` (**ĐÃ RÚT 1-MỐC @S161** — anh chốt verbatim "Upload file cứng lên -> Là xem như xong": 0 enum-extend, 1 badge has(SealedCopy), note tùy chọn, b.19/20/21 làm trên giấy). W1-W3+W6 ĐÃ SHIP. +> Build song song hợp lệ (đồ thị plan-cha); VERIFY prod cần HĐ DaPhatHanh → sau W5. + +## taskList snapshot + +| # | Stage | Vai | Trạng thái | +|---|---|---|---| +| 1 | Gate 5-anchor §③-A (mở tươi) | lead | [ ] | +| 2 | Đợt-1a BE nhỏ: param `type` ListContractsQuery+controller (F-C1) + DTO +1 cờ `hasSealedCopy` | hmw `implementer-backend` | [ ] | +| 3 | Đợt-1b FE: `HardCopiesPage` ×2 app + 4-place re-point 7 leaf `Hdc_*` khỏi coming-soon + panel upload 1-purpose + badge + LevelOpinions readonly | hmw `implementer-frontend` | [ ] | +| 4 | Đợt-2: test-specialist 3 test PIN §③-B | hmw `test-specialist` | [ ] | +| 5 | Lead: suite + build ×2 + sweep | lead | [ ] | +| 6 | Reviewer | `reviewer` | [ ] | +| 7 | Commit + push + cicd (menu 142 GIỮ — chỉ re-point staticMap) | lead + `cicd-monitor` | [ ] | + +## Ràng buộc +- 🔴 1-MỐC @S161: 0 enum-extend (SealedCopy=3 sẵn) · 1 badge · note TÙY CHỌN · KHÔNG InitialSigned/CoverChecklist · UI ghi rõ ký/đóng-dấu NGOÀI hệ thống. +- 🔴 Badge KHÔNG từ ScannedSigned (F-C6 #71) · KHÔNG lọc client-side pageSize:100 (F-05) · authz O-A giữ (KHÔNG policy mới). +- 🔴 Mirror mù: Hdc = 7-leaf-per-type (KHÔNG 6-leaf grounding cũ). + +## Stages +(cập nhật)