[CLAUDE] Docs: Chunk G — K8 Plan K wrap S23 t1: docs + session log + Designer comment cleanup + 3 agent MEMORY drift
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m30s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m30s
Plan K Mig 31 F2 refactor sang per-Approver-slot DONE — 8 commits cumulative S23 t1 (`56868bf..<this>`). K8 wrap docs + dirty MEMORY.md commit: Docs updates: - docs/STATUS.md: Last updated S23 t1 entry với Plan K summary 8 chunk - docs/HANDOFF.md: TL;DR S23 t1 đầy đủ (top) — multi-agent ROI evidence - docs/database/schema-diagram.md §14: title Mig 22-31 (was 22-29) + add Mig 30 F4 + Mig 31 F2 blocks per slot Approver + DROP Users column note - NEW docs/changelog/sessions/2026-05-14-s23-turn1-plan-k-mig31-f2-refactor.md session log đầy đủ 8 chunk timeline + multi-agent spawn cost table + pattern reinforced 3× FE Admin Designer comment cleanup (Reviewer K2 follow-up): - ApprovalWorkflowsV2Page.tsx lines 73-75 + 502-504: 2 stale narratives "F2 AllowDrafterSkipToFinal xuống per User (User Management)" rewrite Mig 29+30+31 cumulative narrative "7 Allow* ALL xuống per Level slot, pattern proven 3×" 3 agent MEMORY.md drift commit (dirty từ session start S23 + S22 chốt): - Investigator: K0 pre-flight findings + 5 surprises catch - Reviewer: K2 PASS report + new pattern "transient sentinel zombie" anti-pattern - CICD Monitor: S22 chốt verify cumulative (Run #193 + S23 t1 pending K9 spawn) User-level memory updates (cross-project diary persisted ngoài repo): - feedback_per_nv_permission_scope.md: reinforcement S23 t1 — Pattern 3× cumulative (Mig 29 + Mig 30 + Mig 31). Pattern ALSO applies cho refactor existing scope, KHÔNG chỉ greenfield. Cross-ref discoveries Plan K (compile-break workaround, stale narrative drift, transient sentinel zombie anti-pattern caught Reviewer). - MEMORY.md index: cumulative reinforcement note 3× Mig 31 Verify: - dotnet build production projects clean - npm run build fe-admin pass 17.76s, 0 TS err - Test 104/104 PASS (S23 t1 K7 chunk maintained baseline) Plan K state final: 31 mig · 59 tables · ~145 endpoints · 104 test · 47 gotcha · 20 memory · 6 skills · 4 sub-agents active. CHƯA push remote — chờ bro confirm K9 spawn CICD Monitor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -715,14 +715,15 @@ CREATE TABLE PurchaseEvaluationDepartmentOpinions (
|
||||
CREATE UNIQUE INDEX IX_PEDeptOpinions_PEId_Kind ON PurchaseEvaluationDepartmentOpinions (PurchaseEvaluationId, Kind);
|
||||
```
|
||||
|
||||
## 14. ApprovalWorkflow V2 schema (Migration 22-29, Session 17-21 — 3 bảng mới + 5 column Level + 1 column User)
|
||||
## 14. ApprovalWorkflow V2 schema (Migration 22-31, Session 17-23 — 3 bảng mới + 7 Allow* options per slot Approver)
|
||||
|
||||
Schema riêng song song WorkflowDefinition V1 (Mig 21) — pin per phiếu PE.
|
||||
V1 vẫn giữ cho phiếu cũ; V2 mới là active cho phiếu tạo từ Session 17 trở đi.
|
||||
|
||||
Mig 29 (S21 t5) — Refactor 6 Allow* options từ workflow-level (Mig 28 S21 t4)
|
||||
sang PER-NV: 5 flag F1+F3 xuống Level slot (Approver), 1 flag F2 xuống User
|
||||
(per-Drafter). Backfill bulk SQL preserve admin config S21 t4.
|
||||
**Pattern cumulative cho admin opt-in flag per slot — proven 3× (memory `feedback_per_nv_permission_scope.md`):**
|
||||
- Mig 29 (S21 t5) — Refactor 6 Allow* options từ workflow-level (Mig 28 S21 t4) sang PER-NV: 5 flag F1+F3 xuống Level slot, 1 flag F2 xuống User. Backfill bulk SQL preserve admin config S21 t4.
|
||||
- Mig 30 (S22+5) — F4 `AllowApproverEditBudget` per slot Approver — admin tick cho NV chỉnh Section "Điều chỉnh ngân sách" khi đang duyệt.
|
||||
- Mig 31 (S23 t1) — F2 refactor sang Approver scope: ADD `AllowApproverSkipToFinal` per Level slot, DROP `Users.AllowDrafterSkipToFinal`. Semantic cũ Drafter-from-Nháp deprecated. **NO BACKFILL** (4 prod user lose flag value — admin re-config qua Designer).
|
||||
|
||||
### Core (3 bảng):
|
||||
|
||||
@ -751,12 +752,18 @@ ApprovalWorkflowLevels (FK Cascade ApprovalWorkflowStepId, FK Restrict Approver
|
||||
├── AllowReturnToDrafter bit DEFAULT 1 — F1 mode: Trả về Drafter (S17 backward compat)
|
||||
├── AllowApproverEditDetails bit DEFAULT 0 — F3: NV này chỉnh Section 2 lúc đang duyệt
|
||||
│
|
||||
├── Mig 30 (S22+5) — F4 admin opt-in per slot:
|
||||
├── AllowApproverEditBudget bit DEFAULT 0 — F4: NV này chỉnh Section "Điều chỉnh ngân sách"
|
||||
│
|
||||
├── Mig 31 (S23 t1) — F2 refactor admin opt-in per slot:
|
||||
├── AllowApproverSkipToFinal bit DEFAULT 0 — F2: NV này duyệt thẳng Cấp cuối (skip trung gian)
|
||||
│ (storage cũ Users.AllowDrafterSkipToFinal đã DROP)
|
||||
│
|
||||
└── INDEX (ApprovalWorkflowStepId, Order) + INDEX ApproverUserId
|
||||
|
||||
Users (AspNetUsers extension)
|
||||
├── ... existing columns (FullName, DepartmentId, PositionLevel, CanBypassReview, etc)
|
||||
└── Mig 29 (S21 t5) — F2 per-Drafter:
|
||||
AllowDrafterSkipToFinal bit DEFAULT 0 — User được Drafter gửi PE thẳng Cấp cuối
|
||||
└── (Mig 29 AllowDrafterSkipToFinal column đã DROP trong Mig 31 — F2 refactor sang Approver scope)
|
||||
```
|
||||
|
||||
**Convention quan trọng:** nhiều `ApprovalWorkflowLevel` rows cùng `Order` trong cùng Step = **same Cấp với N approvers** (OR-of-N). Ví dụ Cấp 1 có 2 NV: 2 row Level cùng `Order=1` khác `ApproverUserId`.
|
||||
|
||||
Reference in New Issue
Block a user