# RUN — W3 KHKK: Duyệt 3 trạm + finalize chốt giá (S161, 2026-07-29) 🔴 wave nặng nhất > Wave 3/6. Spec: `../2026-07-29-S160-khkk-dryrun-plan/spec-wave-w3-duyet-3-tram-29-07-2026.md`. W1 `a8027c0` + W2 `6cbc6ad` ĐÃ SHIP (cicd PASS 6/6 ×2). > **Gate 5-anchor PASS 5/5 @S161** (ApproveV2Async:217 [🔴 path = Infrastructure/Services] · OR-of-N :259-260 · UPSERT :292-296 + "(duyệt — không ý kiến)" · ApprovalWorkflow.cs :95/:116-125 · RULE khuôn ContractFeatures :356-360). > 🔴 **TEST-BEFORE BẮT BUỘC** (critical algo OR-of-N) ⇒ 3 đợt: skeleton → 6 test RED → implement GREEN. > 🔴 **HỢP-ĐỒNG TRANSITIONS (LEAD định nghĩa — bài W2 6-điểm-đứt; 2 lane implement đúng LITERAL):** > `POST /api/contract-signing-plans/{id}/transitions` · policy `KeHoachKyKet.Update` > body `{ "action": "submit"|"approve"|"return"|"reject", "comment": string|null }` > response 200 `{ "phase": int, "currentWorkflowStepIndex": int|null, "currentApprovalLevelOrder": int|null }` ## taskList snapshot | # | Stage | Vai | Trạng thái | |---|---|---|---| | 1 | Đợt-1a: BE SKELETON — interface `IContractSigningPlanWorkflowService.TransitionAsync` + impl throw-stub + DI + endpoint transitions (build xanh, 0 logic) | hmw `implementer-backend` | [x] `wf_ef4d05a8-98c` #53 nhưng sub-md 14KB TRỌN 7 mục — skeleton + rào-FK-547-bằng-vắng-dep + **tự đối-chứng chéo FE 5/5** + bàn giao ctor-CUỐI; 3 quyết lead DUYỆT cả 3, case-insensitive GIỮ. Build 0W/0E + 574/0 giữ (lane đo §4) | | 2 | Đợt-1b: FE panel ×2 app — workflow panel ✓/●/○ + banner đến-lượt-bạn + nút Gửi/Duyệt/Trả/Từ-chối + ô ý kiến (POST theo HỢP-ĐỒNG trên) | hmw `implementer-frontend` | [x] cùng wf #53 — panel land + wiring :324 ×2 app + types cây-workflow-thô (FE tự suy status từ con-trỏ đôi) + GIỮ/BỎ tường minh (BỎ đủ 2 đường cấm); **lead verify: build ×2 + marker `transitions`×3 bundle tươi + SHA-pair 3/3** | | 3 | Đợt-2: test-specialist — **6 test SÀN tên PIN** (spec §③-B) chạy **RED** (skeleton throw) + record RED output | hmw `test-specialist` | [!] `wf_445f7e28-38b` ĐANG CHẠY | | 4 | Đợt-3: BE IMPLEMENT — copy ApproveV2Async:217-394 adapt 3 chỗ (choke-point 2-write-path + KHÔNG port 2 đường sớm + TraLai) + LogSigningPlanTransition KHKK-riêng (CẤM IChangelogService — FK-547) + guard trình + notify Cấp-kế → **6 test GREEN** | hmw `implementer-backend` | [ ] | | 5 | Lead: suite + build ×2 + acceptance sweep | lead | [ ] | | 6 | Reviewer adversarial (transitions = financial/security) | `reviewer` | [ ] | | 7 | Commit + push + cicd | lead + `cicd-monitor` | [ ] | ## Ràng buộc - 🔴 CẤM copy ProposalFeatures (flatten :427-439 phá OR-of-N) — nguồn = ContractWorkflowService. - 🔴 Choke-point helper `ApplyApprovedValuesOnFinalize` gọi CẢ 2 write-path (duyệt-cấp-cuối + admin-override :190-193 gán-qua-biến) + RULE-comment khuôn :356-360. - 🔴 CẤM `IChangelogService.LogWorkflowTransitionAsync` (FK ContractId Cascade → 547 runtime, compiler không chặn). - 🔴 KHÔNG port AllowApproverFinalize/SkipToFinal/CeoApprovalThreshold (anh phán "PHÁ VỠ" S155; W1 đã rào 3 tầng). ## Stages (cập nhật theo tiến độ)