# CI/CD Monitor Agent — Archive Recent Runs Q2 2026-05 (Plan B detail)

> **Archived:** 2026-05-26 S32 em main proxy curate session (post-S31 RAG fix).
> **Scope:** 1 verbose Run #231 entry (Plan B Contract V2 wire kick-off PARTIAL) — moved from MEMORY.md để giữ slim < 25KB threshold (was 27KB → target ~24KB).
> **Rule §6.5 compliance:** KHÔNG cắt narrative — full verbose entry preserved cho cross-session audit.
> **KEEP in MEMORY:** S32 startup, S29 wrap summary (Run #229-#232 cumulative aggregate including #231 + #232 hotfix DemoSeed gate catch), S28 Layer A governance, S27 hot-reload pitfall, S22 curate session, Run #215+#216 pair (gotcha #48 critical lesson), 2026-05-12 setup. Foundation 10-surface-point per-NV checklist preserved.

---

## Archive entries (FIFO chronological — earliest first)

### 2026-05-22 12:54-12:58 — Run #231 (id=345) Plan B Contract V2 wire kick-off VERDICT=PARTIAL (PASS deploy + PARTIAL seed)

Push range `6eec8d7..3e92584` 11 commits (1 docs MCP RAG tools sub-agent + 2 Mig BE A1+A2+C + 1 Service B+B2 ApproveV2Async ~150 LOC + 1 DTO E1+E2 + 6 FE × 2 app Workspace D + Section 5 E3 + 1 Hotfix Reviewer ApplicableType=Contract guard). CI status=success duration **3m30s** (12:54:24→12:57:54). **Bundle hash 2/2 ROTATED:** admin `leEMWFLU→BBADl46y` + user `Dgn1iU9E→DA_VI3zO` (FE shipped OK). **Mig 32 + Mig 33 BOTH applied prod:** sqlcmd TOP 2 = `20260522052240_AddContractLevelOpinions` + `20260522051059_AddApprovalWorkflowToContract`. **Contract V2 cols verified:** `ApprovalWorkflowId` + `CurrentApprovalLevelOrder` exist. **ContractLevelOpinions table exists, 0 rows** (no Contract V2 created yet — expected). **API health 200 + 5/5 smoke 200** (contracts/PE/menus/AW-v2 filter / AW-v2 all). **V1 backward compat OK:** 7 contracts V1 preserved untouched.

**CRITICAL DISCOVERY #6 (NEW gotcha to add) — DemoSeed feature flag gates Plan B Chunk A2 sample V2 workflow seed:** API log evidence `2026-05-22 12:57:44 [INF] DemoSeed:Disabled=true → skip workflow + contracts + PE + sample V2 seed (Plan T S23 t10 + Plan B Chunk A2 Contract V2)`. Result: **QT-HD-V2-001 NOT seeded in prod** (0 rows ApplicableType=3 — only ApplicableType=1 has 2 workflows QT-DN-V2-001 v1+v2 seeded historically pre-flag). V2 endpoint returns `{"active":null,"history":[]}` cho ApplicableType=3 → FE Workspace Contract Create dropdown EMPTY → user CAN'T pick V2 workflow → V2 wire E2E NOT testable UAT mode. **Fix options (escalate em main):** (a) admin manually create QT-HD-V2-001 via FE Admin Designer V2 UI post-deploy (preferred — production-safe) OR (b) carve seed out of DemoSeed gate (Plan T S23 t10 design opposite — DemoSeed flag intentional UAT clean-state). Decision NOT for CICD Monitor — escalating.

**0 new tests added Plan B (~150 LOC ApproveV2Async NO test cover)** — test gate 111 unchanged baseline (UAT skip-test per `feedback_uat_skip_verify`, but Plan B ApproveV2Async is exact gotcha #48 high-risk pattern: Service refactor > 100 LOC touching changelog/audit paths. Recommend Plan B+1 test addition next chunk before scaling).

**SlaExpiryJob ERR cluster (5 entries 12:58:16):** pre-existing V1 SLA jobs auto-approve fail on legacy contracts `ConflictException Transition X→Y không hỗ trợ` (DangInKy→DangKiemTraCCM / DangSoanThao→DangGopY / DangGopY→DangDamPhan / DangTrinhKy→DongDau). **UNRELATED to Plan B** (V1 phase enum transitions, no V2 involvement). Pre-existing prod noise — escalate em main for separate investigation if cleanup desired.

**0 regression observed prod.** Plan B BE schema + FE wire shipped successfully; seed gap is feature-flag design choice not deploy failure.

**Resolution:** Run #232 sha=`38f1c4d` Hotfix CICD — `SeedSampleContractWorkflowV2` carved out of DemoSeed gate (option B). Gotcha #51 added to docs/gotchas.md cumulative.
