Files
solution-erp/.claude/workflows/runs/2026-07-13-pe-negative-quote/run.md
2026-07-13 16:11:50 +07:00

2.7 KiB
Raw Blame History

Run-trace: PE negative-quote feature (2026-07-13, S116)

Đề bài (owner anh Kiệt, Zalo ⇄ Duy Nguyen 2026-07-13): Cho nhập SỐ ÂM ô "Số tiền báo giá cho hạng mục" (React state form.thanhTien, Quote per hạng mục) trong dialog "Thêm NCC vào phiếu" module PE. Rule chốt: số âm = khoản trừ/phát-sinh-giảm của NCC (do có làm trước); NGÂN SÁCH GIỮ NGUYÊN — âm KHÔNG cộng/trừ vào ngân sách dự án.

Pipeline anh chỉ định: /fable-clone invest+review/fable-real review → hmw Opus 4.8 MAX → commit + deploy.

Stages

  • Stage 1 — invest (fable-clone ensemble, 4× investigator-codebase) → DONE 4/4 clean 0-garble (wf_eaf52972-d18, ~11', 516K tok). Kết luận: FE-ONLY (BE+DB đã nhận âm; ngân-sách bất-biến bằng kiến-trúc). Spec spec-pe-negative-quote-13-07-2026.md ghi xong.
  • gate — anh Kiệt CHỐT: R1 = CHO HĐ âm (no-op) · R2 = NỚI guard Sum()<=0All(==0) (anh hỏi lại: 1-NCC-âm phải gửi được, mâu thuẫn R1 → refine). Implement = FE + 1 điều-kiện BE guard + test.
  • [!] Stage 2 — review (fable-clone ensemble, 3× reviewer)
  • Stage 3 — review (fable-real, reviewer deep-pass)
  • gate — owner-decisions (nếu invest/review lòi ra)
  • Stage 4 — implement (hmw Opus 4.8 MAX)
  • Stage 5 — verify (test-before "ngân sách giữ nguyên" + build 2-app)
  • Stage 6 — commit + deploy

Grounding (em-main scout)

  • FE PeDetailTabs.tsx:2361-2378 (fe-user; mirror fe-admin): field form.thanhTien, input qua parseVnd/formatVndInput (nghi strip -), helper "Để trống/0 → chưa báo giá. Sửa sau bằng click số tiền trong bảng." → còn edit ở EditSupplierDialog:2386 + inline cell.
  • BE validators non-neg: PeSuggestedPriceFeatures (Min/Max/CcmPrice >=0), PeWorkItemBudgetFeatures (budget >=0), PurchaseEvaluationFeatures (BudgetPeriodAmount/ApprovedPriceAmount >=0). Precedent PurchaseEvaluationFeatures.cs:348 "mirror LeaveBalance cho phép số dư âm".
  • State Mig 65 · 89 bảng · 486 test · gotcha 81. S114: Quote.IsSelected per-hạng-mục · winnerQuoteTotal=SUM(selected) · ngưỡng CCM · giaTri(single=bid) · gotcha #81.

Lanes (Stage 1) — same role investigator-codebase, 4 lens

  1. FE-surface · 2. BE-surface · 3. Budget-consumers · 4. Edge-precedent-tests

wf run-id

  • Stage 1 invest: wf_eaf52972-d18 (task wslm7eymc) — 4 lane investigator-codebase, DONE 4/4 clean, HMW-ON, lead Opus 4.8
  • Stage 2 review: wf_4824f158-b66 (task wjhpvoyum) — 3 lane reviewer (correctness-wire · mirror-completeness · financial-invariant-owner)