[CLAUDE] Docs: S73 closeout — Mig 54 PE gia de xuat + CCM duyet-done (STATUS/HANDOFF/session-log + review run-trace + agent-memory harvest)

- STATUS/HANDOFF S73: Mig 54 · test 334 · bundle Bv3jUCNo/BWlMBQz6 (Run #313 feature + #314 fix)
- session log 2026-06-18-S73-pe-gia-de-xuat-ccm-done.md
- run-trace runs/2026-06-18-mig54-pe-review (custom-inline review, bu post-hoc) + _ledger 2 row (R1 schema 1/4 + R2 free-text 2/3)
- agent-memory flush 5 sub + reconcile implementer-frontend cwd-misland stray -> canonical

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-18 16:32:41 +07:00
parent 6aa4dcb525
commit e7e99d10f2
11 changed files with 149 additions and 8 deletions

View File

@ -0,0 +1,27 @@
# S73 (2026-06-18) — Mig 54 PE giá đề xuất PRO/CCM + CEO chọn giá chốt + CCM duyệt-done ô-tích
> anh Kiệt FDC spec (Zalo) — go-live so-sánh-giá **thứ Hai 22/06**. em main + 6 sub + 2 review-workflow. State đầy đủ ở `STATUS.md` / `HANDOFF.md` S73; file này = arc + lessons.
## Yêu cầu (3 nhóm — anh Kiệt FDC)
- **① "Giá chào thầu" thêm giá đề xuất NGOÀI giá NCC:** PRO nhập Min/Max + CCM nhập 1 giá → CEO duyệt theo. anh chốt (AskUserQuestion): **CEO CHỌN 1 giá chốt khi duyệt** (bind + lưu trên phiếu).
- **② Cờ gấp PRO đỏ / CCM xanh** — ĐÃ có từ S69 (Mig 53), chỉ verify lại.
- **③ CCM duyệt-done khi gói < ngưỡng CEO-uỷ-quyền.** anh chốt: ĐỔI auto-threshold (S69) **Ô-TÍCH-TAY** (CCM chủ động tích).
## Done (2 commit prod-verified)
- `1d86abc` (feature, cicd **Run #313** PASS) + `6aa4dcb` (FE empty-candidates fix, **Run #314** PASS). Bundle final admin **`Bv3jUCNo`** / user **`BWlMBQz6`**.
- **BE:** Mig 54 `AddPeSuggestedAndApprovedPrice` 5-cột additive-nullable · 2 setter role-gate PRO/CCM (Forbidden fail-closed mirror budget) · ApproveV2 ** opt-in** (`finalizeByCcmDelegation`, gỡ auto S69) + ** bind giá chốt** mọi nhánh DaDuyet (human bắt-buộc-chọn, isSystem-miễn) · DTO +7. Threading 7-layer ( bẫy F1+F2 wire-fail).
- **FE 2 app SHA-mirror:** PeWorkflowPanel (bộ chọn giá + ô tích CCM, FE derive `currentIsFinalApprover` từ approvalFlow) + PeDetailTabs `SuggestedPriceRows` + types +7.
- **Test 306334** (+28: opt-in spec 611 + 10 `PeApprovedPriceFinalizeTests` + 13 `PeSuggestedPriceSetterAuthzTests`).
## Lessons (đáng nhớ)
1. **Workflow schema-force unreliable:** R1 custom-inline `agent({schema})` CHỈ **1/4** lane trả (3/4 fail no-StructuredOutput). R2 **free-text 2/3 PASS** (cùng harness/task). review/verify fan-out dùng **free-text / hmw RUN-TRACE**, KHÔNG ép-schema. (`feedback_workflow_fanout_reliability` updated.)
2. **Governance honesty arc:** anh hỏi "sao ultra-on task lớn ko chạy workflow?" em nhận **lệch mandate auto-Workflow** (spawn-lẻ + em-main BE solo) + chỉ khai khi bị hỏi cam kết **surface-before-deviate** (báo trước khi đi khác chuẩn).
3. **Rủi ro #1 FE empty-candidates = UNREACHABLE:** double-check phát hiện submit-guard `PurchaseEvaluationWorkflowService.cs:194` chặn gửi-duyệt khi `winnerQuoteTotal≤0` phiếu ChoDuyet luôn 1 giá NCC. Fix `length===0` = phòng-thủ thuần + sửa mâu thuẫn UX .
4. **Custom-inline workflow KHÔNG tự-scaffold run-trace** post-hoc `runs/2026-06-18-mig54-pe-review/` (anh chốt "custom OK, miễn ghi MD").
5. **cwd-misland tái diễn:** implementer-frontend (cd fe-user) MEMORY rơi `fe-user/.claude/` em reconcile canonical + xóa stray. Optional `.gitignore` guard defer.
## NEXT (anh/anh Kiệt UAT — go-live thứ Hai)
- **Cấu hình "Ngưỡng giá trị gói CEO"** Workflow Designer (③ ô-tích chỉ hiện khi gói < ngưỡng).
- **Test 3 luồng:** PRO/CCM nhập giá duyệt cuối chọn giá chốt · phiếu < ngưỡng CCM tích duyệt-done.
- **Xác nhận:** CCM (CostControl) NGAY TRƯỚC CEO (logic tự-done giả định vậy).
- "C" (sau duyệt chuyển phiếu đến dự án) chờ anh Kiệt spec form. E-Office update sau.