Commit Graph

597 Commits

Author SHA1 Message Date
e81e87ff9f [CLAUDE] Auth: user tự đổi mật khẩu (self-service change-password) — BE + 2 FE + test
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m10s
Go-live request anh Kiệt FDC (Zalo "user chưa tự đổi pass được hả em"): trước đây chỉ admin
Reset hộ (POST users/{id}/reset-password), user KHÔNG tự đổi được. Thêm self-service:

- BE: ChangePasswordCommand + POST /api/auth/change-password ([Authorize]). Lấy user qua
  ICurrentUser.UserId; UserManager.ChangePasswordAsync verify mật khẩu HIỆN TẠI; sai →
  ValidationException field CurrentPassword "Mật khẩu hiện tại không đúng."; rule mật khẩu mới
  ≥ 12 + khác mật khẩu cũ (validator); sau đổi vô hiệu refresh token (mirror ResetPassword).
  Qualify SolutionErp...ValidationException (tránh CS0104 clash với FluentValidation).
- FE 2 app (SHA-mirror): ChangePasswordDialog (3 ô current/new/confirm + validate client:
  ≥12, khớp, khác cũ) wire vào menu tài khoản TopBar — "Đổi mật khẩu" trên "Đăng xuất".
- Test: +ChangePasswordCommandTests (đúng/sai pass cũ keyed-field + msg, <12 boundary, ==cũ,
  chưa-auth/UserId-null/user-not-found, RefreshToken cleared). Full suite 431 PASS (45D + 386I).

Build: BE 0 warn/0 err · fe-user + fe-admin build OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 12:27:52 +07:00
55494ad477 [CLAUDE] Infra: gate SeedDemoMasterData sau DemoSeed:Disabled (chống resurrect NCC demo go-live)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m10s
Sau wipe 18 NCC demo (scripts/s91-wipe-golive.sql, go-live anh Kiệt FDC 26/06), phát hiện
SeedDemoMasterDataAsync chạy UNGATED + per-code idempotent (skip-if-code-exists else Add) ->
mỗi restart / IIS recycle TỰ ADD lại 18 NCC demo (NCC-VLXD / CDT-VIN / Sun Group ...) ->
undo danh sách NCC sạch anh Kiệt vừa chốt.

Fix: gate SeedDemoMasterDataAsync (Supplier + Project DEMO) sau cờ DemoSeed:Disabled, mirror
cách Contracts/PE/Workflow demo đã gated. Prod hiệu lực Disabled=true (appsettings.json deployed;
appsettings.Production.json render từ .example KHÔNG có DemoSeed -> fallback appsettings.json=true,
đúng fallback đã giữ contracts/PE gated nhiều tháng). -> SKIP -> wipe BỀN qua restart. Dev
Disabled=false -> vẫn seed demo local. Master data THẬT (SeedRealMasterDataAsync: 62 dự án + 71
hạng mục + 3 NCC) ungated -> KHÔNG ảnh hưởng.

User test (38) đã an toàn từ S89 (gỡ khỏi mảng SeedDemoUsers). Build slnx OK 0 warn / 0 err.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 10:53:25 +07:00
ba42c59430 [CLAUDE] Scripts: S91 go-live wipe data UAT (prod-executed 26/06)
anh Kiệt FDC chỉ đạo "xóa data cũ" trước go-live Phase-01 (PRO+CCM) hôm nay 26/06.
Quy trình destructive-prod chuẩn S85/S89: recon -> AskUserQuestion chốt scope ->
backup -> wipe atomic (XACT_ABORT + 2 guard) -> verify exact.

Đã chạy prod (.\SQLEXPRESS / SolutionErp); backup SolutionErp_S91_pregolivewipe.bak (2705 pages):
- Xóa: 16 PE (+cascade child Suppliers/Quotes/Attachments/Changelogs -> 0) · 16 PeWorkItemBudgets
       · 94 Notifications · 19 NCC demo (CreatedAt < 2026-06-01)
