[CLAUDE] Docs: S45 session-end — test-gap + Mig 43 sync

STATUS/HANDOFF S45 (154->181 test, Mig 43) + gotcha #57 (soft-delete UNIQUE must filter [IsDeleted]=0) + session log + root CLAUDE counts + ef-core skill Mig 43 row + flush 3 agent MEMORY (test-specialist proxy after #53 truncation + cicd Run #368 + investigator P11-C recon).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-01 14:49:28 +07:00
parent 0c5a014ebe
commit 7fbe05a19c
9 changed files with 117 additions and 38 deletions

View File

@ -3,7 +3,7 @@
> **Update rule:** trước khi bắt đầu 1 task → ghi row `🔥 In Progress`. Xong → `✅ Recently Done`.
> **Tiering rule (S40):** chỉ giữ **state hiện tại + 3 session gần nhất** ở file này. Session cũ hơn → `docs/changelog/sessions/`. Full history pre-S40 → `docs/_archive/STATUS-preS40-fullhistory.md`. (Tránh over-context — xóa double, không cắt nội dung.)
**Last updated:** 2026-06-01 (Session 44**Monthly drift audit + AI_INFRA bundle 06-01 adoption**: 42 doc/skill count-drift fixes (40→42 mig · 84→91 tables · 130→154 test · 52→56 gotcha across CLAUDE/skills/schema-diagram/database-guide) + agent-mem "25KB"→"~30KB tiered" wording ×7 + /session-end #4 adoption-report step. Docs-only, CI-skip. Prev: S42 P11-A Gitea #364/#365, S43 P11-B #367.)
**Last updated:** 2026-06-01 (Session 45**HRM test-gap stabilization + Holiday drift fix**: +27 test đóng 3 coverage gap deferred S35-S38 (154→181) + **Mig 43** `FilterHolidayUniqueIndexByIsDeleted` (soft-delete slot reusable, fix reachable 500). 2 commit `051b62b`+`0c5a014` deploy+verified prod (cicd Run #368, filtered index live). Prev: S44 monthly drift audit + AI_INFRA bundle 06-01.)
---
@ -11,30 +11,30 @@
| Metric | Value | Note |
|---|---|---|
| Migrations | **42** | last `AddLeaveBalances` (20260530034336) |
| Migrations | **43** | last `FilterHolidayUniqueIndexByIsDeleted` (20260601064128, S45) |
| SQL tables | **91** | +1 S43 LeaveBalances (verified prod, UNIQUE composite + FK LeaveTypes Restrict) |
| API endpoints | **~241** | +3 S43 (leave-balances my/admin/adjust) |
| FE pages | **67** | WorkflowAppDetailPage (admin+user SHA256 identical) |
| Menu keys | **~53** | BE `MenuKeys` const (FE menuKeys.ts mirror 54) |
| Tests | **154 PASS** | 58 Domain + 96 Infra · 0 fail / 0 skip · +11 LeaveBalance/guard S43 |
| Gotchas | **56** | `docs/gotchas.md` (latest #56 CWD-drift stray memory S42-43) |
| Tests | **181 PASS** | 58 Domain + 123 Infra · 0 fail / 0 skip · +27 HRM coverage S45 (Holiday/EmployeeSatellite/authz) |
| Gotchas | **57** | `docs/gotchas.md` (latest #57 soft-delete UNIQUE phải filter [IsDeleted]=0, S45) |
| User memory | 27 | + `MEMORY.md` index |
| Skills | 6 | 3 domain + 3 ops |
| Sub-agents | **7** | Opus 4.8 1M (S39 split 4→7) |
| RAG chunks | **2406** | ✅ S41 re-bootstrap clean (3080→2406, 674 junk: node_modules+_archive now excluded; user-memory 60 chunks/10 files slug-fixed + S38-S41 indexed) |
**Bundle hash live (prod):** admin `Krjvg_3j` · user `6sNStgxa` (Gitea #367, S43 P11-B). Auth-verified prod: `/leave-balances/my?year=2026` → 5 LeaveType lazy-default (Used=0, remaining=entitled).
**Phase:** ✅ Phase 10 COMPLETE · 🔄 **Phase 11 IN PROGRESS** — P11-A + P11-B DONE (deployed prod) · ⬜ P11-C..F pending · 🚫 Phase 9 Ops blocked (anh main coordinate).
**Phase:** ✅ Phase 10 COMPLETE · 🔄 **Phase 11 IN PROGRESS** — P11-A + P11-B DONE (deployed prod) · ⬜ P11-C..F pending (P11-C Vehicle+Driver recon ready S45) · 🧪 S45 test-gap stabilization + Mig 43 Holiday fix shipped · 🚫 Phase 9 Ops blocked (anh main coordinate).
> ⚠️ **Count drift fixed S40:** endpoints ~223→**211**, FE pages 53→**65**, menu keys 85→**~53**. Tables **84 confirmed correct** (DbSet 77 + Identity 7). 3 số "khó fake" (mig/gotcha/git) luôn đúng. Cause: số "incremented mỗi session" over/under-count optimistic — re-ground định kỳ.
---
## 🔥 In Progress (S43)
## 🔥 In Progress (S45)
| Task | Owner | Status |
|---|---|---|
| _(none — P11-A + P11-B SHIPPED + verified prod. Next: P11-C..F khi anh chọn)_ | — | ✅ |
| _(none — S45 test-gaps + Mig 43 Holiday fix SHIPPED + verified prod. Next: P11-C..F khi anh chọn — recon sẵn)_ | — | ✅ |
**S40 done:** ✅ Consolidation (`d2f52ba`) · ✅ Curate 4 agent MEMORY >25KB→<8.4KB (`78c9de3`) · RAG catch-up chunk S37-S40 (rerank 0.867) · **AI_INFRA bulletin 2026-05-29 adopt 4/4** (MỤC2 Tiered Memory Policy v1 `6f08d1f` + MỤC3 /session-start+/session-end slash commands `c8ff5e1`). Full RAG re-index = AI_INFRA op (cần VOYAGE_API_KEY).
@ -44,6 +44,14 @@
## ✅ Recently Done (newest on top — 3 session; cũ hơn → session logs)
### S45 (2026-06-01) — 🧪 HRM test-gap stabilization + Holiday drift fix (Mig 43)
- **2 commit `051b62b` (Tests) + `0c5a014` (Mig 43) push Gitea Run #368 PASS, verified prod.** "Stabilize before extend": đóng 3 test-gap deferred S35-S38 TRƯỚC khi chồng schema mới.
- **+27 test (154181):** Gap1 Holiday composite UNIQUE (7) · Gap2 EmployeeSatellite FK-invariant+soft-delete+cascade (10) · Gap3 gotcha #44 authz regression HrmConfigs+Employees (10). 🟪 test-specialist viết (return truncated gotcha #53 👤 em main verify-on-disk + proxy MEMORY).
- **Mig 43 `FilterHolidayUniqueIndexByIsDeleted`** (👤 em main solo, bug-fix chain): Gap1 test lòi drift Holiday DB UNIQUE (Year,Date) unfiltered vs handler `!IsDeleted` admin xoá+thêm lại ngày lễ cùng date = **500 reachable**. Fix `.HasFilter("[IsDeleted]=0")` (khớp pattern 13× sẵn ). Flip Case 7 assert success. Table vẫn 91 (index-only).
- **🟩 cicd Run #368 PASS** ~4m20s: test gate 181 · Mig 43 applied prod · `IX_Holidays_Year_Date` filter=`([IsDeleted]=(0))` live (was NULL) · FE bundle UNCHANGED `Krjvg_3j`/`6sNStgxa` (đúng BE-only) · health 200 · 0 regression.
- **🟦 investigator P11-C pre-flight** (Vehicle+Driver catalog): chưa master extend HrmConfigs +2 kind declarative, Mig 44, giữ VehicleBooking free-text. **gotcha #57 caught:** LeaveType.Code + ShiftPattern.Code cũng unfiltered (backlog).
- **gotcha #57 NEW** (soft-delete UNIQUE phải `.HasFilter`). Process: foreground spawn = im lặng = "looks frozen" đẩy background + report-ngay (`feedback_background_spawn_visibility`).
### S44 (2026-06-01) — 🗓️ Monthly drift audit + AI_INFRA bundle 06-01 adoption (docs-only, CI-skip)
- **Cadence audit** (cron 2026-06-01) + adopt AI_INFRA bundle 06-01 (federated, team chọn full scope). 🟦 investigator-codebase drift scan (read-only, ground-truth verified) 👤 em main patch. No code touched **154 test PASS unchanged**.
- **42 count-drift fixes:** CLAUDE.md root + docs/CLAUDE.md + `ef-core-migration` SKILL + `dependency-audit-erp` SKILL + schema-diagram + database-guide `40→42 mig · 84/59/55/47→91 tables · 130/111→154 test · 52/49→56 gotcha`.
@ -101,7 +109,7 @@
### 🔧 Maintenance backlog
- RAG re-ingest `solution_erp` S42-S43 content (store_memory stopgap live; full re-index = AI_INFRA op)
- Test coverage gaps: **Gap1** HrmConfig Holiday composite UNIQUE (🔴 CRITICAL) · **Gap2** EmployeeSatellite cascade · **Gap3** gotcha #44 regression `EmployeesController`+`HrmConfigsController`
- **Test coverage gaps Gap1/2/3 DONE S45** (+27 test). NEW backlog (gotcha #57): **LeaveType.Code + ShiftPattern.Code UNIQUE chưa filter `[IsDeleted]=0`** (cùng class Holiday Mig 43 recreate-on-soft-deleted-slot 500; test-before khi fix). Cân nhắc gộp vào P11-C khi đụng HrmConfigs.
- Skill + doc drift audit cron **2026-06-01 DONE (S44)** 42 count-drift fixes + AI_INFRA bundle adopt; next **2026-07-01**
### 🚫 Phase 9 Ops (blocked — anh main coordinate)