Files
solution-erp/.claude/workflows/runs/2026-08-01-S169-bookend-open/sleep-drafts/cicd-monitor--2026-05-q3.gist.draft.md
2026-08-03 10:14:49 +07:00

6.3 KiB

cicd-monitor/2026-05-q3 — gist

distill-gen: 1 source-verbatim: .claude/agent-memory/cicd-monitor/archive/2026-05-q3.md (3 entry → 3 cụm) pointer-style: substring

TỔNG-HỢP (3-5 ý)

  1. Test đỏ mà code sản-phẩm đúng — lỗi ở thước đo. Cặp Run #215 FAIL → #216 PASS (8 phút turnaround): SQLite + clock đóng-băng ⇒ 2 changelog cùng CreatedAt ⇒ tie-break OrderByDescending bất-định (gotcha #48); fix = lọc theo NỘI-DUNG (Summary), code Chunk A không revert.
  2. Giả-thuyết chết bằng quan-sát, không bằng suy-luận: Discovery #3 — glob **/*.md khớp .md ở MỌI độ sâu nên commit cc8a7d3 (docs + 4 agent MEMORY.md) vẫn bị CI SKIP; gotcha #47 không chết mà đổi vai PREVENTIVE cho file non-.md tương-lai.
  3. CI test-gate chặn TRƯỚC deploy = lưới cứu chế-độ UAT-skip-test; refactor BE >100 LOC nên dotnet test local trước push.
  4. Baseline 2026-05-12: vai khởi-động bằng NỀN tri-thức (44 gotchas cross-ref + checklist 5-stage + 3 skill), không bắt đầu bằng run.

Entries

[cao] B1 — Run #215 FAIL → #216 PASS (gotcha #48) (trùng liên-file #215: bản dày = file này; cicd-monitor--2026-05-runs giữ bản mỏng ở phần tóm-tắt)

  • VIỆC: Verify Plan AB Chunk A (Changelog visibility: Bug 1 Budget Adjust + Bug 2 Return Mode) — 1 commit 3 file, BE PurchaseEvaluationWorkflowService.cs +207/-95 + 2 FE PeDetailTabs.tsx.
  • KẾT-LUẬN: #215 (id=329, cdfd542, push e23f51c..cdfd542) FAIL ở test_infra 51/53 — 2 test ReturnMode báo Expected changelog.ContextNote not to be <null>; deploy KHÔNG chạy (bundle giữ nguyên Run #214, Mig 31 TOP 1 y cũ). #216 (id=330, 8c05947) PASS — chỉ sửa TEST (+7/-2) thêm .Where(c => c.Summary!.Contains("Chuyển phase")) trước OrderByDescending(CreatedAt).First(); code Chunk A không revert; 58/58 + 53/53, bundle 2/2 rotate, 10:13→10:21 = 8 phút.
  • BÀI-HỌC: SQLite + clock đóng-băng ⇒ 2 changelog cùng CreatedAtOrderByDescending tie-break trả nhầm bản-ghi ⇒ test "lấy entry mới nhất" là thước không xác-định; phải lọc theo NỘI-DUNG (Summary) chứ đừng dựa thứ-tự thời-gian. Refactor BE >100 LOC nên dotnet test local TRƯỚC push — UAT skip-test không đủ.
  • BẤT-NGỜ: test đỏ mà code sản-phẩm đúng — lỗi nằm ở thước đo; và CI test-gate chặn đúng lúc nên bro tránh được audit-trail vỡ trên prod (fail lại hoá may). → substring:"8c05947"

