[CLAUDE] Infra: Plan B Hotfix CICD — SeedSampleContractWorkflowV2 OUT of DemoSeed gate
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m32s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m32s
CICD Monitor post-deploy verify (Run #231 SUCCESS) caught CRITICAL: SeedSampleContractWorkflowV2Async nested inside `if (!demoSeedDisabled)` branch → prod has DemoSeed:Disabled=true (Plan T S23 t10) → seed SKIP → QT-HD-V2-001 KHÔNG tồn tại prod → Drafter Workspace dropdown V2 EMPTY → V2 contract path BLOCKED end-to-end UAT. Fix: PROMOTE SeedSampleContractWorkflowV2 ra ngoài DemoSeed gate. Lý do architectural: - Sample workflow là INFRASTRUCTURE config (như Roles + Departments + Catalogs) - KHÔNG phải demo data wipeable - Production cần để Drafter create V2 contract - Admin có thể edit/delete/disable qua Designer sau seed (idempotent skip) Pattern lesson reusable cross-project: phân biệt INFRASTRUCTURE seed (always run) vs DEMO seed (gated by flag). Bảng phân loại: - INFRASTRUCTURE always: Roles, Departments, Catalogs, MenuTree, AdminPerms, Templates - DEMO gated: DemoUsers (30 sample, Plan T disabled prod), DemoContracts, DemoPE, SampleWorkflows - INFRASTRUCTURE NEW post-S29: SampleContractWorkflowV2 (cần cho V2 path work) Verify: - dotnet build PASS 0 err - Mig 32 + Mig 33 prod đã apply (Run #231 success) - Sample seed sẽ chạy on next IIS recycle post-push - Idempotent: skip nếu QT-HD-V2-001 already exists (rare race admin tự seed Designer trước) Post-deploy expect: - ApprovalWorkflows table +1 row Code=QT-HD-V2-001 ApplicableType=3 IsActive=1 IsUserSelectable=1 - Drafter login fe-user → /contracts/new → Workspace dropdown "Quy trình duyệt V2" có 1 option CICD Monitor ROI: caught BEFORE bro UAT 401/empty dropdown experience. Smart Friend guard pattern proven 4× cumulative S22 #44 + S25 #48 + S29 Plan B Reviewer ApplicableType + S29 Plan B CICD DemoSeed gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -107,9 +107,18 @@ public static class DbInitializer
|
||||
await SeedDemoContractsAsync(db, userManager, codeGen, logger);
|
||||
await SeedDemoPurchaseEvaluationsAsync(db, userManager, logger);
|
||||
await SeedSampleApprovalWorkflowsV2Async(db, userManager, logger);
|
||||
await SeedSampleContractWorkflowV2Async(db, userManager, logger);
|
||||
}
|
||||
|
||||
// [Plan B S29 2026-05-22 Hotfix CICD] SeedSampleContractWorkflowV2Async
|
||||
// PROMOTED ra ngoài DemoSeed gate — đây là INFRASTRUCTURE workflow
|
||||
// (như Roles + Departments + Catalogs), KHÔNG phải demo data wipeable.
|
||||
// Production cần workflow V2 mẫu để Drafter create V2 contract end-to-end
|
||||
// (Workspace dropdown filter ApplicableType=3 + IsUserSelectable=true).
|
||||
// CICD Monitor S29 Plan B caught: nested inside gate → skip prod → V2
|
||||
// path BLOCKED. Admin có thể edit/delete/disable qua Designer sau seed.
|
||||
// Idempotent: skip nếu workflow QT-HD-V2-001 đã tồn tại.
|
||||
await SeedSampleContractWorkflowV2Async(db, userManager, logger);
|
||||
|
||||
await WarnDefaultAdminPasswordAsync(userManager, logger);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user