[CLAUDE] Docs: S46 memory integrity repair — sync STATUS/HANDOFF
Rebuild empty MEMORY.md index (S45 0-byte) + repopulate feedback_background_spawn_visibility + new feedback_session_end_memory_write_verify (memory files live outside repo). Fix stale user-memory count 27->14. Tier HANDOFF S43->pointer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -2,7 +2,22 @@
|
|||||||
|
|
||||||
> **Tiering rule (S40):** giữ **2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/`. Full brief history pre-S40 → `docs/_archive/HANDOFF-preS40-fullhistory.md`.
|
> **Tiering rule (S40):** giữ **2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/`. Full brief history pre-S40 → `docs/_archive/HANDOFF-preS40-fullhistory.md`.
|
||||||
|
|
||||||
**Last updated:** 2026-06-01 (Session 45 — HRM test-gap stabilization +27 (154→181) + Mig 43 Holiday filtered-unique fix. 2 commit 051b62b+0c5a014, cicd Run #368 PASS prod. Prev: S44 monthly drift audit.)
|
**Last updated:** 2026-06-01 (Session 46 — memory integrity repair (no code): rebuilt empty `MEMORY.md` index + repopulated 1 entry + new verify-write memory. Repo unchanged from S45. Prev: S45 HRM test-gap +27 (154→181) + Mig 43 Holiday filtered-unique, Run #368 prod.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## S46 (2026-06-01) — Memory integrity repair (no code, docs-only)
|
||||||
|
|
||||||
|
**`/session-start` audit phát hiện S45 close-out để lại 2 file user-memory 0 byte** — `MEMORY.md` (index) + `feedback_background_spawn_visibility.md`. Index rỗng = S46 bootstrap chạy KHÔNG có memory auto-inject (degrade thầm lặng).
|
||||||
|
|
||||||
|
**Done (👤 em main solo, no agent spawn):**
|
||||||
|
- Rebuilt `MEMORY.md` index — 14 entry (8 feedback + 3 project + 2 pattern). Repopulate `feedback_background_spawn_visibility` từ HANDOFF/STATUS S45 ref (marked reconstructed). NEW `feedback_session_end_memory_write_verify`.
|
||||||
|
- Verified **0 empty `.md`** (`find -size 0` = 0). STATUS count drift "27"→**14** corrected. Test gate re-confirm 181 PASS lúc bootstrap.
|
||||||
|
- Memory files NGOÀI repo (`~/.claude/.../memory/`) → no git commit cho memory. Chỉ repo docs (STATUS+HANDOFF) = docs-only commit, CI skip.
|
||||||
|
|
||||||
|
**Root cause:** S45 session-end flush tạo stub rồi Write body truncate (gotcha #53 — S45 có test-specialist truncate). File 0-byte không báo lỗi + ngoài git-track → trôi tới S46 mới lộ.
|
||||||
|
|
||||||
|
**Next S47 (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 fix LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops · (optional) add verify-byte-count step vào /session-end skill — đề xuất AI_INFRA per charter v2.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -38,24 +53,9 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## S43 (2026-05-30) — Phase 11 P11-B: LeaveBalance business logic
|
## S43-S38 (older) → session logs
|
||||||
|
|
||||||
**Commit `82d7fcf` → Gitea #367 PASS, deployed prod.** Agents Max → 0 bug lọt.
|
- **S43** (2026-05-30) Phase 11 P11-B LeaveBalance: Mig 42 `AddLeaveBalances` (90→91 tables, UNIQUE composite + FK LeaveTypes Restrict) + trừ phép exactly-once terminal DaDuyet (auto-create từ DaysPerYear, policy cho phép âm + cảnh báo) + FK invariant guard Create/Update + CQRS GetMy/GetUser/Adjust + FE "Số dư phép". 144→154 test, Gitea #367 prod, agents Max 0 bug. → `docs/changelog/sessions/2026-05-30-S42-S43-phase11-p11a-p11b.md`.
|
||||||
|
|
||||||
**Done:**
|
|
||||||
- **Mig 42 `AddLeaveBalances`** — `LeaveBalances` (User×LeaveType×Year + Entitled/Used/Adjustment, UNIQUE composite + FK LeaveTypes Restrict). 90→91 tables.
|
|
||||||
- **Trừ phép** hook `ApproveLeaveRequestHandler` terminal DaDuyet — exactly-once (guard chặn re-approve), auto-create từ `DaysPerYear`, `UsedDays+=NumDays`, Year=StartDate.Year. Policy cho phép âm + cảnh báo.
|
|
||||||
- **FK invariant guard** Create+Update validate LeaveTypeId tồn tại → Conflict (đóng cửa tránh 500 kẹt đơn lúc deduction FK insert). grep xác nhận 2 write site duy nhất.
|
|
||||||
- **CQRS** GetMy/GetUser/Adjust (admin `[Authorize(Roles=Admin)]`) + embed balance NGƯỜI TẠO vào leave detail. **FE** block "Số dư phép" + cảnh báo vượt (kind=leave).
|
|
||||||
- **Test** 144→**154** (+11 + repair 2 template terminal FK). Reviewer Max PASS (exactly-once + FK fully closed; 2 minor defer: concurrency no-RowVersion + stale comment).
|
|
||||||
|
|
||||||
**Carry-over (chưa đụng):** `M BROADCAST-OUT...md` + `?? .mcp.json` (từ S40). · RAG S42-S43 chưa index (stopgap store_memory). · cicd flag: skill IIS path stale + agent-memory .md trigger CI.
|
|
||||||
|
|
||||||
**Next S44 (anh pick):** P11-C (Vehicle+Driver Mig 43) / P11-D (ItTicket SLA) / P11-E (AttendanceReport+Excel) / P11-F (MaTicket) · Phase 9 Ops · coord carry-over.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## S42-S38 (older) → session logs
|
|
||||||
|
|
||||||
- **S42** (2026-05-30) Phase 11 P11-A: Mig 41 WireWorkflowAppsApprovalV2 (4 LevelOpinions + WorkflowAppCodeSequences) + 30 handler 4 module + Max re-review fix 2 FE picker bug. 130→144 test. → `docs/changelog/sessions/2026-05-30-S42-S43-phase11-p11a-p11b.md`.
|
- **S42** (2026-05-30) Phase 11 P11-A: Mig 41 WireWorkflowAppsApprovalV2 (4 LevelOpinions + WorkflowAppCodeSequences) + 30 handler 4 module + Max re-review fix 2 FE picker bug. 130→144 test. → `docs/changelog/sessions/2026-05-30-S42-S43-phase11-p11a-p11b.md`.
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
> **Update rule:** trước khi bắt đầu 1 task → ghi row `🔥 In Progress`. Xong → `✅ Recently Done`.
|
> **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.)
|
> **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 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.)
|
**Last updated:** 2026-06-01 (Session 46 — **memory integrity repair** (no code): `/session-start` audit phát hiện S45 để lại 2 file user-memory 0-byte → rebuild `MEMORY.md` index + repopulate `feedback_background_spawn_visibility` + new `feedback_session_end_memory_write_verify`. Docs-only, repo unchanged. Prev: S45 HRM test-gap +27 (154→181) + Mig 43 Holiday filtered-unique, cicd Run #368 prod.)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
| Menu keys | **~53** | BE `MenuKeys` const (FE menuKeys.ts mirror 54) |
|
| Menu keys | **~53** | BE `MenuKeys` const (FE menuKeys.ts mirror 54) |
|
||||||
| Tests | **181 PASS** | 58 Domain + 123 Infra · 0 fail / 0 skip · +27 HRM coverage S45 (Holiday/EmployeeSatellite/authz) |
|
| 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) |
|
| Gotchas | **57** | `docs/gotchas.md` (latest #57 soft-delete UNIQUE phải filter [IsDeleted]=0, S45) |
|
||||||
| User memory | 27 | + `MEMORY.md` index |
|
| User memory | **14** | 13 feedback + 1 new S46 (memory-write-verify); index rebuilt S46 (was 0-byte). "27" was stale drift |
|
||||||
| Skills | 6 | 3 domain + 3 ops |
|
| Skills | 6 | 3 domain + 3 ops |
|
||||||
| Sub-agents | **7** | Opus 4.8 1M (S39 split 4→7) |
|
| 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) |
|
| 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) |
|
||||||
@ -30,11 +30,11 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔥 In Progress (S45)
|
## 🔥 In Progress (S46)
|
||||||
|
|
||||||
| Task | Owner | Status |
|
| Task | Owner | Status |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| _(none — S45 test-gaps + Mig 43 Holiday fix SHIPPED + verified prod. Next: P11-C..F khi anh chọn — recon sẵn)_ | — | ✅ |
|
| _(none — S46 memory integrity repaired + verified 0 empty. Next: P11-C Vehicle+Driver (recon sẵn) / gotcha #57 fix / P11-D-F / Phase 9 Ops khi anh chọ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).
|
**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,12 @@
|
|||||||
|
|
||||||
## ✅ Recently Done (newest on top — 3 session; cũ hơn → session logs)
|
## ✅ Recently Done (newest on top — 3 session; cũ hơn → session logs)
|
||||||
|
|
||||||
|
### S46 (2026-06-01) — 🧹 Memory integrity repair (no code, docs-only)
|
||||||
|
- **`/session-start` audit caught 2 user-memory files at 0 bytes** (S45 close-out truncation, gotcha #53): `MEMORY.md` index + `feedback_background_spawn_visibility.md`. Empty index = S46 bootstrap chạy KHÔNG có memory auto-inject (degrade thầm lặng).
|
||||||
|
- **Repaired (👤 em main solo):** rebuilt `MEMORY.md` index (14 entries: 8 feedback + 3 project + 2 pattern) · repopulate `feedback_background_spawn_visibility` từ HANDOFF/STATUS S45 ref (marked reconstructed) · NEW `feedback_session_end_memory_write_verify` (verify byte>0 sau closeout Write). **0 empty `.md` remain** (verified `find -size 0`).
|
||||||
|
- **No production/repo code touched.** Memory files ngoài repo (`~/.claude/.../memory/`) — không git-tracked → repo unchanged từ S45 `7fbe05a`. Test gate re-confirm **181 PASS** (58+123) lúc bootstrap.
|
||||||
|
- **Residual:** STATUS "27 user memory" stale → corrected **14**. Recommend thêm verify-byte-count step vào `/session-end` skill mechanism (AI_INFRA op per charter v2) — auto-catch class lỗi này.
|
||||||
|
|
||||||
### S45 (2026-06-01) — 🧪 HRM test-gap stabilization + Holiday drift fix (Mig 43)
|
### 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.
|
- **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 (154→181):** 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).
|
- **+27 test (154→181):** 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).
|
||||||
|
|||||||
Reference in New Issue
Block a user