diff --git a/.claude/workflows/runs/2026-07-31-S164-4gd-khkk-fanout/sub-implbe-k4a.md b/.claude/workflows/runs/2026-07-31-S164-4gd-khkk-fanout/sub-implbe-k4a.md index 206783d..90ac63a 100644 --- a/.claude/workflows/runs/2026-07-31-S164-4gd-khkk-fanout/sub-implbe-k4a.md +++ b/.claude/workflows/runs/2026-07-31-S164-4gd-khkk-fanout/sub-implbe-k4a.md @@ -16,4 +16,6 @@ Bắt đầu: 2026-08-01. 0-migration. Scope: `MenuKeys.cs` + `DbInitializer.cs` - `MenuKeys.All` hiện đếm tay = **64** (khớp mốc brief) — số THẬT sẽ đo bằng runtime ở B6 - `GetMyMenuTreeQuery.cs:96` `HasAccess(n) = n.CanRead || n.Children.Any(HasAccess)` ⇒ **group-key KHÔNG cần CanRead row của chính nó** (vá-10 đúng: lý-do "group cần row để render" trong invest doc là SAI) — nhưng leaf thì CẦN - nhãn 8 nhóm đối chiếu nguồn `danh-muc-sp002-transcribe.md:22-29` → khớp 8/8 brief, N2 CÓ vế "phá dỡ" ✔ -- [ ] B2 `MenuKeys.cs` +49 key vào `All` +- [x] B2 `MenuKeys.cs` +49 key vào `All` — **CHỆCH-KHUÔN KHAI RÕ**: brief nói "+49 const", tôi làm **bộ sinh** (`KhkkGroupNumbers` + `KhkkLeafActions` + `KhkkGroup(n)`/`KhkkLeaf(n,a)` → `KhkkGroupMenuKeys` 49 phần tử) rồi `.. KhkkGroupMenuKeys` vào `All`. LÝ DO: cùng 1 bộ sinh feed CẢ 3 phía (`All` · seed menu-row · grant site-2) ⇒ khớp **by-construction**; 49 const tay = mirror 147 chuỗi ở 3 nơi, đúng loại drift làm nổ FK Permission (invariant T6 K1). Đúng đề xuất spec `sub-invest-fable-b2-cum2.md:9` ("factory mirror khuôn ContractTypeGroup"); kết quả quan sát được y hệt (49 key vào All). Khai báo ĐẶT TRƯỚC `All` vì static field initializer chạy theo thứ tự văn bản. Kèm vá-15 (2 khuôn `Ct_*`/`Pe_*` ngoài-All ⟂ Khkk/AwV2 trong-All) + ghi DELTA (+49 key/+196 policy, KHÔNG neo mốc tuyệt đối — vá-2). Build Domain riêng: **0 error / 0 warning**. +- [x] B3 `DbInitializer.cs` tree +49 row: loop đặt sau vòng `PeWf_*`, duyệt CHÍNH `MenuKeys.KhkkGroupNumbers` × `KhkkLeafActions` (group Order=n, icon `FileCheck`; 6 leaf Order 1-6 nhãn/icon MIRROR Y G1). 2 dict nhãn: `khkkGroupLabels` (8 nhãn owner-soát, N2 CÓ "phá dỡ") + `khkkLeafMeta` — thiếu nhãn ⇒ KeyNotFound **fail-fast lúc seed** thay vì FK nổ về sau. +- [ ] B4 labelBackfill +`Khkk_G1` diff --git a/.claude/workflows/runs/2026-08-01-S166-h24-deep-midsession/sub-lead-stale-deep-S166.md b/.claude/workflows/runs/2026-08-01-S166-h24-deep-midsession/sub-lead-stale-deep-S166.md index 894d4fd..67ee1dd 100644 --- a/.claude/workflows/runs/2026-08-01-S166-h24-deep-midsession/sub-lead-stale-deep-S166.md +++ b/.claude/workflows/runs/2026-08-01-S166-h24-deep-midsession/sub-lead-stale-deep-S166.md @@ -11,7 +11,7 @@ LEAD-STALE-DEEP: IN-PROGRESS | # | Nhóm bề-mặt | Trạng thái | |---|---|---| -| 1 | `docs/STATUS.md` CURRENT + bảng CURRENT STATE | PENDING | +| 1 | `docs/STATUS.md` CURRENT + bảng CURRENT STATE | DONE | | 2 | `docs/HANDOFF.md` segment mới nhất | PENDING | | 3 | `CLAUDE.md` root (bảng module/mig) | PENDING | | 4 | `.claude/agents/README.md` roster | PENDING | @@ -21,3 +21,24 @@ LEAD-STALE-DEEP: IN-PROGRESS | 8 | Dư-lượng bất-đối-xứng (mirror pairs) | PENDING | --- + +## FLAG-1 — `view-residual-asym` — HIGH + +**view:** `docs/STATUS.md:465-472` (bảng CURRENT STATE — ô CANONICAL theo B1) +**source:** `docs/STATUS.md:6` (dòng CURRENT, cùng file) + đĩa + +Wave K1→K3 (`50e6d8c`/`0779f2d`/`15349e8`, S164-S165) cập-nhật **dòng :6** đủ 5 số mới nhưng **KHÔNG chạm 1 ô nào của bảng canonical**. Một file, hai bề mặt, sửa đúng một phía. + +| Row bảng canonical | View nói (chuỗi THẬT trên đĩa) | Source đúng | Lệch | Máy có bắt? | +|---|---|---|---|---| +| `:465` Migrations | `\| Migrations \| **69** \|` | **71** (đếm đĩa `Persistence/Migrations/*.cs` trừ Designer/Snapshot = 71; mới nhất `20260731085624_AddKhkkApprovalGroupCatalogAndFinalizeRuntime.cs`) | −2 | ✅ CÓ (`canonical-itself-stale`) | +| `:466` SQL tables | `\| SQL tables \| **96** \|` | **97** (Mig 70 `AddContractCatalogEntries` = **1** `CreateTable`; Mig 71 = **0** `CreateTable`/`DropTable` ⇒ 96+1) | −1 | ❌ MÙ | +| `:470` Policies | `\| Policies \| **220** \|` | **256** (= 64 key × 4 action; `.claude/WAL.md:13` "policy=256") | −36 | ❌ MÙ | +| `:471` Menu keys | `\| Menu keys \| **55** \|` | **64** (ĐẾM PHẦN-TỬ mảng `MenuKeys.All`, `MenuKeys.cs` — **KHÔNG** dùng `grep -c "public const string"` ra **65**, bài S143/S150) | −9 | ❌ MÙ | +| `:472` Tests | `\| Tests \| **590 PASS** \| 45 Domain + 545 Infra` | **614** (45D+569I — `.claude/WAL.md:13` `suite 614/0 (45D+569I)` + `:37`) | −24 | ❌ MÙ | + +🔴 **Vì sao nguy (hơn hẳn "5 con số cũ"):** `governance-detectors.ps1` `Get-StatusValue` **resolve canonical TỪ chính bảng này** (chính row `:470` tự khai điều đó). Cross-check đĩa của máy CHỈ phủ `mig` + `gotcha` (`detectors-output.txt:4` = `disk cross-check: mig=71 gotcha=85`) ⇒ 4 trục còn lại đo bằng **thước sai** mà máy vẫn in `[ok]`. Hệ-quả đo được ngay trong lượt này: `detectors-output.txt:14` bảo `.claude/skills/ef-core-migration/SKILL.md:93` "writes **97** table but canonical=**96** → resolve: update to 96". Doc đó đang ĐÚNG (97) và máy đang đề-nghị sửa nó thành SAI. **Canonical-poison không chỉ giấu lỗi — nó chủ-động sinh lệnh sửa-ngược.** + +**resolve:** re-ground 5 ô `:465/:466/:470/:471/:472` về 71 / 97 / 256 / 64 / 614 (bao gồm sub-số `45D+569I`), rồi chạy lại detector — kỳ vọng FLAG `SKILL.md:93` biến mất và TOTAL đổi. + +---