[cao] B2 — Verify S22 cumulative + Discovery #3 (glob **/*.md) (trùng liên-file "Verify S22 chốt": bản dày hơn ở cicd-monitor--2026-05-runs — file này giữ bản của mình, đóng-kín per-file)

  • VIỆC: Verify chốt S22, push 3d725c4..cc8a7d3 12 commit (Plan C/D/E + Mig 30 F4 per-NV Approver edit Budget).
  • KẾT-LUẬN: VERDICT=PASS — 33 user active prod, bundle 2/2 rotate, 104/104 test (+1 so baseline S21=103), Mig 30 xác-nhận prod. Discovery #3: commit cc8a7d3 gồm docs + 4 agent MEMORY.md vẫn bị CI SKIP vì glob **/*.md khớp .md ở MỌI độ sâu.
  • BÀI-HỌC: glob **/*.md trong paths-ignore khớp cả file .md nằm sâu trong .claude/agent-memory/ ⇒ giả-thuyết "thư-mục đó sẽ trigger CI" bị bác bằng quan-sát, không bằng suy-luận.
  • BẤT-NGỜ: gotcha #47 KHÔNG chết mà đổi vai — vẫn đúng như biện-pháp PHÒNG cho file state non-.md tương-lai dưới .claude/agent-memory/. → substring:"cc8a7d3"

[thấp] B3 — Setup baseline

  • VIỆC: khởi-tạo CI/CD Monitor 2026-05-12.
  • KẾT-LUẬN: nạp nền: 44 gotcha cross-ref + checklist 5-stage + 3 skill preload + khuôn verify bundle-hash; chưa monitor run nào.
  • BÀI-HỌC: vai bắt đầu bằng NỀN tri-thức + checklist, không bắt đầu bằng run.
  • BẤT-NGỜ: (không có — entry mốc; giữ vì là gốc truy-vết baseline 44 gotcha / 5-stage.) → substring:"44 gotchas"

Phụ-lục token (coverage)

  • gotcha#: #48 (SQLite tie-break — cặp catch+fix) · #47 (đổi vai → PREVENTIVE) · dải nền #39-#52 · "44 gotchas cross-ref" (baseline 05-12)
  • surprise: Discovery #3 first surfaced + "Spec hypothesis ... disproven for this commit" · "Side benefit: CI test gate caught BEFORE prod deploy — bro UAT spared broken Plan M edge case audit trail" · "Plan AB Chunk A code cdfd542 KHÔNG bị revert" · "Demonstrates test-after UAT mode CAN tolerate edge case bug if next chunk lands within minutes — but ... UAT skip-test rule risky for refactor scope" · "Deploy NOT shipped ... bro UAT screenshot pre-deploy stale"
  • guard: test-gate CI chặn trước deploy (test_domain + test_infra) · .Where(c => c.Summary!.Contains("Chuyển phase")) (fix-guard chọn đúng entry) · paths-ignore glob **/*.md · Stage 4.6 sqlcmd seed verify (header) · 5-stage checklist + 10-surface-point per-NV (header)
  • root-cause: ApplyReturnModeAsync thêm Changelog MỚI (EntityType=Workflow + Action=Update + Summary, khôngContextNote) ở cuối, cùng SaveChangesAsync với LogTransitionAsync (có ContextNote=comment) ⇒ SQLite + frozen test clock ⇒ cùng CreatedAt.OrderByDescending(c => c.CreatedAt).FirstAsync() tie-break trả nhầm entry Workflow · Discovery #3 root-cause: glob **/*.md khớp .md ở mọi độ sâu
  • file:line / định-danh: PurchaseEvaluationWorkflowService.cs +207/-95 · ApplyReturnModeAsync line 403-412 · LogTransitionAsync line 100 · PeDetailTabs.tsx (2 FE mirror filter) · test PurchaseEvaluationWorkflowServiceReturnModeTests.ApplyReturnMode_OneStep_AtStep1_ResetsToBuoc1Cap1_KeepsChoDuyet · test ...ApplyReturnMode_OneLevel_AtStep1Level1_ResetsToBuoc1Cap1_KeepsChoDuyet · lỗi Expected changelog.ContextNote not to be <null> · Run #215 id=329 cdfd542 (1m06s) / Run #216 id=330 8c05947 (+7/-2) · push e23f51c..cdfd542 · Run #214 (baseline bundle) · Mig 31 TOP 1 · Run S22: push 3d725c4..cc8a7d3 12 commit, Mig 30 F4, 33 user, 104/104 (baseline S21=103) · commit cc8a7d3 (docs + 4 agent MEMORY.md → CI SKIPPED) · PE c6e9 · 51/53 → 58/58 + 53/53 · 10:13→10:21 (8 phút) · setup 2026-05-12