- Giữ: 7 NCC thật (06-09 x3 + 06-23 x4) · 70 Projects · 71 WorkItems · 17 Users · 8 Workflows
- Reset PeSeq -> phiếu thật đầu tiên = PE/2026/A/001
- Guard A: PE > 16 -> ABORT (chống xóa phiếu thật mới tạo sau recon, go-live day)
- Guard B: NCC demo deleted <> 19 -> ROLLBACK toàn bộ

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 10:21:12 +07:00
159b69da90 [CLAUDE] Docs: guide Duyệt NCC bỏ "Từ chối" + fix 12 caption "Hinh"→"Hình" (go-live 26/06)
App gỡ nút "Từ chối" từ S60 (Khu vực Quyết định chỉ còn Duyệt/Trả lại) nhưng guide
phát toàn công ty (đính kèm email go-live anh Kiệt 26/06) vẫn ghi "Từ chối" 2 chỗ:
- Bước 4 (thân bài): bỏ ' / "Từ chối"'
- Caption Hình 9: "Duyệt / Trả lại / Từ chối" -> "Duyệt / Trả lại" (caption mâu thuẫn với ảnh)
+ Sửa 12 caption "Hinh N." -> "Hình N." (thiếu dấu từ S90 ASCII-gen, gotcha #30/#61 họ hàng).

Sửa qua unpack -> edit XML -> repack (giữ nguyên 13 ảnh: 1 logo + 12 màn).
Pack --validate false (validator dính bug cp1252 đọc UTF-8 VN, kể cả numbering.xml không sửa).
Verify độc-lập python-docx: 'Từ chối'=0, caption=12, media=13, open-strict OK.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:49:57 +07:00
6a2435f027 [CLAUDE] Docs: chèn 12 ảnh khoanh-đỏ vào guide Word Duyệt NCC (em chụp prod) + gotcha #74 + closeout S90
- 12 ảnh prod khoanh-đỏ 1→2→3 vào docs/Huong-dan-Duyet-NCC.docx
  pipeline tự-chế: PowerShell CopyFromScreen + Win32 lọc-process-chrome.exe
  + DOM overlay element-based + python-docx (MCP save_to_disk KHÔNG ra file env này)
- gotcha #74 (chụp-prod-vào-docx) + STATUS/HANDOFF S90 + session log
- 0 production code, 0 prod mutation (xem-only), em-main solo

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 19:09:28 +07:00
946c5b21ae [CLAUDE] Docs: S89 closeout — PE visibility/finalize + user-cleanup + Word guide
- STATUS/HANDOFF: prepend S89 (demote S88); state Mig 59 · 422 test · prod 17 user
- session log 2026-06-25-S89 (D1 draft-privacy IDOR · D2 CCM suggested-price !readOnly · D3 finalize-note 3-surface + flow badge + matrix flag · prod user-delete · Word guide)
- docs/Huong-dan-Duyet-NCC.docx (skill docx — logo Solution, 8 sections, khoanh-do 1->2->3; real screenshots pending anh)
- harvest residual workflow-sub agent-memory (cicd / investigator-codebase / reviewer + 2 plan-reviews)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 17:05:49 +07:00
681b1edc7e [CLAUDE] Infra · Scripts: xóa hết User test khỏi prod (38) + gỡ seed — chỉ giữ 17 User Solutions thật
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m51s
anh Kiệt FDC: "Xóa hết các User test ko liên quan, lấy User Solution thật vào".
Recon prod: 55 user → GIỮ 17 (admin + 16 real) → XÓA 38 (37 test rõ + 1 typo
chuong.phan@solution.com.vn — anh chốt xóa, anh Chương dùng bản @solutions).
An toàn FK: KHÔNG user test nào là ApproverUserId (NO_ACTION không bị chặn — recon verified);
5 bảng con CASCADE (EmployeeProfiles/UserRoles/Claims/Logins/Tokens); nv.test 1 PE loose-Guid xóa kèm.

- DbInitializer: gỡ 16 user mẫu khỏi SeedDemoUsersAsync + gỡ LockDemoSampleUsersAsync (call+method).
  Seed giờ chỉ tạo/reconcile 17 user thật. SeedItDepartmentStaff + sample-workflow seeds null-guard
  (skip user đã xóa) → deploy KHÔNG resurrect/crash. ⚠ PHẢI deploy để binary mới không tái tạo test.
- scripts/s89-delete-test-users.sql: whitelist-keep 17 + BACKUP + XACT_ABORT + count-guard[30,45].
  ĐÃ CHẠY prod (backup SolutionErp_S89_preuserdelete.bak): count=38, PE=1, còn đúng 17 user. Build slnx xanh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 16:25:00 +07:00
fef4c33527 [CLAUDE] FE-User: workflow-matrix view — thêm flag thứ 8 "Duyệt là KẾT THÚC quy trình" (thiếu từ Mig 58)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m1s
WorkflowMatrixViewPage (màn "Luồng duyệt" read-only của user, build S24 với 7 flag) thiếu flag
thứ 8 allowApproverFinalize ("Duyệt là KẾT THÚC quy trình, không trình tiếp CEO") thêm ở Mig 58
(S87) → matrix "chưa hiển thị chính xác" QT-DN-V2-001 (anh Kiệt FDC). BE overview DTO đã gửi sẵn
field này (ApprovalWorkflowV2AdminFeatures.cs:41/188), chỉ FE matrix + AwLevelDto type thiếu.

Thêm allowApproverFinalize vào AwLevelDto + FlagRow thứ 8 (colSpan2, mirror admin Designer).
FE-user only (matrix là view user-app, không có bản fe-admin). Build xanh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 15:45:28 +07:00
9c920ad4c3 [CLAUDE] FE-User · FE-Admin: PE flow sơ-đồ — badge "Duyệt thay CEO" trên cấp finalize + làm mờ Bước CEO "không trình tới"
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m2s
Trong khối "Quy trình duyệt" của phiếu (PeWorkflowPanel, sơ đồ Bước→Cấp→NV), cấp được cấu hình
AllowApproverFinalize (Mig 58) giờ hiện badge tím "⚑ Duyệt thay CEO" + tooltip; các Bước/Cấp SAU
cấp finalize (vd Ban Giám đốc / CEO) làm mờ + nhãn "không trình tới" → người xem phiếu biết NGAY
trong sơ đồ rằng quy trình DỪNG ở cấp này (duyệt thay CEO), không lên CEO (anh Kiệt FDC).

Dùng field allowApproverFinalize đã expose ở flow-level (S89 #3). first-reachable theo Step.Order→
Level.Order (khớp BE finalize). Bổ sung cho callout note (#3) = chỉ-dẫn trong chính sơ đồ flow.
FE-only, 2 app SHA-mirror, build xanh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 15:32:34 +07:00
f0bca7737c [CLAUDE] PurchaseEvaluation · FE-User · FE-Admin · Tests: PE note "Duyệt là KẾT THÚC quy trình (không trình CEO)" — 3 surface
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m58s
Phiếu mà quy trình duyệt có cấp bật AllowApproverFinalize (Mig 58) sẽ kết thúc tại cấp đó,
KHÔNG trình CEO. Hiển thị note cho MỌI NGƯỜI NẮM ở 3 surface (anh Kiệt FDC). KHÔNG migration
(cột AllowApproverFinalize đã có Mig 58, prod ở Mig 59).

BE (3 file, computed DTO):
- PurchaseEvaluationDtos.cs: +bool EndsBeforeCeo +string? FinalizeStepName +string? FinalizeLevelName
  trên DetailBundle + ListItem; flow-level +bool AllowApproverFinalize.
- PurchaseEvaluationFeatures.cs: detail compute first-reachable (Step.Order↑→Level.Order↑, dept-name
  in-memory); list + inbox projection qua 3 subquery EF-safe (lv.Step!.Name). V1 (workflowId==null) → false.
- CreateContractFromEvaluationFeatures.cs: ListApproved projection cùng DTO → +3 subquery y hệt.

FE 2-app (fe-user + fe-admin SHA-mirror component):
- PeFinalizeChip.tsx (MỚI, chip tím) ở 3 danh sách: PeListPanel + PurchaseEvaluationsListPage (cây) + InboxPage.
- PeWorkflowPanel.tsx: note callout trong phiếu, branch DaDuyet (past-tense) / đang-chạy; copy boundary-aware
  "...là KẾT THÚC, không trình CEO. Các cấp trước vẫn duyệt như thường." (tránh cấp giữa hiểu nhầm).
- UserDashboardPage.tsx (chỉ fe-user): dải "Phiếu Duyệt NCC gần đây" + chip (admin dashboard để nguyên).
- types: PeListItem/PeDetailBundle/PeApprovalFlowLevel +field.

Tests: +PeFinalizeProjectionTests (EF-translate smoke 3 subquery + first-reachable + V1-false). Full suite 421→422.
em-main self-gate sau workflow (impl-frontend return rỗng #53 → mirror fe-admin + verify 5 site recover-disk).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 14:58:54 +07:00
a71753bde8 [CLAUDE] PurchaseEvaluation · Tests: phiếu nháp riêng tư người tạo (chặn leak role + V2-approver)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m56s
Màn hình CEO ở "chỗ thao tác" hiện bản nháp / phiếu chưa xong của NGƯỜI KHÁC (anh Kiệt
FDC). Phiếu nháp (DangSoanThao) lộ qua 2 đường: cond #2 role-eligible (Drafter/DeptManager
→ DangSoanThao, mọi Drafter thấy nháp nhau) + cond #3 V2-approver (workflow pin lúc TẠO
phiếu nên approver như CEO thấy mọi nháp trước khi gửi duyệt = leak chính).

Luật mới: nháp = RIÊNG TƯ người tạo (DrafterUserId) + Admin thấy hết. 4 chỗ:
- GetEligiblePhases: bỏ DangSoanThao khỏi role-eligible (cond #2).
- Inbox (mảng admin): bỏ DangSoanThao — nháp khỏi Inbox hẳn kể cả admin (anh Kiệt chốt).
- List query cond #3: guard != DangSoanThao (approver không thấy nháp).
- Detail authz: guard != DangSoanThao cho V2-approver (không mở nháp người khác bằng link).
Phiếu ĐÃ gửi duyệt giữ nguyên (approver vẫn thấy). Phần admin-screen tinh chỉnh sâu để sau.

+PeDraftVisibilityTests (2 test, test-before security): owner thấy nháp mình · drafter khác
không · CEO/V2-approver không · admin thấy hết · phiếu đã gửi vẫn hiện (no regression).
Full suite 419→421 PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 14:39:26 +07:00
f7bd97a83d [CLAUDE] FE-User · FE-Admin: PE giá đề xuất PRO/CCM editable theo role (gỡ !readOnly over-gate)
Ô "Giá đề xuất (PRO/CCM)" trong SuggestedPriceRows bị khoá thừa tầng !readOnly mà ô
ngân sách song song (editable={bs.canEditCcm}) không có. Hệ quả: CCM (role CostControl)
không nhập được giá đề xuất khi xem phiếu ở view readOnly=true (preview danh sách, hoặc
màn Duyệt chưa tới lượt mình) — đúng báo cáo anh Kiệt FDC "PRO oki nhưng CCM không nhập".

Gỡ !readOnly, gate thuần theo role-capability (ev.canEdit{Pro,Ccm}SuggestedPrice do BE
tính). BE setter vẫn fail-closed theo role (ForbiddenException) nên gỡ gate FE = an toàn,
khớp hành vi ô ngân sách + intent handler "KHÔNG ràng Phase, chỉnh như tài liệu sống".
Bỏ luôn prop readOnly không dùng khỏi signature + call-site. 2 app SHA-mirror, build xanh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 14:39:08 +07:00
d085436e49 [CLAUDE] Skill · Docs: fix iis-deploy-runbook stale paths + S88 web.config closeout
iis-deploy-runbook SKILL corrected (discovered during the index.html-hardening task):
- physical paths apps\SolutionErp\{Api,Admin,User} were STALE (empty dir) -> real
  solution-erp\{api,fe-admin,fe-user} (verified via appcmd list site).
- web.config rule list fixed to the ACTUAL live config (HTTP->HTTPS + SPA-Routes excl
  /api + .webmanifest + 3 security headers; NO /api|/hubs ARR proxy -- FE calls api via CORS)
  + documented the S88 cache hardening (index.html no-cache, assets immutable).
- log/appsettings/scp/backup paths swept to the real base.
Session log: index.html no-cache hardening DONE (ca136d8) + lesson reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 11:42:23 +07:00
ca136d8e2e [CLAUDE] FE-User · FE-Admin: web.config — index.html no-cache + assets immutable
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m54s
S88 white-screen-incident hardening. An open tab could serve a stale index.html across
a deploy (IIS served index.html cacheable: only ETag/Last-Modified, no Cache-Control).
Add version-controlled web.config to fe-*/public (Vite -> dist -> deploy Copy-Item
overwrites the previously manually-managed server file):
- root staticContent clientCache=DisableCache -> Cache-Control: no-cache for the SPA
  shell (index.html served at / and via SPA-rewrite for /dashboard etc.) = always revalidate.
- <location path="assets"> UseMaxAge 365d + custom immutable -> hashed assets cached 1y.
Replicates the EXACT live rules (HTTP->HTTPS, SPA-Routes rewrite excl /api, .webmanifest
mime, 3 security headers) so routing is preserved. Applied + verified on live before commit
(index.html no-cache; asset immutable,max-age; / /dashboard /login 200; http->https 301).
api = .NET API (no SPA index.html) -> N/A.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 11:33:57 +07:00
723e664df1 [CLAUDE] Docs: S88 addenda — white-screen incident (transient/cache, deploy-healthy) + Block B table-align + index.html no-cache finding
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 11:22:38 +07:00
3f9dc329bc [CLAUDE] FE-User · FE-Admin: PE Block B budget — align Section A/B columns (table-fixed)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m59s
Anh Kiet: 2 bang "TONG HOP NGAN SACH TRINH KY" (A. NGAN SACH / B. THUC HIEN) lech cot
Du an/PRO/CCM giua 2 section. Root: A dung w-40 cho PRO/CCM, B dung w-44, ca 2 auto-layout
-> cot khong thang hang. Fix: ca 2 table -> table-fixed + cung widths (Du an w-20 · PRO
w-44 · CCM w-44) -> cot A va B thang hang 1 luoi.

FE-only, 2-app SHA-identical (93a4e8a1), both builds PASS. No BE/test/migration change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 11:21:42 +07:00
6bfe3db5e2 [CLAUDE] Docs: S88 closeout — PE stability audit + D1/D2 prod-verified
STATUS/HANDOFF S88 prepend (State THAT: Mig 59 · 88 bang · 419 test (45D+374I) ·
gotcha 73 · bundle admin BQq2eTP6/user dHa64I59) + session log + agent-memory
harvest (6 sub: cicd/impl-backend/impl-frontend/inv-codebase/reviewer/test-spec).

D1/D2 production already shipped: 73cce1f (Run #347 PASS, +11 test, the 6 fixes) +
1aa3bdb (Run success, +6 test, create-contract 1->N + list winner names). Both
prod-verified (bundle rotation + Gitea run=success; cicd-monitor verdict truncated
#53 -> curl-self-verify).

Curate-debt: test-specialist L1 34.8KB OVER-SOFT (root-caused #53 x3 this session)
DEFERRED next session as #1 NEXT-em (proper byte-exact L1->L2 + _INDEX, not rushed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 10:58:15 +07:00
1aa3bdb591 [CLAUDE] PurchaseEvaluation: D2 multi-winner outward — create-contract 1→N per winner + list-card winner names
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m10s
Completes the Mig 58 multi-winner (>=2 cung trung) wiring — the audit's joint-winner
dead-ends, CEO-approved scope ("1 HD per winner"):
- create-contract 1->N: one draft HD per IsWinner supplier (was 409 dead-end for >=2).
  Command -> List<Guid>. ContractCodeGenerator self-commits its sequence per call, so
  gen all N codes first (contracts built local) then atomic add + single final
  SaveChanges (no partial create on failure). GiaTri: single = details ThanhTienNganSach
  sum (legacy preserved); >=2 = per-winner quote total (DangSoanThao draft, editable —
  anh Kiet UAT the basis). pe.ContractId = first (idempotency). Controller -> {contractIds}.
- list-card winner names: PurchaseEvaluationListItemDto +WinnerSupplierNames (EF
  collection subquery over IsWinner suppliers; translates + runs on SQLite — test-verified).
  FE PeListPanel shows joined names for >=2 (was blank). Dialog -> contractIds[] + "Da tao N HD".

Tests 413 -> 419 (+6: multi-contract 5 [per-winner GiaTri 140/260 vs single legacy 800,
idempotency, 0-winner, not-DaDuyet] + EF-subquery translation smoke). Full suite GREEN.
FE 2-app SHA-identical. reviewer PASS (codegen-sequencing, positional-record arg-order,
no-partial-create all independently verified).

UAT (anh Kiet): open a >=2-winner phieu -> "Tao HD" creates N draft contracts (1/winner);
confirm per-winner contract GiaTri (quote total) is the wanted basis.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 10:30:14 +07:00
73cce1f027 [CLAUDE] PurchaseEvaluation: D1 stability fixes — Block B multi-winner financials + CEO-notify persist + HoSoLink preserve + #70 guard + setter relocate
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m4s
PE stability audit (frozen CEO-approved spec) — D1 behavior-preserving fixes plus
one approved joint-winner financial correction:
- Block B "Gia tri ky nay" + cross-PE peer rollup re-keyed SelectedSupplierId -> IsWinner
  (reported 0 / excluded peers for >=2 joint winners; now matches winnerQuoteTotal).
- CEO-notify-on-urgent: +SaveChanges after NotifyManyAsync (Director notify was added
  after the only flush -> never persisted; now persists + SignalR push fires).
- HoSoLink: UpdatePeDraft null-safe + clear-via-empty (header edit no longer wipes a
  set link; HoSoLinkRow sends "" to clear; header forms omit = preserve).
- #70 stale-echo guard added to PRO budget row3/row8 (|| peFetching).
- Relocate SetPeCcmBudgetPeriodCommand -> PeWorkItemBudgetFeatures (was misplaced in
  PeSuggestedPriceFeatures). DTO/comment cleanups.

Tests 402 -> 413 (+11: HoSoLink preserve/clear/set, Block B >=2-winner, CEO-notify
persist x6). Full suite GREEN. FE 2-app SHA-identical. test-specialist + reviewer
returns truncated (#53, over-budget MEMORY) -> em-main self-gate from disk + suite run.

D2 deferred (create-contract 1-HD-per-winner + list-card winner names) — needs focused
care + anh Kiet UAT on per-winner contract value.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 09:54:04 +07:00
e939fab50a [CLAUDE] Memory: sleep-compress L2 test-specialist — activity-s51-s52.gist.md additive
/sleep-recovery-memory-l2 all (S88). Phase 0 scan: 18/19 L2 verbatim SKIP
(14x 2026-05-qN.md already in aggregate 2026-05.gist.md gen:1, verified by
reading source-decl; 4x 2026-06.md double-distill guard gen 1-2; 5 subs
empty archive). 1 distilled: test-specialist activity-s51-s52.md (gen-0
orphan, no gist) -> activity-s51-s52.gist.md (distill-gen:1), 4 records ->
3 clusters (C-A merges the 2 gotcha#57 episodes).

reviewer Fidelity-gate FAIL v1 -> re-distill: C-A merge had mis-attributed
the whole fix to "Mig 45"; verbatim ties Mig 45 to HRM-only (LeaveTypes/
ShiftPatterns), Master (Dept/Project/Supplier) = Mig 47 per canonical
CLAUDE.md. Split per-episode -> PASS. coverage-diff 26/26, G-009 clean,
ratio 97% (signal-dense, report-not-target). last_sleep_at -> 2026-06-25.

+reviewer self-harvest: merge-distill false-specificity anti-pattern
(presence-gate blind to cross-episode shared-token mis-attribution).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 08:35:26 +07:00
56b57d330a [CLAUDE] Docs: S87+ cicd #346 PASS — layout "Thông tin chọn thầu" bundle flush
cicd Run #346 (0d3c0cf, FE-only PE layout tách khối nổi bật "4. Thông tin chọn
thầu") PASS ~5m: test gate 402 unchanged, no migration (Mig 59 HEAD), both
bundles rotated admin C8lWxEQK->BABhPh2s / user Kz5cSW2u->DLulO6uP (js+css),
smoke 3x200. STATUS/HANDOFF bundle flushed + UAT note. Docs-only -> CI skip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 17:19:02 +07:00
0d3c0cf16b [CLAUDE] PurchaseEvaluation: tách khối nổi bật "4. Thông tin chọn thầu" (anh Kiệt FDC)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m7s
Tách c/d/e (Giá chào thầu + Đề xuất PRO/CCM + Bảng so sánh + Link hồ sơ) khỏi
Section 3 thành khối NỔI BẬT riêng "4. Thông tin chọn thầu" — header xanh #1F7DC1
giống bảng ngân sách "giá trị thực hiện". Đánh số lại 1->5:
- 1. Tên NCC/TP + Giá trị (chào thầu): winner "mang từ trên xuống", hiển-thị nổi bật
  (Section 3 giữ ô CHỌN NccSelectorRow; multi-winner -> tên cách dấu phẩy)
- 2-3. Giá đề xuất PRO/CCM (SuggestedPriceRows) · 4. Bảng so sánh giá · 5. Link hồ sơ
- Ý kiến cấp duyệt: Section 4 -> 5.
FE-only (PeDetailTabs ChonNccSection + new ThongTinChonThauSection), 2 app SHA-mirror,
build sạch. Mockup anh Kiệt duyệt trước khi build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 17:09:07 +07:00
8cf4a58c8c [CLAUDE] Docs: S87 cicd #345 PASS — Section B bundle rotate + flush final hashes
cicd-monitor Run #345 (9b1ee0c Section B 3-col, Mig 59) PASS ~4m: test gate 402,
Mig 59 applied prod (CcmBudgetPeriodAmount decimal(18,2) NULL, 0-row no-backfill
as designed), PATCH /budget/ccm-period 401 wired, both bundles rotated admin
CXCKlNay->C8lWxEQK / user Di40ewrF->Kz5cSW2u (js+css). sys.tables direct-count=88.
STATUS/HANDOFF bundle hashes flushed to #345 final. Docs-only -> CI skip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 16:15:38 +07:00
121f5cc128 [CLAUDE] Docs: S87 closeout — PE multi-winner + budget=0 + cấp-KẾT-THÚC (Mig 58) + Section B 3-cột (Mig 59)
STATUS + HANDOFF S87 narrative + count flush (Migrations 57->59, test 377->402,
gotcha 73 unchanged) + session log 2026-06-24-S87 + agent-memory harvest
(cicd-monitor #344 / implementer-backend / investigator-codebase / reviewer /
test-specialist — spawn-record on-disk).

State THẬT: Mig 59 · 88 bảng (cicd flag 89 drift, re-ground monthly) · 402 test
(45D+357I) · gotcha 73 · menu 54 · bundle admin CXCKlNay/user Di40ewrF
(Run #344; #345 cicd-verifying Section B). Docs-only -> CI skip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 16:14:54 +07:00
9b1ee0c3a5 [CLAUDE] PurchaseEvaluation: Section B (THỰC HIỆN) tách 3 cột per-cột kỳ-này (Mig 59, anh Kiệt FDC / CCM)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m8s
Section B "Tổng hợp ngân sách trình ký" tách 3 cột Dự án|PRO|CCM giống Section A —
mỗi cột nhập "NS kỳ này" RIÊNG + tính thực-hiện độc-lập (lũy-kế / còn-lại / % /
so-sánh) theo ngân-sách-full của cột đó:
- PRO: budgetPeriodAmount (có sẵn) đối chiếu proFull
- CCM: ccmBudgetPeriodAmount (MỚI, Mig 59) đối chiếu ccmFull — CCM nhập (canEditCcm)
- Dự án: — (chưa wire, như A)
Số thực-tế dùng chung mọi cột (NCC đề xuất, lũy kế lịch sử). Submit-guard giữ trên
budgetPeriodAmount (không đụng).

Mig 59 AddCcmBudgetPeriodToPurchaseEvaluation (1 cột nullable, no backfill). NEW
endpoint PATCH /budget/ccm-period role-gate Admin|CostControl (fail-closed). FE
Section B rewrite <BudgetRow> list -> <table> 3 cột (colCalc per-cột), 2 app SHA-mirror.
Test 395->402 (+7 authz setter). Build sạch BE + 2 FE. Workflow wf_aafb18fe-d9d
(BE->FE->test + 3-lane review: math PASS, authz PASS, mirror self-gated identical).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 16:06:59 +07:00
f1b10e9c33 [CLAUDE] PurchaseEvaluation: CCM 3-fix — multi-winner sum + budget=0 hợp lệ + cấp KẾT THÚC quy trình (Mig 58, anh Kiệt FDC)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m10s
CCM (Lưu Trần / anh Kiệt FDC) — làm 3/4 mục (mục 3 "CCM sửa ngân sách" để riêng):

1. Multi-winner: chọn NHIỀU NTP/NCC/ĐVDV cùng trúng → winnerQuoteTotal = SUM
   ThanhTien MỌI đơn vị isWinner (vd 3 ông 37.8+9+10 = 56.8tr). Cột mới
   PurchaseEvaluationSupplier.IsWinner (Mig 58, backfill từ SelectedSupplierId).
   SelectWinner → multi-toggle SupplierIds[]. FE: bảng so sánh tick nhiều ô +
   dòng "Tổng chi phí đã chọn"; mọi guard/checklist/computeGiaChaoThau/tạo-HĐ
   đổi sang isWinner (selectedSupplierId = null khi liên-danh ≥2).

2. Ngân sách = 0 hợp lệ: nới submit-guard + 3 validator (chỉ chặn khi NULL,
   số 0 cố ý đi qua; fallback ProInitial chỉ khi null). Mirror BE + FE.

3. Cấp KẾT THÚC quy trình: ApprovalWorkflowLevel.AllowApproverFinalize (Mig 58)
   — admin bật per-cấp trong Workflow Designer; duyệt tới cấp đó TỰ DaDuyet,
   bỏ qua CEO (AUTO theo cấu hình quy trình, không ô-tích runtime — anh Kiệt
   chốt). FE: banner cảnh báo + bắt chọn giá chốt.

Mig 58 AddPeMultiWinnerAndLevelFinalize (2 AddColumn bool + backfill IsWinner,
additive/reversible). Test 377→395 (+PeMultiWinnerTests +PeApproverFinalizeTests
+budget=0; auto-model gọn bớt 2 test bypass/opt-out). FE 2 app SHA-mirror.
Build sạch BE + 2 FE local.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:22:35 +07:00
ae4f106fd7 [CLAUDE] PurchaseEvaluation: notify "cần duyệt" loại người tạo phiếu (anh Kiệt FDC UAT)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m57s
Người TẠO phiếu (drafter) không còn nhận chuông "Phiếu cần bạn duyệt" cho
phiếu mình tạo — kể cả khi được cấu hình làm approver ở một Cấp. Chỉ approver
KHÁC người tạo ở Cấp hiện tại mới nhận. Drafter vẫn nhận chuông KẾT-QUẢ
(đã duyệt / trả lại) như cũ (block :1060 giữ nguyên).

- PurchaseEvaluationWorkflowService.LogTransitionAsync: thêm filter
  `l.ApproverUserId != evaluation.DrafterUserId` (in-memory LINQ, nullable-safe).
- test-specialist: +3 regression PeApproverNotifyExcludesDrafterTests
  (drafter-excluded · co-approver-vẫn-nhận · result-notify-intact; RED-on-old
  đã chứng minh). Test 374 -> 377.
- docs/STATUS.md: re-ground canonical (S85-closeout sót: test 356->377,
  gotcha 71->73, bundle #341) + dòng S86 +3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:37:22 +07:00
de2d1fab64 [CLAUDE] Docs: cicd-monitor harvest — Run #342 PASS verdict + refresh stale bundle snapshot (S78→S85)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:00:32 +07:00
d4f60212a5 [CLAUDE] Docs: S85 closeout — CV PRO batch + clear-data + 6 UAT round + 2 root-cause + 5 SQL-fix
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m51s
STATUS/HANDOFF prepend S85 (Mig 57 · 88 tables · 374 test · gotcha 73 · bundle admin aKuNip19/user BUsL0HeQ Run #341). gotchas +2: #72 DateTime serialize no-Z -> FE +7h (UtcDateTimeJsonConverter UTC-with-Z) · #73 UPDATE absolute-set clears field on FE-omit (bug-class S42, null-safe guard). + session log + scripts/s85-wipe-uat-data.sql (prod UAT wipe, backup-first, executed) + agent-memory residuals (inv-codebase PE-recon, test-specialist baseline 374).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:52:46 +07:00
5349623347 [CLAUDE] Tests: +3 regression bug-class S42 — UpdateDraft giữ Quy trình duyệt (anh Kiệt FDC)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m38s
Test-after ROOT FIX S85 (commit 1263c0d — UpdateDraftHandler null-safe ApprovalWorkflowId).
PeUpdateDraftWorkflowPreserveTests: (1) null→PRESERVE W (reproduce bug-class S42), (2) non-null→
CHANGE W2, (3) bonus BudgetPeriodAmount null-safe đối chứng. Full suite 371→374 PASS, 0 fail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:32:18 +07:00
49ac0868db [CLAUDE] Api: fix lệch giờ +7h — serialize DateTime UTC-with-Z (anh Kiệt FDC)
Some checks failed
Deploy SOLUTION_ERP / build-deploy (push) Has been cancelled
anh Kiệt báo "mới tạo phiếu mà báo cách 7h trước" — lỗi timezone: timestamps lưu UTC
(DateTime.UtcNow) nhưng EF đọc datetime2 = DateTimeKind.Unspecified → System.Text.Json default
serialize KHÔNG có 'Z' (vd "2026-06-23T08:20:00") → FE new Date(naive) hiểu là LOCAL → lệch +7h
(VN UTC+7).

Fix: UtcDateTimeJsonConverter (global qua AddControllers.AddJsonOptions) ép serialize UTC ISO-8601
CÓ 'Z' cho MỌI timestamp API → FE new Date("...Z") convert đúng về giờ local. Áp dụng cả DateTime?
(System.Text.Json tự dùng converter cho non-null của Nullable).

BE 2 file (converter mới + Program.cs đăng ký). Build slnx 0 err. KHÔNG migration. Bundle FE frozen.
Note: SignalR realtime push dùng serializer riêng — nếu giờ realtime còn lệch sẽ thêm AddJsonProtocol.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:31:08 +07:00
1263c0dd77 [CLAUDE] PurchaseEvaluation: ROOT FIX — Sửa header KHÔNG xóa Quy trình duyệt (bug-class S42, anh Kiệt FDC)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m47s
Root-cause "chưa chọn quy trình duyệt" lặp lại (long.chau + nhiều account dù SQL-fix nhiều đợt):
form Sửa header (PeHeaderForm → PUT /purchase-evaluations/{id}) KHÔNG gửi approvalWorkflowId →
UpdatePurchaseEvaluationDraftCommandHandler absolute-set entity.ApprovalWorkflowId = null → XÓA
workflow của phiếu (tạo CÓ workflow → bấm Sửa = MẤT → kẹt submit). ApprovalWorkflowId bị SÓT khỏi
pattern null-safe (bug-class S42) mà BudgetPeriodAmount/ExpectedRemainingAmount/WorkItemId ngay
dưới đã áp dụng ("client không gửi → GIỮ giá trị cũ").

Fix: null-safe — chỉ set ApprovalWorkflowId khi client CÓ gửi (preserve nếu không gửi). Đổi quy
trình = FE phải gửi giá trị mới. + prod-data: gán QT-DN-V2-001 cho 5 phiếu bị clear (2 đợt 3+2).

BE 1 file (UpdateDraftHandler). Test 371 PASS (no break — submit-guard S83 giữ nguyên).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:24:27 +07:00
34218f0493 [CLAUDE] PurchaseEvaluation: thêm "Quy trình duyệt" vào checklist gửi-duyệt (anh Kiệt FDC UAT R4)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m12s
Phiếu cũ thiếu workflow (tạo lúc bundle cũ chưa có D5 auto-chọn) → checklist D4 toàn xanh
nhưng submit chặn "chưa chọn quy trình" = MISLEADING. Bổ sung dòng "Quy trình duyệt" vào
checklist (xanh ✓ khi có workflow, đỏ ✗ khi thiếu) → người dùng thấy đúng blocker.

3 phiếu thiếu workflow đã fix prod-data (gán QT-DN-V2-001 cho type-1). R4 auto-assign-at-submit
đã thử nhưng REVERT: phá 2 test S83 (test-DB có sẵn workflow → auto-gán thay vì block) + nới
block ngược ý "ràng". SQL fix + create-block/D5 (R1) đã đủ chặn phiếu thiếu workflow.

FE-only PeDetailTabs ×2 app SHA-identical. Both build PASS, test 371 (revert verified).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:07:40 +07:00
e3e40ae346 [CLAUDE] PurchaseEvaluation: ràng trường bắt buộc — form tạo hiện thiếu gì + checklist xanh/đỏ gửi duyệt (anh Kiệt FDC UAT R3)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m50s
Anh chốt "không chọn quy trình thì không cho tạo phiếu, ràng mấy cái rủi ro lại hết":
- Form TẠO: nút "Tạo phiếu" disabled khi thiếu (Quy trình duyệt / Hạng mục / Dự án) + hint
  ĐỎ liệt kê rõ còn thiếu gì (✓ xanh khi đủ). Defense-in-depth với BE validator NotEmpty (S83).
- Detail (D4): checklist xanh ✓ "đã khai" / đỏ ✗ "chưa khai" cho 4 trường bắt buộc gửi duyệt
  (NCC winner · giá>0 · ngân sách · bảng so sánh) hiện phía trên nút "Lưu & Gửi Duyệt"
  (mirror missingForApproval predicate, khớp annotation anh Kiệt "xanh=đã khai, đỏ=chưa khai").

FE-only 2 component × 2 app SHA-identical. Both build PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 14:10:38 +07:00
a5e936fc0a [CLAUDE] PurchaseEvaluation: drafter tự gỡ cờ GẤP + ngân sách kỳ này tự nhảy từ ban-hành (anh Kiệt FDC UAT R2)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m46s
D2 — Người KHAI phiếu tự GỠ cờ GẤP của mình (nới luật S77 "GỠ=chỉ TP"). BE handler
restructure SET/UNSET: GẮN giữ role-only (PRO/CCM/Admin); GỠ +drafter (DrafterUserId==actor)
→ drafter/Admin clear CẢ 2 cờ, TP-vai clear cờ vai mình. FE canToggle +isDrafter.
D3 — "Ngân sách kỳ này" (row3) tự nhảy từ "Ngân sách Ban hành lần đầu"
(PeWorkItemBudget.ProInitialAmount) khi chưa nhập tay. Submit-guard BE + FE missingForApproval
dùng effective = budgetPeriodAmount ?? proInitialAmount (mirror 2 tầng, chống bypass gotcha #44).

BE 2 file (Urgent handler + Workflow submit-guard). FE PeDetailTabs ×2 app SHA-identical.
Test +5 PeUrgentToggleAuthzTests (drafter-self-unset authz matrix) → 371 PASS. BE slnx + 2 FE build PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 14:00:33 +07:00
24f0083d78 [CLAUDE] PurchaseEvaluation: form tạo phiếu — ẩn mục 3/4/5 + auto-chọn quy trình duyệt (anh Kiệt FDC UAT R1)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m14s
D1 — ẩn mục 3 (NCC tham gia) / 4 (Hạng mục + Báo giá) / 5 (Ý kiến) + dòng 2a placeholder khỏi form TẠO (chỉ là "Lưu phiếu trước", gây rối) — mở khóa đầy đủ ở Detail tabs sau khi tạo.
D5 — auto-chọn quy trình duyệt khi danh sách chỉ có 1 lựa chọn (hết nhầm "chưa chọn quy trình"; prod PE type-1 có đúng 1 workflow IsUserSelectable).
Gỡ FormRow/LockedHint/Lock unused (TS6133).

FE 2 app SHA-identical. Both build PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 13:42:50 +07:00
5a6125494b [CLAUDE] PurchaseEvaluation: CV PRO refinement batch (anh Kiệt FDC) — live budget recompute + clear winner + fullscreen preview + hide create c/d
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m59s
C1 ẩn "c. Giá chào thầu" + "d. Bảng so sánh giá" khỏi form TẠO (vẫn hiện ở Detail tabs)
C3 ô 8 "Giá trị TH dự kiến còn lại" pre-fill từ dòng 7 (Ngân sách còn lại)
C4a live-recompute: VndInlineEdit +onLiveChange, PeBudgetSummaryTable draftRow3/8 → dòng 5/6/7/9 + So sánh + % nhảy NGAY khi gõ ô 3/8 (chưa cần Lưu)
C4b So sánh = 0 → "Bằng ngân sách" / "—" thay "0 đ" (chỉ khi base>0)
C5 hủy/đổi NCC winner: BE SelectWinnerBody(Guid?) + Command/Handler 2 nhánh (null=clear bỏ-qua-validate-list / non-null=giữ logic cũ); FE dropdown ""→clear + nút ✓ toggle. KHÔNG migration (SelectedSupplierId đã Guid?)
C7 nút "Toàn màn hình" preview file báo giá (overlay inset-0 + Esc thoát)

BE 2 file (Api controller record + Application command/handler). FE 3 file × 2 app SHA-identical. Test +10 PeSelectWinnerClearTests (4 clear + 4 select-regression + 2 PE-existence) → 366 PASS. Both FE build PASS, slnx build 0 err.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 08:47:51 +07:00
0e159908d6 [CLAUDE] Docs: flush session-start hot-feed cap v3 (220/60/50) + commit S83 cicd harvest-orphan (S84)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 19:21:39 +07:00
f71654ff9e [CLAUDE] Docs: S83 closeout — STATUS/HANDOFF + session-log (H-15 v3 budget + PE require-workflow)
Test 354->356, bundle CsJetgZH/BVS0ApIm Run #333 (unchanged, #69-REFINE: no fe-src=Vite-deterministic-same-hash). spawn-records 3 sub (tooling/harvest/cicd all verified). State Mig 57/88 bang/356 test/gotcha 71.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:23:59 +07:00
fc1f19db8c [CLAUDE] PurchaseEvaluation: require quy trinh duyet V2 o create+submit (dong lo hong quy-trinh-cu)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m58s
Validator NotEmpty(ApprovalWorkflowId) + submit guard (sau Section-3, truoc mutate phase). Dong lo hong validate FE-only -> phieu null-workflow ket nhanh V1-legacy "quy trinh cu" (khong Buoc/Cap, khong route duyet). Test-before (RED confirmed): +2 validator test (PeWorkItemGuardTests) + rewrite test 7/13 PeSubmitGuardAndBypass (V1-submit deprecated, data V1 wipe S59). 356 pass (45D+311I).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:06:46 +07:00
2c7fd635b9 [CLAUDE] Docs: H-15 v3 memory-budget full-parity (lead 220K/sub 60K/wf 50K) + spawn-fill-to-budget
anh owner-directive: full AI_INFRA parity, supersede S82 self-shrink (AI under-shrinking forbidden by mark RC-...01-58-01). New spawn_fill_directive: fill sub context to budget via RICH spawn prompt (MEMORY.md byte-cap = 1 slice only, prompt fills rest). engine +G.5 + adopt-delta S83, ACTIVE-MARKS H-15 v3-delta RC-pqhuy1987-22-06-2026-16-35-37, agents/README retire <=8K-brief. Detector 26 baseline (0 new), A7 217/217.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 17:06:34 +07:00
dfde1acbd0 [CLAUDE] Docs: S82 closeout — STATUS/HANDOFF + session-log + reviewer-memory (Harness-15-v2 adopt)
- STATUS/HANDOFF: prepend S82, demote S81 (tiering keep current+3)
- session-log 2026-06-21-S82 with spawn-records (2 monitor + 3 workflow reviewer)
- reviewer agent-memory: H15-v2 review + _index-sha-convention memory-note
- %-print CUOI phien lan dau (H15-v2 L.b(c)); archive-gate 2 WATCH strike-1; A7 217/217

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 02:09:05 +07:00
aa3f0fefb4 [CLAUDE] Docs: adopt Harness-15-v2 (Tang-1 hot-feed-lon + L2/L3 bo-tran + %-print + role-boundary, S82)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m45s
- token_governor v2: L1 12K -> hot-feed per-role (lead 60K/sub 20K/wf 16K); L2/L3 6K/4K -> NO-CAP
- engine G.4 + session-start 2.1.6 + session-end L.b(c): %-print 2-dau-phien
- role-boundary: con-so = quyen chu-du-an (anh), AI thuc-thi + bao-%; sua framing lead-authority S81
- mark H-15 v2-delta anh-confirm RC-pqhuy1987-21-06-2026-01-58-01
- 2-process: IMPLEMENT em-main D9 + REVIEW wf_04667b25-5fa 3/3 PASS (3 MINOR fixed)
- check-email STAGE 1+2 (notify verify ok) + email AI_INFRA (a749bb6bd1be)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 02:02:05 +07:00
700e4c951b [CLAUDE] Docs: stamp User-Mark H-15 Active-High (anh-confirm S81)
RC-pqhuy1987-20-06-2026-23-07-37 -> ACTIVE-MARKS.md (4th Active-High; H-15 memory-budget per-agent, supersedes:null additive). Sync pending->stamped in adap-report/STATUS/HANDOFF.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 23:09:12 +07:00
0bc2112952 [CLAUDE] Docs: adopt Harness-15 memory-budget per-agent (token-governor + value-gate + work-state block, S81)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m0s
8/8 floor via engine section-G + budget.json (harness_floor/token_governor/value_protect) + session-start 2.1.5 + rules 6.6 + gate-script value-protect FLAG (runtime-fired test-specialist). Review wf_b7f3c8ac-b53 PASS/PASS/HONEST -> 2 CONCERN fixed (anchoring + tool-attribution) + refresh stale measured S71->S81. adap-report + email ai_infra body-hash bb8fb6e803ae. 0 production code, A7 217/217, detector 26-flag baseline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 22:46:17 +07:00
447082fb03 [CLAUDE] Docs: S80 curate L1 over-cap reviewer/inv-codebase/cicd -> L2 (archive-gate keep-floor manual, A7 217/217)
- 3 over-cap sub L1 -> L2 archive byte-exact: reviewer 45->10KB, investigator-codebase 40->10KB, cicd-monitor 39->12KB
- 31 entries moved (sed, +N -0 additive, 0 byte-loss) + 31 _INDEX substring pointers; A7 GATE PASS 217/217 resolve
- stale foundation counts flushed: 130/263->354 test, 55->71 gotcha, Mig 40/55->57, 84->88 table, bundle->#330
- 0 production code, state unchanged (Mig 57 / 88 tables / 354 test / gotcha 71)
- WATCH (A6 strike-1, no-action): frontend-designer 26KB + test-specialist 28KB
- lesson: _INDEX substring MUST quote-free (A7 quote-parser caught escaped-quote PURO pointer that self-grep missed)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 11:29:11 +07:00
33d519eda0 [CLAUDE] Docs: adopt User-Mark (H-12/13 canonical §P) + Harness-14 + RC-signature (S79)
Áp canonical §P đầy-đủ (P1-P10) khi anh gõ /user-mark-active-high "áp đầy-đủ
chính-xác nhất theo AI_INFRA". 0 production code.

- 4 lệnh /user-mark-{active-high,active,medium,disable} (DACI report-before-stamp)
- ledger .claude/governance/ACTIVE-MARKS.md (4 cấp Active-High/Active/Medium/Disable
  + display-filter) + 3 mark Active-High stamped anh-confirm
  (RC-pqhuy1987-20-06-2026-10-29-09/10/11 = objective-criteria/User-Mark/time-age)
- harness-11-engine.md §E (P1-P10) + §F (Harness-14 3-mức maturity honest)
- rules.md §6.6 objective-criteria (KHÔNG quy-mô-đội / KHÔNG thời-gian-tuổi)
- session-start §2.1.4 + session-end §L.b(h) mark-display
- 4 Workflow: invest wf_82337f7f-95c + review wf_a7cbe93e-912
  + align-re-review wf_9d3beebb-a95 (§P 10/10) + H14-review wf_4d4eba6f-8a0 (§F 6/6)
- completeness-gate H-6→H-13 ĐẠT (H-8 11/11 inherit no-[1m])
- 3 adap-report + email ai_infra (7b8615b3) + check-email STAGE 2

State THẬT GIỮ NGUYÊN: Mig 57 · 88 bảng · 354 test · gotcha 71 · bundle CsJetgZH/BVS0ApIm.
Restart CLI để activate 4 lệnh + session-cmd (no hot-reload).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 10:53:23 +07:00
f0e616fd5a [CLAUDE] Docs: S78 closeout — PE attach-file khi duyet (Run #330) + gotcha #71 + cicd flush
STATUS/HANDOFF tier +S78 (bundle CsJetgZH/BVS0ApIm, no migration, test 354 unchanged) + trim S75 row. gotcha #71 (them enum value vao entity dung-chung -> pollute UI/guard proxy-predicate supplierId===null). session log S78. cicd-monitor MEMORY self-flush Run #330. curate-debt carry: reviewer 45.2KB + cicd 38.8KB + inv 35.7KB keep-floor-hit (archive-gate A7 PASS 186/186). Docs-only -> CI skip.
2026-06-19 19:32:41 +07:00
7886fd03dd [CLAUDE] PurchaseEvaluation: nguoi duyet dinh kem file khi DUYET (reuse attachment Purpose=ApprovalAttachment, no migration)
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 4m56s
Modal Duyet them picker multi-file -> upload TRUOC khi chuyen phase (file loi/>20MB = throw, khong duyet). File hien o muc 'File dinh kem khi duyet' (download/preview) trong Panel quy trinh, gan ten nguoi tai + thoi gian. Fix 2 filter dung supplierId=null lam proxy Bang-so-sanh (banSoSanhAttachments + submit-guard) loai purpose=5 tranh lan section + false-pass. FE 2 app SHA-identical. authz: approver upload duoc (handler khong guard drafter-only). Test 354 PASS, no migration. UAT Tra Sol / 5 tester.
2026-06-19 16:46:37 +07:00
095fb492cd [CLAUDE] Docs: S77 closeout — PE UX batch 10 deploy (#320->#329) + Mig 57 + test 354 + flush agent-memory
Closeout buoi san pham lon (anh Kiet FDC + Tra Sol + Bich Phuong, HMW-mode ON): 10 deploy prod-verified #320->#329, 10/10 cicd PASS. STATUS + HANDOFF + session log 2026-06-19-S77. State: Mig 56->57 (AddPeSuggestedPriceNotes) · test 344->354 (+10) · bundle cuoi BqKD3Y23/Cn-i349D · 88 tables · gotcha 70. Viec: co GAP pill moi danh sach+inbox · focus->revert list · Mig 57 ghi chu gia de xuat PRO/CCM + so phan cach + chinh ta + guard #70 · so am do-ngoac · muc con thut-gach · co gap GAN=NV/GO=Truong phong bat-doi-xung · tach chon-phieu(inline) khoi mo-rong(overlay)+nut Xem mo rong · chuong bao nguoi duyet · banner Tra-lai. 3 loi em tu bat review-truoc-deploy (guard#70 · asymmetric · double-mount). FD process-death Task H->recover-disk. Flush 5 sub-agent MEMORY (self-flush khi return). CARRY: curate L1 over-cap reviewer 45KB+cicd 37.6KB+inv 35.6KB keep-floor-hit manual (archive-gate A7 GATE PASS 186/186). Docs+memory only -> CI skip (gotcha #41).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:55:45 +07:00