[CLAUDE] Docs: flush session-start hot-feed cap v3 (220/60/50) + commit S83 cicd harvest-orphan (S84)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -21,7 +21,8 @@ Read-only CI/CD + post-deploy verifier SOLUTION_ERP. Polls Gitea Actions API, ve
|
||||
- **#48 SQLite tie-break** — `OrderByDescending(CreatedAt).First()` pick wrong khi 2+ `.Add()` cùng frozen-clock. Fix: discriminator filter BEFORE OrderBy.
|
||||
- **Bundle hash unchanged = ship FAIL** — push+action success nhưng prod không đổi. Verify via INDEX.HTML ref (`curl -s https://admin.solutions.com.vn/ | grep -oE '/assets/index-[A-Za-z0-9_-]+\.(js|css)'`), NOT by GETting a hash-named asset directly. ⚠️ verify MUST sau status=success (Run #242 false-positive: check khi "running" → stale hash).
|
||||
- **🔴 #69 (S72 Run #312) — FE bundle hash NON-DETERMINISTIC per rebuild.** `deploy.yml` `Remove-Item fe-*\* -Exclude web.config` + `Copy-Item dist\*` runs UNCONDITIONALLY every run (path-filter gates whole-workflow trigger, NOT per-step). Identical FE source ⟹ DIFFERENT hash each deploy (Vite/rolldown non-reproducible chunk-id). PROVEN: governance-only `18fced6` (0 files in fe-*/src) rotated BOTH bundles. ⟹ "BE-only/governance ⟹ bundle frozen" is FALSE; rotation EXPECTED every deploy. **To detect REAL FE change, diff `fe-*/src` in commit/range, NOT hash delta.**
|
||||
- **⚠️ SPA-fallback 200 trap (S72):** server rewrites `/*`→`/index.html` so GET `/assets/index-<ANYTHING>.js` returns **200** even for fake hash (control `ZZdoesnotexist0.js`→200). Old-hash-still-200 MEANINGLESS. RELIABLE signal = parse index.html `<script src>`, GET that exact path + check `size_download` LARGE (real ~1.6MB vs fake ~919b) + `Last-Modified` in deploy window + 2nd-fetch byte-stable (no mid-deploy transient).
|
||||
- **⚠️ SPA-fallback 200 trap (S72):** server rewrites `/*`→`/index.html` so GET `/assets/index-<ANYTHING>.js` returns **200** even for fake hash (control `ZZdoesnotexist0.js`→200, size~919b text/html). Old-hash-still-200 MEANINGLESS. RELIABLE signal = parse index.html `<script src>`, GET that exact path + check `size_download` LARGE (real ~1.6MB vs fake ~919b) + `Last-Modified` in deploy window + 2nd-fetch byte-stable (no mid-deploy transient).
|
||||
- **🟢 #69-REFINE (S83 Run #333) — hash can stay IDENTICAL across deploy when fe-*/src 0-change.** #69 said "rotates EVERY deploy" — NOT absolute. Run #333 (BE+tests+governance, ZERO `fe-*/src` diff) shipped FE (Last-Modified 17:10:35/17:11:27 BOTH in run-window 17:06→17:11) but hash UNCHANGED (admin `CsJetgZH`/user `BVS0ApIm` = #330 baseline). ⟹ identical Vite source ⟹ byte-identical output ⟹ same content-hash. Rolldown chunk-id apparently MORE deterministic than #69 feared (or only rotates on real src delta). **MOST RELIABLE ship-proof = `Last-Modified` header on the real bundle file IN deploy-window, NOT hash-delta** (hash-delta has false-NEGATIVE when src unchanged + false-POSITIVE risk noted in #69). Always cross-ref `git diff fe-*/src` scope: 0-FE-change ⟹ expect SAME hash + fresh Last-Modified.
|
||||
- **Migration drift prod vs repo** — compare `ls .../Persistence/Migrations/*.cs` vs `sqlcmd __EFMigrationsHistory`. Fix: check `Program.cs`/DbInitializer `app.MigrateDatabase()` + app pool recycle. Mig-applied proof = `__EFMigrationsHistory` top==repo-HEAD; stuck-old ⟹ pool didn't recycle ⟹ FAIL even if status=success+bundle-rotated.
|
||||
|
||||
---
|
||||
@ -69,6 +70,7 @@ BE (test+build) ~90s · FE × 2 ~60s/app · deploy ~30s · **total ~3min code /
|
||||
|
||||
## 📅 Recent runs (compressed — full verbatim → `archive/2026-06.md` via `archive/_INDEX.md`)
|
||||
|
||||
- **S83 #333 `fc1f19d` PASS ~4m59s** — BE-only PE-guard (require ApprovalWorkflowId V2 at create-validator + submit-branch ConflictException; close FE-only-validation gap → phiếu reached "Đã gửi duyệt" w/ null workflow = V1-legacy-banner trap). +2 validator tests → **test 356** (gate=success ⟹ pass). NO-mig (frozen 57, prod head `AddPeSuggestedPriceNotes`==repo, no-pending) + ZERO fe-*/src diff. **Bundle hash UNCHANGED (admin `CsJetgZH`/user `BVS0ApIm` = #330) BUT shipped — Last-Modified 17:10:35/17:11:27 in-window** (real js 1.62/1.52MB vs SPA-trap 919b) → **gotcha #69-REFINE: 0-FE-src ⟹ byte-identical ⟹ same-hash; Last-Modified is true ship-proof.** Guard BE-only no-endpoint → no curl-probe (356 tests cover RED→GREEN). Health api/ready+live 200, admin/eoffice 200, api-root 404 (no `/` route, expected).
|
||||
- **S78 #330 `7886fd0` PASS ~4m56s** — cross-stack NO-MIG enum `ApprovalAttachment=5` (attach-on-approve) + FE 2-app PeWorkflowPanel modal-upload. Verified: empty-migrations-diff + Mig-frozen-57 + tables88 + bundle BOTH rotate js+css (real 1.6/1.5MB vs fake-919b) + endpoint bodyless-POST-411→re-probe-body-401-wired + health 4×200. → _INDEX.
|
||||
- **S76 #318 `e33481e` PASS ~4m58s** — full-stack Mig56 ProInitial/ProAdjust VERIFIED-APPLIED-PROD (sys.columns decimal(18,2)) + **5th-axis BACKFILL-verify** 4-rows-0-violation (gotcha #64 prod-data-UPDATE-first-time) + history-advance-55→56 + tables88 + bundle BOTH+css rotate + health 4×200. Pre-deploy DB snapshot (Mig55) → post (Mig56) = unambiguous proof. → _INDEX.
|
||||
- **S83 #325 `e29391e` PASS ~4m39s** — FE-only tiny budget-subitem indent/dash + bundle BOTH-js-rotate css-FROZEN (utility-reuse, no new css chunk) + Mig-frozen-57 + tables88 + test351. → _INDEX.
|
||||
|
||||
@ -111,7 +111,7 @@ Em main xác nhận **lead model resolve được** đầu session. Lead SE = **
|
||||
|
||||
> Floor H15-v2 (🔴 [`harness-11-engine.md §G.4`](../../docs/governance/harness-11-engine.md)): Tầng-1 = HOT-FEED LỚN → cần "kính soi" để anh thấy phần luôn-nạp đang chứa gì, bucket nào mỏng, còn trống bao nhiêu → anh quyết điều-chỉnh. 🔴 **Ranh-giới vai-trò:** con-số = **quyền anh (chủ-dự-án)**; em-main chỉ THỰC-THI-đúng-số + BÁO-% (KHÔNG tự-tinh-chỉnh con-số).
|
||||
|
||||
- **In ở Phase 3 REPORT (đầu phiên):** ước-lượng composition Tầng-1 theo **% / 4 bucket** (tỉ-lệ đủ, KHÔNG cần đo chính-xác): (1) WIP work-state · (2) lỗi-lặp/anti-pattern/gotcha · (3) tồn-đọng · (4) quyết-định-chờ. + **Headroom** = phần còn-trống so cap role (`memory-budget.json:token_governor.tier1_hotfeed_tokens` — lead ~60K · agent-ký-ức ~20K · agent-workflow ~16K).
|
||||
- **In ở Phase 3 REPORT (đầu phiên):** ước-lượng composition Tầng-1 theo **% / 4 bucket** (tỉ-lệ đủ, KHÔNG cần đo chính-xác): (1) WIP work-state · (2) lỗi-lặp/anti-pattern/gotcha · (3) tồn-đọng · (4) quyết-định-chờ. + **Headroom** = phần còn-trống so cap role (`memory-budget.json:token_governor.tier1_hotfeed_tokens` — lead 220K · mem-sub (agent-ký-ức) 60K · wf-sub (agent-workflow) 50K; **v3 S83 full AI_INFRA parity**, canonical = budget.json → đọc số sống ở đó, đừng tin echo này khi anh đổi cap).
|
||||
- 🔴 **Headroom > 0 mà CÒN nội-dung giá-trị-cao chưa nạp = under-fill (SAI)** → nạp tiếp tới khi đầy hoặc cạn nội-dung giá-trị-cao. Headroom = cờ-báo, KHÔNG phải đích-tiết-kiệm; **nạp-đầy ≠ nhồi-rác** (giá-trị-thấp KHÔNG vào Tầng-1).
|
||||
- **Light/hỏi-đáp → gọn 1 dòng; feature/bug/governance → in đủ 4-bucket %.** Đối-xứng `session-end §L.b(c)` (% cuối phiên + Headroom).
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,41 @@
|
||||
# S84 (2026-06-22) — Session-start hot-feed cap flush v3 + commit S83 cicd harvest-orphan
|
||||
|
||||
> **Phiên LIGHT — em-main hygiene, 0 production code.** Bootstrap `/session-start` → 2 monitor INFORM bắt 2 drift → flush + commit → `/session-end`.
|
||||
|
||||
## Anh
|
||||
`/session-start` → (sau Phase 3 report) chỉ `session-start.md:114` flush → **"Sao ko add vào session-start luôn?"** → **"Làm cho xong đi rồi session-end luôn nhé."**
|
||||
|
||||
## Done
|
||||
|
||||
### 1. Flush `session-start.md:114` cap-echo (H1 catch)
|
||||
- §2.1.6 hot-feed %-print còn ghi cap CŨ `lead ~60K · agent-ký-ức ~20K · agent-workflow ~16K` = số **S82 self-shrink**, trong khi budget v3 (S83 owner-directive) đã set **220K/60K/50K** ở `memory-budget.json` + `engine §G.5` + `agents/README:65`. `session-start.md` là file DUY NHẤT còn echo số cũ — `session-end.md §L.b(c)` sạch (trỏ pointer `token_governor.tier1_hotfeed_tokens`, 0 số cứng).
|
||||
- Fix: echo → `lead 220K · mem-sub 60K · wf-sub 50K; v3 S83 full AI_INFRA parity, canonical = budget.json → đọc số sống ở đó, đừng tin echo này khi anh đổi cap`.
|
||||
- **Chống tái-drift:** detector C2 KHÔNG track cap-number (chỉ mig/test/gotcha/table) → echo-trần sẽ lệch âm-thầm lần đổi cap sau. Câu "đọc canonical" tự-nhắc thay cho detector. (Tự-mâu-thuẫn cũ làm méo chính %-print Headroom của lệnh session-start.)
|
||||
|
||||
### 2. Commit `cicd-monitor/MEMORY.md` harvest-orphan (H2 catch)
|
||||
- Delta S83 hợp-lệ: 1 run entry `S83 #333 fc1f19d PASS` + gotcha **#69-REFINE** (bundle hash GIỮ-NGUYÊN khi 0 `fe-*/src` đổi → ship-proof THẬT = `Last-Modified` in-window, KHÔNG hash-delta; tinh chỉnh #69 "rotate every deploy") + 1 lossless edit (thêm `size~919b text/html` cho dòng SPA-fallback).
|
||||
- **Attribution:** mtime 17:14:55 < closeout `f71654f` 17:23:59 → viết lúc cicd verify Run #333 nhưng bundle S83 chỉ stage STATUS/HANDOFF/log → sót. Cùng class "code committed, memory left behind".
|
||||
- **Fidelity ground-truthed TRUE** (`fc1f19d` FE-src empty · Mig 57 · touched 2 test file · test 356). Additive, đã trên disk → **commit as-is**, KHÔNG revert/re-append (idempotent).
|
||||
|
||||
## Lesson (`feedback_derived_flush_execution`)
|
||||
Monitor INFORM-only proposal về **derived→canonical flush** (echo lại số/spec canonical anh ĐÃ owner-set) = em-main **EXECUTION** (B3 VERIFY→APPEND = verify-rồi-**LÀM**), KHÔNG gate user-confirm. Em lỡ "offer" vì gộp nhầm "INFORM-only" (ràng-buộc SUB propose) với "cần anh duyệt". Phân-định theo H-15 role-boundary: **ĐỔI con-số / policy / authority** = quyền anh (chủ-dự-án) → report-before + confirm; **flush doc khớp số anh đã set** (one-direction-lock canonical→derived D8) = em-main tự làm, báo sau.
|
||||
|
||||
## §L closeout
|
||||
- **§L.a:** 0 RCA (no action-signature AS-1..9 hit; flush user-directed, không bug-production).
|
||||
- **§L.b(c):** archive-gate DRY-RUN — frontend-designer 26129B + test-specialist 27723B = WATCH strike-1 (<2, no-action; test-spec value-protect FLAG `gotcha #`/`guard` → GIỮ-L1 bất-kể tuổi). A7 GATE PASS 217/217 (pointer-resolve 0 fail). sleep-check: `last_sleep_at` 2026-06-18 = 4d <7 → skip. Hot-feed %-print → xem session-end report.
|
||||
- **§L.b(d) spawn-record (2 monitor, INFORM-only):** 🟫 H1 tooling-auditor = nấc **verified** (4-mặt freshness + bắt session-start:114 stale, disk-evidence mtime-cross-check) · ⬜ H2 harvest-curator = nấc **verified** (0 orphan-run/14 closed + cicd-orphan ground-truth git-evidence, 5-trục PASS).
|
||||
- **§L.b(f) harvest-GATE:** 0 orphan-run (`runs/` 14 folder 06-18 đều CLOSED). cicd-orphan = idempotent (đã disk, chỉ commit). 5-trục PASS.
|
||||
- **§L.b(g) H1 tooling-CHỐT:** new-alloc = none. Carry stale-cite **deferred-monthly 2026-07-01**: `ef-core-migration/SKILL.md` Mig56→57 ×2 + `skills/README:20` Mig55→57 + `docs/CLAUDE.md:6` Budget-module-removed (root CLAUDE.md đã strike-through, docs/ chưa).
|
||||
- **§L.b(h) User-Mark:** n-a (chỉ hiển-thị 4 Active-High; 0 governance-decision MỚI — flush = execution, KHÔNG đổi canonical-rule/authority).
|
||||
|
||||
## State (GIỮ NGUYÊN)
|
||||
Mig 57 · 88 bảng · 356 test · gotcha 71 · menu 54 · bundle admin `CsJetgZH` / user `BVS0ApIm` (Run #333).
|
||||
|
||||
## 🔴 NEXT
|
||||
- **Anh:** ⚠️ **restart CLI** (command `.md` no hot-reload → %-print runtime ăn cap đúng 220/60/50; config JSON đã sống).
|
||||
- **Em (carry):** FD 26.1KB + test-spec 27.7KB WATCH strike-1 (curate khi qua soft-cap 30.7KB hoặc strike-2). **Monthly 2026-07-01:** ef-core SKILL Mig→57 + skills/README + docs/CLAUDE Budget-removed + STATUS/HANDOFF re-tier + 3 vocab-fork alias-map + #69-REFINE fold gotcha canonical.
|
||||
- **Pending product:** Ngưỡng giá CEO (Mig 54) Designer UAT · "C" chuyển phiếu→dự án chờ spec form · FE proactive guard (disable submit phiếu null-workflow) = offered S83, chờ anh.
|
||||
- **Ops S58/S59:** tzutil VPS UTC+7 · email typo anh Chương · 5 real-staff pw · gán phòng CNTT.
|
||||
|
||||
## Infra-adoption
|
||||
N/A — phiên này KHÔNG adopt infra mới; chỉ flush derived-doc cho khớp H-15 v3 đã adopt S83.
|
||||
Reference in New Issue
Block a user