diff --git a/.claude/WAL.md b/.claude/WAL.md index 66e45fd..3480e9a 100644 --- a/.claude/WAL.md +++ b/.claude/WAL.md @@ -1,20 +1,9 @@ # WAL — auto-generated, không sửa tay updated: 2026-07-12 | session: S113 | branch: main -goal: Supplier import v2 (anh Kiệt) — R1 đọc file thật + R2 nút "Tải file mẫu" + R3 bước nhập Mã NCC thủ công sau upload + R4 thiếu Mã NCC→draft/ẩn không public + R5 dedup theo MST(c12) + R6 không MST&không Mã NCC→không public + R7 badge Public/ẩn trên list. Flow: fable-clone invest→spec→anh chốt→HMW Opus implement. +goal: (trống — không có mạch dở; S113 Supplier import v2 SHIP PROD Run #497 PASS + committed 5fa11b5 + closeout done: STATUS/HANDOFF/gotcha#80/ef-core-skill Mig64/WAL-reset) chain: -[x] đọc cấu trúc file thật Data base-1_7_2027.xlsx (Sheet1, header ROW 4, 30 cột, MST=c12, TÊN VIẾT TẮT=c4→Code, 4 NCC) -[x] fable-clone invest ensemble 5 lane (wf_e7896ca6-901) — 4/5 structured + lane visibility garble#53 → em-main-solo recover -[x] synthesize → ghi spec-file 3-mục (runs/2026-07-12-S113-supplier-import-v2-invest/spec-supplier-import-v2-12-07-2026.md) + 30 token thật extract -[x] anh Kiệt CHỐT: D1=A(Mã NCC=Code) · D2(Code=cổng public, MST=cảnh-báo-mềm, existing-public giữ, import-scope) · D3(nới quyền cập-nhật-danh-mục, không admin-only) → spec §DECISIONS updated -[x] FE (implementer-frontend) DONE — npm×2 PASS, 2 dialog+2 page SHA256-identical (badge+Công-bố+filter+file-mẫu+Mã-editable+MST-warn) -[x] BE DONE (SendMessage-resume finish sạch) — build slnx **0/0 em-main-verified** + Mig 64 applied 2 DB; authz FE mismatch (Import nút Create→Update 2-app) em-main FIX; policy Suppliers.Update auto-reg Program.cs:80 verified -[x] test-specialist DONE — +19 test, **477 PASS** (458→477) + bắt BUG THẬT null-Code NRE trong NewSupplier (path R4 lõi) → em-main FIX `(r.Code??"").Trim()` + flip test → 477 xanh re-verify -[x] reviewer GO-WITH-ADJ — 2 must-fix (draft-leak picker + CreateSupplier IsPublic) → em-main FIX 5-site (4 FE picker published=true + BE CreateSupplier IsPublic=true) → re-verify ALL GREEN (477 test + FE ×2 build + BE 0/0) -[x] anh Kiệt OK deploy → commit `5fa11b5` [CLAUDE] Supplier import v2 (28 file) + push main 8fa2fcc..5fa11b5 -[!] cicd-monitor verify deploy (Run # sau #496, Mig 64 prod, bundle rotate ×2, byte-verify nút-file-mẫu/badge, smoke) ĐANG chạy nền -[ ] cicd PASS → closeout: gotcha +null-Code (#80) + STATUS/HANDOFF (Mig 64/89/477 test/bundle mới/menu) + harvest 4 sub-diary S113 + spec run-trace synthesis + WAL reset + /session-end +(rỗng) -next: cicd verdict → nếu PASS ghi closeout (STATUS Mig 63→64, test 458→477, bundle mới, +gotcha null-Code) + harvest + squash wal → báo anh XONG; nếu FAIL → điều tra -verify: commit 5fa11b5 pushed CONFIRMED; session chết → /tiep: deploy pushed rồi, chỉ cần đọc cicd verdict (agent-memory cicd diary) → closeout (KHÔNG re-deploy) -wf: cicd-monitor | HMW-cicd | deploy-verify-5fa11b5 | RUNNING | resume=cicd-verdict→closeout→session-end +next: (trống) +verify: (trống) diff --git a/.claude/agent-memory/cicd-monitor/MEMORY.md b/.claude/agent-memory/cicd-monitor/MEMORY.md index 61e9ee6..0c983b2 100644 --- a/.claude/agent-memory/cicd-monitor/MEMORY.md +++ b/.claude/agent-memory/cicd-monitor/MEMORY.md @@ -32,7 +32,7 @@ Read-only CI/CD + post-deploy verifier SOLUTION_ERP. Polls Gitea Actions API, ve - **Stage 0 RAG infra:** `Get-Service Qdrant` Running + `http://localhost:6333/healthz`. Collection `proj_solution_erp`. - **Stage 1 Push+filter:** `git log -1 --format='%H %s'` + `git log origin/main..HEAD` empty + diff vs paths-ignore (docs-only → SKIPPED-DOCS return). - **Stage 2 Gitea poll** (max 10 iter × 60s): API `.../actions/tasks?limit=5` (NOT `/runs` 404). Match `head_sha` (NOT run_number — cancelled runs shift numbering). ⚠️ `updated_at` stale ~2min (gotcha #46) → cross-check VPS mtime. Foreground-sleep BLOCKED Windows → Monitor-style busy-wait-curl-spin ~30s/iter. -- **Stage 3 Test gate:** baseline **440 PASS** (45 Domain + 395 Infra; S96 #480 `0c2f9f6` — 436 + new `PeSuggestedPriceSetterAuthzTests` [price-lock-after-submit authz]; prior S96 #479 436, S96/S95 434, S90 #465 421). CI runs both proj BEFORE build/deploy → status=success ⟹ test gate passed (`tasks` terminal=`status:success`, `conclusion` NOT populated — trust success NOT log-numeric). Local grep undercounts (Theory/InlineData). Phase 9 UAT skip OK. +- **Stage 3 Test gate:** baseline **477 PASS** (45 Domain + 432 Infra; S113 #383 `5fa11b5` — 458+19 new Supplier import-v2 tests [SupplierPublishAndListTests + SupplierImportV2DedupTests]; prior 458 [S112 #496], 440, 436, 434, 421). CI runs both proj BEFORE build/deploy → status=success ⟹ test gate passed (`tasks` terminal=`status:success`, `conclusion` NOT populated — trust success NOT log-numeric). Local grep undercounts (Theory/InlineData). Phase 9 UAT skip OK. - **Stage 4 Post-deploy** (if SUCCESS): auth login bearer (admin + nv.test gotcha #44; token=`accessToken` route `/api/auth/login`) → 3-5 endpoint smoke 2XX (incl new — NEW-endpoint bodyless-POST returns **411 IIS Length-Required pre-auth NOT 404**; re-probe WITH body → 401 confirms wired) → FE bundle hash 2 app (per #69 = real-size-vs-fake not hash-delta) → SignalR negotiate (gotcha #25) → EF mig prod==repo. - **Stage 4.6 (S29 CRITICAL):** sqlcmd seed sample verify post-deploy (NOT chỉ schema). Seed=runtime-row-insert (no history/tables advance) → verify via DB-query (e.g. Permissions count), NOT bundle-frozen-alone. - Discovery: ASP.NET 10 record enum needs numeric input unless `JsonStringEnumConverter` (SOL has NO converter → FE sends numeric). sqlcmd ssh Windows-auth `\\\\SQLEXPRESS` 4-backslash. INFRASTRUCTURE seed MUST run (NOT inside `if(!demoSeedDisabled)`); DEMO seed gated → gotcha #51. @@ -50,9 +50,9 @@ Read-only CI/CD + post-deploy verifier SOLUTION_ERP. Polls Gitea Actions API, ve - **Gitea:** `git.baocaogiaoduc.vn/vietreport-admin/solution-erp` · workflow `.gitea/workflows/deploy.yml` · paths-ignore 7-entry (D10 S111 #495): `['docs/**','**/*.md','.claude/skills/**','.claude/agent-memory/**','.claude/workflows/runs/**','.gitignore','scripts/**.md']`. Anon API works (public repo) when GITEA_TOKEN absent. - **Prod:** api/admin/eoffice `.solutions.com.vn` · SSH `ssh vietreport-vps` (Administrator, id_ed25519) · IIS phys paths: API `C:\inetpub\solution-erp\api` · admin `\fe-admin` · user `\fe-user`. DB `.\SQLEXPRESS`/`SolutionErp`/`vrapp` SQL-auth. **Conn key = `ConnectionStrings.Default` (NOT `DefaultConnection`)**. DB pw = `buKL3TGBkD0wDDbYVw65QeX9` (User Id=`vrapp`; ⚠️ Password field has NO `vrapp/` prefix — S89 login-failed when prefix included; read verbatim from prod `appsettings.Production.json` ConnectionStrings.Default when `$env:PROD_DB_PASSWORD` empty). ⚠️ skill-doc path `C:\inetpub\apps\SolutionErp\Api` STALE. - **SSH→PS quoting (S42):** nested bash→ssh→powershell mangles `$var`/`\"` → use `iconv UTF-16LE | base64` → `powershell -EncodedCommand $B64`; OR write ps1-file + `powershell -File $(cygpath -w)`. sqlcmd over SSH direct `-W -h -1` pw-inline. sys-catalog string-concat → `COLLATE DATABASE_DEFAULT` (collation conflict). -- **Tests baseline:** **458 PASS** (45 Domain + 413 Infra · 0 fail/skip; D10 S112 Run #496 sha `e100ef0` — 440→458 incl +10 `SupplierExcelImportServiceTests` + `PeSubmitGuardAndBypass` mods; prior 440 [S96 #480 45D+395I `PeSuggestedPriceSetterAuthzTests`], 436, 434, 421). Phase 9 UAT skip per chunk OK. 🔑 **Anon log endpoint `https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp/actions/runs/{run_number}/jobs/0/logs` (HTTP 200 ~18KB) EXPOSES per-project `Passed! - Failed: 0, Passed: N, Skipped: 0` — concrete test count now available, NOT just status=success (the `/api/v1/.../tasks/{id}/logs` variant 404s; use web-UI runs/{run_number}/jobs/0/logs).** -- **Mig latest repo:** **Mig 63 `20260712070117_AddSupplierImportSourceFields`** (D10 S112 #496 `e100ef0`; 2 AddColumn nullable on `Suppliers` [`SourceUpdatedAt` datetime2 + `SourceUpdatedBy` nvarchar(200)] for Excel-import Phase B provenance; NO CreateTable ⟹ sys.tables stays 89 — VERIFIED-APPLIED-PROD history-top==`AddSupplierImportSourceFields` + both-cols-present=2 + sys.tables=89). Prev Mig 62 `ExpandSupplierFields` (S104 #488, AddColumn ×18 Supplier 9→27 + un-cram 4-NCC Note). Prev Mig 61 `BackfillEndedByLevelFinalizeFromChangelog` (S97, data-only). Path `src/Backend/SolutionErp.Infrastructure/Persistence/Migrations/`. Prod check `sqlcmd __EFMigrationsHistory ORDER BY MigrationId DESC TOP 5`. ⚠️ **`sys.tables` (is_ms_shipped=0) = 89** (S104 LIVE-verified post-#488 — AddColumn/data-only migs don't change count → commit touches no new table ⟹ 89 correct don't FAIL. Cross-ref COMMIT scope vs ambient count). enum-additive (e.g. `ApprovalAttachment=5`) = int-stored NO-mig → history NOT-advance + empty `git diff -- '*Migrations*'`. -- **Bundle hash live (D10 S112 #496 `e100ef0` 2026-07-12 — REAL-FE-SHIP rotate, breaks FROZEN×6):** admin js **`Cixlt_MA`**/css **`Ds-E5neu`** · user js **`BhBOG1dn`**/css **`Beb0Bb1h`** — BOTH js+css rotated (from #490-#495 admin `BVyH-FY7`/`Bbtesa6B` · user `EDsZebvn`/`BmuPz_Dy`) = expected, real `fe-*/src` change (SupplierImportDialog.tsx NEW both apps). Ship-proof DEFINITIVE: real-size admin 1,652,140b / user 1,558,489b (vs 919b SPA-trap) + `application/javascript` + LM 09:18:32/09:19:25 GMT (=16:18/16:19+07 in deploy-window 16:14:33→16:19:58) + content-marker `"Database NCC"` count=1 in BOTH bundles. ⚠️ **id ≠ run_number; head_sha-keyed.** ⚠️ **PER #69 TWO-MODE: hash MAY rotate (real src-diff #488/#496, HOẶC 0-fe-src #489/#312) OR freeze (0 fe-src #485-487) — SNAPSHOT per-run, NOT baseline; ALWAYS re-snapshot LIVE pre-deploy.** Real FE ship = diff `fe-*/src` in range + real-size-vs-fake + Last-Modified-in-window + content-marker-grep, NOT hash delta alone. +- **Tests baseline:** **477 PASS** (45 Domain + 432 Infra · 0 fail/skip; S113 Run #383 sha `5fa11b5` — 458→477 incl +19 new `SupplierPublishAndListTests` + `SupplierImportV2DedupTests`; prior 458 [S112 #496 45D+413I +10 SupplierExcelImportServiceTests], 440, 436, 434, 421). Phase 9 UAT skip per chunk OK. 🔑 **Anon log endpoint `https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp/actions/runs/{run_number}/jobs/0/logs` (HTTP 200 ~18KB) EXPOSES per-project `Passed! - Failed: 0, Passed: N, Skipped: 0` — concrete test count now available, NOT just status=success (the `/api/v1/.../tasks/{id}/logs` variant 404s; use web-UI runs/{run_number}/jobs/0/logs).** +- **Mig latest repo:** **Mig 64 `20260712110556_AddSupplierPublishState`** (S113 #383 `5fa11b5`; AddColumn `IsPublic` bit NOT NULL DEFAULT 0 on `Suppliers` + backfill `UPDATE Suppliers SET IsPublic=1` all-rows + DropIndex/CreateIndex `IX_Suppliers_Code` filter→`[IsDeleted]=0 AND [Code]<>''`; NO CreateTable ⟹ sys.tables stays 89 — VERIFIED-APPLIED-PROD history-top==`AddSupplierPublishState` + `IsPublic`-col-present=1 + Suppliers 37/37 PUBLIC=1 + sys.tables=89). Prev Mig 63 `AddSupplierImportSourceFields` (S112 #496, 2 AddColumn provenance). Prev Mig 62 `ExpandSupplierFields` (S104 #488, AddColumn ×18 Supplier 9→27 + un-cram 4-NCC Note). Prev Mig 61 `BackfillEndedByLevelFinalizeFromChangelog` (S97, data-only). Path `src/Backend/SolutionErp.Infrastructure/Persistence/Migrations/`. Prod check `sqlcmd __EFMigrationsHistory ORDER BY MigrationId DESC TOP 5`. ⚠️ **`sys.tables` (is_ms_shipped=0) = 89** (S104 LIVE-verified post-#488 — AddColumn/data-only migs don't change count → commit touches no new table ⟹ 89 correct don't FAIL. Cross-ref COMMIT scope vs ambient count). enum-additive (e.g. `ApprovalAttachment=5`) = int-stored NO-mig → history NOT-advance + empty `git diff -- '*Migrations*'`. +- **Bundle hash live (S113 #383 `5fa11b5` 2026-07-12 — REAL-FE-SHIP rotate ×2):** admin js **`acprMqfB`**/css **`CfunQHbd`** · user js **`Ck3BTDdA`**/css **`DGqqHQXS`** — BOTH js+css rotated (from #496 admin `Cixlt_MA`/`Ds-E5neu` · user `BhBOG1dn`/`Beb0Bb1h`) = expected, real `fe-*/src` change (SupplierImportDialog + SuppliersPage + PeDetailTabs + ContractCreatePage both apps). Ship-proof DEFINITIVE: real-size admin 1,656,263b / user 1,562,611b (vs 919b SPA-trap) + `application/javascript` + LM 12:07:50/12:08:43 GMT (=19:07/19:08+07 in deploy-window 19:03:57→19:09:11) + byte-verify strings `Tải file mẫu`×1/`Đã công bố`×3/`Nháp (ẩn)`×4 present (gotcha #77 not-cache). ⚠️ **id ≠ run_number; head_sha-keyed.** ⚠️ **PER #69 TWO-MODE: hash MAY rotate (real src-diff #488/#496, HOẶC 0-fe-src #489/#312) OR freeze (0 fe-src #485-487) — SNAPSHOT per-run, NOT baseline; ALWAYS re-snapshot LIVE pre-deploy.** Real FE ship = diff `fe-*/src` in range + real-size-vs-fake + Last-Modified-in-window + content-marker-grep, NOT hash delta alone. - **Bearer:** admin `admin@solutions.com.vn/Admin@123456` (full) · UAT `nv.test@solutions.com.vn/TestUser@123456` (Drafter CCM, gotcha #44 check). ## 🔑 Critical config (flag commit nếu tái xuất) @@ -70,7 +70,8 @@ BE (test+build) ~90s · FE × 2 ~60s/app · deploy ~30s · **total ~3min code / ## 📅 Recent runs (compressed — verbatim → archive via `_INDEX.md`) -- **🟢 S112 #496 (rn 382, id 496) `e100ef0` GO 5m25s (16:14:33→16:19:58+07 2026-07-12) — PE workflow (`a829d0d` code-only A1-creator-sign/EDGE-5-terminal-lock/opinion-history) + Supplier Excel-import Phase B + Mig 63 (22-file: FE ×4 SupplierImportDialog both apps, BE ×13 incl Mig63 3-file, tests):** status=success · **test gate CONCRETE from `runs/382/jobs/0/logs` (anon 200): Domain `Passed! Failed 0, Passed 45` + Infra `Passed! Failed 0, Passed 413` = 458/0-fail/0-skip** (matches parent baseline exact; +10 SupplierExcelImportServiceTests absorbed) · **Mig 63 `AddSupplierImportSourceFields` APPLIED-PROD** (history-top==name + `SourceUpdatedAt`+`SourceUpdatedBy` cols-present=2 + sys.tables=89 frozen) · **FE REAL-SHIP both apps** admin js `BVyH-FY7`→`Cixlt_MA`/css→`Ds-E5neu` · user js `EDsZebvn`→`BhBOG1dn`/css→`Beb0Bb1h` (all 4 rotated, real fe-src) ship-proof= real-size 1,652,140/1,558,489b + `application/javascript` + LM 09:18:32/09:19:25 GMT in-window + `"Database NCC"` marker count=1 both · **import routes WIRED** POST `/import/preview`+body→415 (multipart binder matched) · `/import/confirm`+body→401 (auth-gated) · bogus+body→404 control · smoke api-live/ready + admin/eoffice roots + authed suppliers/contracts/PE/menus ALL 200 (PE workflow change healthy). 🔑 **411-refinement: bodyless-POST → 411 for ANY route incl bogus (IIS Content-Length pre-routing) ⟹ 411≠route-exists; MUST re-probe WITH body → 401/415 (matched) vs 404 (missing).** +- **🟢 S113 #383 (rn 383, id 497) `5fa11b5` GO 5m14s (19:03:57→19:09:11+07 2026-07-12, owner anh Kiệt) — Supplier import v2 (Mig 64 publish/draft `IsPublic` + dedup-MST + template .xlsx ClosedXML + file mẫu; 28-file: FE ×10 both apps [SupplierImportDialog/SuppliersPage/PeDetailTabs/ContractCreatePage/types], BE ×14 incl `PublishSupplierCommand`+`GetSupplierImportTemplateQuery` NEW + Mig64 3-file, tests ×2 NEW):** status=success · **test gate CONCRETE `runs/383/jobs/0/logs` (anon 200): Domain 45 + Infra 432 = 477/0-fail/0-skip** (+19 vs #496 458 = SupplierPublishAndListTests + SupplierImportV2DedupTests) · **Mig 64 `AddSupplierPublishState` APPLIED-PROD** (history-top==name + `IsPublic`-col-present=1 + backfill Suppliers 37/37 PUBLIC=1 [prod 37 NCC not 22-est; `UPDATE SET IsPublic=1` all-rows → 0 draft, invariant no-hidden holds] + sys.tables=89 frozen [AddColumn+reindex only]) · **FE REAL-SHIP ×2** admin js `Cixlt_MA`→`acprMqfB`/css `Ds-E5neu`→`CfunQHbd` · user js `BhBOG1dn`→`Ck3BTDdA`/css `Beb0Bb1h`→`DGqqHQXS` ship-proof= real-size 1,656,263/1,562,611b + `application/javascript` + LM 12:07:50/12:08:43 GMT in-window + byte-verify `Tải file mẫu`×1/`Đã công bố`×3/`Nháp (ẩn)`×4 present (gotcha #77 not-cache) vs SPA-trap 919b control · **new endpoints WIRED** GET `/suppliers/import/template` no-auth+bogus-bearer→401 (alive/auth-gated) · `/suppliers?published=true`→401 (live NOT 500) vs bogus-route 404 control (401≠blanket, proves wired). smoke health/ready+live + admin/eoffice roots ALL 200. +- **🟢 S112 #496 (rn 382, id 496) `e100ef0` GO 5m25s** — PE workflow + Supplier Excel-import Phase B + Mig 63 `AddSupplierImportSourceFields` APPLIED-PROD (2 AddColumn provenance, sys.tables 89) · gate 458 (45D+413I) · FE real-ship both apps admin `Cixlt_MA`/user `BhBOG1dn` · 🔑 411-refinement: bodyless-POST→411 for ANY route (IIS Content-Length pre-routing) ⟹ MUST re-probe WITH body → 401/415 (matched) vs 404 (missing) — verbatim → `archive/2026-07.md` via `_INDEX`. - **🟢 S111 #495 (rn 381, id 495) `8aa3869` GO 5m11s (11:45:21→11:50:32+07 2026-07-12, iter6) — H22 WAL adopt 30-file +767 (0 src/BE/FE/mig; non-ignored: settings.json + wal-flush.ps1 + hmw.js + deploy.yml + governance-detectors.ps1 + .gitattributes → CI-run ĐÚNG thiết kế):** status=success (gate 440) · **deploy.yml TỰ-ĐỔI trong chính commit (D10 +2 paths-ignore `.claude/agent-memory/**` + `.claude/workflows/runs/**`) — run created+parse+chạy trọn 5m11s = YAML hợp lệ, workflow-self-change PASS** · Mig FROZEN 62 history-top `ExpandSupplierFields` + sys.tables=89 ✓ · smoke 3×200 (health/ready + 2 FE roots) · **bundle FROZEN ×6-streak** (admin `BVyH-FY7`/`Bbtesa6B` · user `EDsZebvn`/`BmuPz_Dy` = #490→#494) + LM-in-window 11:49:07/11:50:00+07 + size 1,644,931/1,551,280b byte-identical #494 vs fake-919b = ship-proof. 🔑 **AS-6 BASELINE SHIFT từ #495: paths-ignore 7-entry — memory-budget.json/agent-memory/run-trace push HẾT trigger (trigger-pattern #490/#492 DEAD); phân loại trigger giờ soi file ngoài 7-glob.** - _(**S107-closeout→S110-spot #490-#494** GOVERNANCE/MEMORY-push GO ×5 [`d74f67f`·`69957fd`·`f5a5c3e`·`6ee60cd`·`ac3f122` — trigger #41 non-.md-in-push: budget.json ×2 + hmw.js ×3, pattern DEAD từ D10 #495] — bundle FROZEN-streak ×5 sau ROTATE #489 [#69 TWO-MODE; LM-in-window + real-size 1,644,931/1,551,280b = signal duy nhất] · Mig 62 + sys.tables 89 frozen · gate 440 · smoke 3×200 ALL · 🔑 #494 spot-detection: LM-prod-newer-than-last-verified-window = missed-run detector · full verbatim → `archive/2026-07.md` via `_INDEX`)_ - _(**S107 #489 `21387cd` GOVERNANCE-ONLY (+office-document 12th sub) GO 5m33s** — JS ROTATED-benign `ChSNAJBK`→`BVyH-FY7` / `Bn2w1znH`→`EDsZebvn` CSS-frozen, 🔑 #69 TWO-MODE CONFIRMED (0-fe-src ROTATE #312/#489 hoặc FROZEN #333/#485-487 — ship-proof = LM-in-window + real-size, hash-delta phụ) · **S104 #488 `778fc98` FULL-STACK Supplier 9→27 + Mig 62 `ExpandSupplierFields` APPLIED-PROD** — AddColumn×18-exact + sys.tables-89-invariant + un-cram 4-NCC Note=NULL/Pkg/Bank/LegalRep-populated-EXACT + DTO-18-new-keys-live + JS-rotate-real-src + 🔑 FULL-STACK-SCHEMA-ADD+DATA-UN-CRAM PASS-pattern — full verbatim → `archive/2026-07.md` via `_INDEX`)_ diff --git a/.claude/agent-memory/investigator-codebase/MEMORY.md b/.claude/agent-memory/investigator-codebase/MEMORY.md index 678767f..27ed004 100644 --- a/.claude/agent-memory/investigator-codebase/MEMORY.md +++ b/.claude/agent-memory/investigator-codebase/MEMORY.md @@ -17,6 +17,13 @@ Read-only INTERNAL audit SOLUTION_ERP codebase. Tools: Read, Grep, Glob, Bash + --- +## 🆕 2026-07-12 (S113) — Supplier import v2 invest ensemble (5-lane, Opus MAX, RETURN-only) `[engine: fable-clone-ensemble · Opus-S113]` +Em-main harvest @closeout (H2 — 5 lane RETURN-only; content ở `runs/2026-07-12-S113-supplier-import-v2-invest/` journal.jsonl + spec). +- **task:** invest cách làm Supplier import v2 (R1-R7) — 5 lăng-kính CÙNG vai investigator-codebase: schema-data-model · import-service · fe-ux · public-visibility-consumers · dedup-validation. `wf_e7896ca6-901`. +- **verdict:** 4/5 structured PASS + 1 lane `public-visibility-consumers` **#53-garble** → em-main-solo grep recover (consumers = PE picker `PeDetailTabs:2222` + `ContractCreatePage:321` + dashboard, đều qua ListSuppliersQuery). +- **learned:** Conflation gốc — `Supplier.Code` comment "Mã NCC" nhưng S112 nhồi c4 viết-tắt vào → R3 muốn tách. Ensemble hội tụ 6 điểm (IsPublic-bool · dedup-MST+Code-backstop · backfill · PublishCommand-riêng · BE-template · re-bake-token) + chẻ đôi D1 (schema-lens=A vs import-lens=B) → anh chốt A. +- **surprise:** visibility-lane garble ĐÚNG lane quan-trọng nhất (R4/R6 ẩn draft); recover-lane spec-flag NHƯNG FE implement vẫn sót wiring 4-picker → reviewer bắt draft-leak. Prod 37 NCC (không 22 ước). Tag `[s113, fable-clone-ensemble, supplier-import-v2, ma-ncc=code, visibility-garble-recover, dedup-mst]`. + ## 🆕 2026-07-12 (S112) — 2 fable-clone invest ensemble (Opus MAX, RETURN-only) `[engine: fable-clone-ensemble · Opus-S112]` Em-main harvest @closeout (H2 gate — lanes RETURN-only, content verbatim ở `runs/2026-07-12-S112-{supplier-excel-import,pe-signoff-save-advance}/sub-invest-*.md`). - **task:** (A) Supplier Excel-import mapping/approach/edge `wf_e2f23a84` · (B) PE sign-off save-advance current-flow/change-design/reject `wf_fd8f2bfe`; 3 lane/ensemble. diff --git a/.claude/workflows/runs/2026-07-12-S113-supplier-import-v2-invest/run.md b/.claude/workflows/runs/2026-07-12-S113-supplier-import-v2-invest/run.md index b26ccb5..6b0fa91 100644 --- a/.claude/workflows/runs/2026-07-12-S113-supplier-import-v2-invest/run.md +++ b/.claude/workflows/runs/2026-07-12-S113-supplier-import-v2-invest/run.md @@ -36,3 +36,6 @@ Sheet1 · 31 col · **header ROW 4** · 4 data row (R5-R8 = 4 NCC đã seed prod **Chẻ đôi (→ anh chốt):** D1 Mã-NCC = Code[schema-lens] vs field-mới[import-lens]. D2 R4-strict vs R6-literal (mâu thuẫn thật). D3 authz FE⧣BE mismatch. **Recover visibility:** consumers = PE picker (PeWorkspaceCreateView/PeDetailTabs) · ContractCreatePage · CreateContractFromEvaluationFeatures · dashboard — đều qua ListSuppliersQuery → filter `Published`. HMW grep-all trước implement. → Chi tiết đầy đủ ở `spec-supplier-import-v2-12-07-2026.md`. + +## OUTCOME — SHIPPED PROD (Run #497 PASS 5m14s, commit `5fa11b5`) +Spec → HMW-Opus implement (BE⟂FE parallel) → test-specialist +19 (477 PASS) → reviewer GO-WITH-ADJ (2 must-fix applied) → deploy verified. **4 bug caught+fixed pre-prod:** #53-visibility-lane-recover · null-Code NRE #80 (test-specialist) · authz-403 Import-nút (em verify-chéo) · draft-leak-picker + CreateSupplier-IsPublic (reviewer). Mig 64 prod 37/37-backfill · bundle admin `acprMqfB`/user `Ck3BTDdA` · byte-verify feature PRESENT. ⚠️ #53-garble ×2 (invest-visibility-lane + impl-be-first-return → SendMessage-resume 1/3 finish sạch). Harvest: em-main stamp invest-ensemble `[engine: fable-clone-ensemble · Opus-S113]` + product-agents self-updated diary S113.