[CLAUDE] Docs: S162 closeout - cay 4-folder GD ship prod + bookend-close 5 vong/10 vai
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m54s

- Cay 4-folder giai doan duoi tung goi thau (bfc7b79, cicd PASS 5/5 Run #432)
- Bookend-close: H1 PASS_WITH_FLAGS · H2 GATE-FAIL 4 · H24 20 FLAG · trio MIXED
  · ring1 26D/2T · ring2 19D/1T · harness-audit 43D/4T · ctx-audit TRUOT 7 FLAG
- Lead va trong phien: F-01/F-02/F-04 + A1 archive + A2 distill + skill KHKK
  + comment mirror self-ref (SHA-pair 6/6 giu, build x2 EXIT 0)
- MIND-5 = refresh @closeout dau tien (nhip thu 5, theo de ctx-audit)
- STATUS 3 row canonical + dong CURRENT · HANDOFF 6 slot danh so (54)-(59)
- gotcha #85 · error-ledger E-015/E-016 + AS-19/AS-20 · Phase 12 roadmap
- 4 errata khai thang: tally view-stale-count thoi 1 · enum thieu 1 class
  · tong L1 lech 54 B · A2 tren trigger duong-gia (R10)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-30 15:13:18 +07:00
parent bfc7b79f72
commit e5123ff5e1
52 changed files with 2221 additions and 157 deletions

View File

@ -446,6 +446,17 @@ public class PurchaseEvaluation : AuditableEntity
- Drop legacy V1 sau khi không còn phiếu pin → drop tables WorkflowDefinitions/Steps/Approvers + drop deprecated columns RejectedAtStepIndex/RejectedFromPhase
- Test Domain ApproveV2Async + match logic (defer khi có sample data UAT)
## 🆕 Nhánh KHKK — "Kế hoạch ký kết Hợp đồng" (GĐ2, Mig 69 @S161)
> 🔴 **Vá @S162 (`ring1-audit` thách-CLEAN THỦNG):** skill này tự khai lãnh-địa *"state machine + versioned WF"* và frontmatter nhận routing *"mã HĐ sai format" · "versioned workflow" · "chuyển phase hợp đồng"* — nhưng S161 đẻ **nguyên một máy workflow mới** nằm đúng trong lãnh-địa đó mà skill **0 hit** ⇒ người tra bị dẫn vào đây rồi **đọc nhầm luật RG-001 / 9-phase**. B1: mô-tả MÁY + trỏ FILE, **KHÔNG chép số**.
- **Máy riêng, KHÔNG phải 9-phase HĐ:** `Domain/Contracts/ContractSigningPlanPhase.cs`**5 phase** (Nháp · Chờ duyệt · Trả lại · Từ chối · Đã duyệt), chạy trên **workflow V2 `ApplicableType=10`** (`ContractSigningPlan`), tách hẳn `ApplicableType=3` của HĐ.
- **Codegen KHÁC RG-001:** mã phiếu KHKK = `KHKK/{YYYY}/{Seq:D3}` (owner chốt @S161, **bỏ token loại "MB"**). RG-001 chỉ áp cho **mã Hợp đồng**; đừng đem format HĐ đi debug mã KHKK và ngược lại.
- **Service:** `Application/.../IContractSigningPlanWorkflowService.cs` + impl — duyệt V2 3 trạm (PRO/CCM/CEO) qua `ApprovalWorkflowLevel`, UPSERT `LevelOpinions` như PE/Contract V2.
- **GĐ4 "Hợp đồng cứng" = 1-MỐC** (owner chốt @S161): form điền đủ → duyệt nếu có → upload bản cứng = **xong**; **0 enum-extend**, chỉ badge `hasSealedCopy`. Đừng thêm phase mới cho nó.
- **Cây 4-folder GĐ (S162, FE):** `fe-{user,admin}/src/hooks/usePipelineStages.ts` nối GĐ1→4 theo `khkk.purchaseEvaluationId` · `pe.contractId` · `hasSealedCopy`. Gate quyền GĐ2 dùng **đúng key policy** `KeHoachKyKet` — xem gotcha **#85**.
- **Còn nợ:** cầu KHKK→HĐ (W5) chưa làm ⇒ `pe.contractId` là đường duy nhất tới GĐ3, và phiếu **liên-danh N-HĐ chỉ nối được HĐ[0]** (`CreateContractFromEvaluationFeatures.cs:145`).
## Tier 4+ (còn thiếu / future)
- [ ] Warning notification 20% SLA (`SlaWarningSent` flag đã có)