CICD Monitor Run #193 final verify S22 chốt phát hiện em main S22 hypothesis SAI: - Em main đoán: `.claude/agent-memory/**` thiếu paths-ignore → trigger CI waste - Reality: `**/*.md` glob trong paths-ignore đã match MỌI .md file ở mọi depth — kể cả `.claude/agent-memory/{agent}/MEMORY.md` - Push `cc8a7d3` (Docs + 4 agent MEMORY) → CI correctly SKIPPED ✓ Update gotcha #47 → informational note thay vì PENDING fix. Preventive: nếu tương lai add non-.md state files vào .claude/agent-memory/ (archive.json / metrics.log) → cần add `.claude/agent-memory/**` explicit. Hiện tại KHÔNG cần fix .gitea/workflows/deploy.yml. Lesson: verify hypothesis qua Gitea API task list TRƯỚC khi claim CI waste. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -742,29 +742,33 @@ File LastWriteTime VPS = thực sự deploy completion time (NSSM copy + IIS rec
|
||||
- Khi setup automation script với Gitea API → đọc rõ Gitea API spec v1.20+ (`https://docs.gitea.com/api/`) thay vì assume GitHub naming.
|
||||
- Time-sensitive verify (vd "deploy xong chưa, có an toàn trigger task tiếp không"): KHÔNG trust API status timestamp đơn lẻ → cross với VPS file mtime hoặc curl bundle hash live.
|
||||
|
||||
### 47. `.claude/agent-memory/**` thiếu trong `paths-ignore` filter (CICD waste 3.5min per MEMORY flush) (S22 discovery)
|
||||
### 47. `.claude/agent-memory/**` paths-ignore — hypothesis disproven, preventive note cho non-.md state files (S22 discovery + S22 chốt revise)
|
||||
|
||||
**Triệu chứng:** Cuối session em main flush 3-4 sub-agent MEMORY.md drift patch + commit dạng `[CLAUDE] Docs: chốt S22 ...` — push remote → **Gitea Actions trigger full deploy ~3.5min** dù không có thay đổi BE/FE code. CICD waste ~12K token / run × N session.
|
||||
**Triệu chứng ban đầu (em main HYPOTHESIS S22):** Cuối session flush 3-4 sub-agent MEMORY.md drift patch + commit dạng `[CLAUDE] Docs: chốt S22 ...` — em main đoán push trigger Gitea Actions full deploy ~3.5min waste vì `.claude/agent-memory/**` thiếu trong paths-ignore.
|
||||
|
||||
**Root cause:** `.gitea/workflows/deploy.yml` `paths-ignore` chỉ có `['docs/**', '**/*.md', '.claude/skills/**']` — KHÔNG bao gồm `.claude/agent-memory/**`. Mỗi MEMORY.md drift commit (end-of-session flush + cross-session sync) trigger full CI pipeline → test gate Domain 58 + Infra 46 + build BE + build FE × 2 + deploy NSSM/IIS.
|
||||
**Verify thực tế (CICD Monitor Run #193 S22 chốt — 2026-05-13 23:16):**
|
||||
|
||||
**Discovery:** S22 CICD Monitor Run #188 self-discovery khi verify push `a74e671` (Docs + 3 agent MEMORY drift patch) — confirmed trigger Run dù không có code change.
|
||||
Hypothesis **DISPROVEN**. `paths-ignore` của workflow file đã có pattern `**/*.md` — glob này match **mọi `.md` file ở mọi độ sâu** (kể cả `.claude/agent-memory/{investigator,implementer,reviewer,cicd-monitor}/MEMORY.md`).
|
||||
|
||||
Push `cc8a7d3` (Docs S22 chốt + 4 agent MEMORY flush, 8 files tất cả là `.md`) → CI **correctly SKIPPED**. Run #193 cuối cùng cho code change là `b04a11a` (Mig 30 BE+FE), KHÔNG phải `cc8a7d3` Docs.
|
||||
|
||||
**Cross-check:** `git show --name-only cc8a7d3` → 8 files với extension `.md` only → match `**/*.md` glob → SKIPPED đúng.
|
||||
|
||||
**Preventive note cho future:** Nếu tương lai add **non-`.md` state files** vào `.claude/agent-memory/` (vd `archive.json`, `metrics.log`, `cache.bin`) — sẽ trigger CI vì KHÔNG match `**/*.md`. Khi đó add `.claude/agent-memory/**` vào paths-ignore explicit:
|
||||
|
||||
**Fix recommended (PENDING bro confirm):** Edit `.gitea/workflows/deploy.yml`:
|
||||
```yaml
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
- '.claude/skills/**'
|
||||
- '.claude/agent-memory/**' # ← ADD: prevent end-of-session MEMORY flush trigger deploy
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**/*.md'
|
||||
- '.claude/skills/**'
|
||||
- '.claude/agent-memory/**' # ← preventive nếu add non-.md state files
|
||||
```
|
||||
|
||||
**Severity:** Minor (CI waste only, no functional impact). Em main KHÔNG tự edit `.gitea/workflows/` — flag bro decide.
|
||||
**Severity:** Informational (hiện tại KHÔNG có vấn đề thật vì all MEMORY files là `.md`). KHÔNG cần fix `.gitea/workflows/deploy.yml`.
|
||||
|
||||
**Cross-ref:** Gotcha #41 paths-ignore docs-only skip (S5 prior). Pattern: bất kỳ file `**/MEMORY.md` hoặc tooling state files KHÔNG nên trigger code deploy.
|
||||
**Cross-ref:** Gotcha #41 paths-ignore docs-only skip pattern.
|
||||
|
||||
**Lesson:** Verify hypothesis qua actual Gitea API task list TRƯỚC KHI claim CI waste. Em main S22 đoán nhầm — CICD Monitor catch sai.
|
||||
|
||||
**References:**
|
||||
- CICD Monitor Run #186 (S21 t4 2026-05-13 19:13) — first discovery
|
||||
|
||||
Reference in New Issue
Block a user