[CLAUDE] Docs: S93 closeout — PE project-code (Run #473) + Harness-16 MFE adopt + harvest
Closeout 2 task: (1) PE tree node Du an hien MA du an (8ee8f3eRun #473 prod-verified) (2) adopt Harness-16 MFE memory-fidelity-EVAL (9580098, 2-workflow PASS). - STATUS + HANDOFF: prepend S93 (mega-line via PowerShell, S92->Prev). - session log 2026-06-29-S93-pe-projectcode-harness16-mfe.md. - error-ledger E-006: AS-10 2nd-fire recurrence (WF1 3-agent residual caught+reverted; WF2 explicit-return-only -> 0 residual) + containment guard verified S93. - harvest (B3 single-writer APPEND): investigator-codebase (MFE ground-truth extraction-spec) + reviewer (MFE adoption review WF2 PASS) diaries. - user-MEMORY index compacted 23.7->7.8KB (hook), all 38 entries kept, vocab-collision lesson folded into 2-workflow entry. State unchanged (Mig 59 · 88 tables · 434 test · gotcha 76 · bundle CDn40vpV/CoPmPBg7). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
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,44 @@
|
||||
# S93 (2026-06-29) — PE tree project-code (anh Kiệt) + adopt Harness-16 MFE (2-workflow)
|
||||
|
||||
> HMW-mode ON. 2 việc: (1) sản phẩm PE prod-verified · (2) governance adopt 0-production-code. ~9 agent/workflow spawn.
|
||||
|
||||
## Task 1 — PE: cây Duyệt NCC node Dự án hiện MÃ thay tên dài (prod-verified Run #473 `8ee8f3e`)
|
||||
|
||||
**Anh Kiệt FDC (Zalo + screenshot):** node 📁 Dự án trong cây "Năm > Dự án > Hạng mục > Phiếu" hiện TÊN dài ("Phân xưởng homecare 75 tấn/ngày và các hạng mục") → "bắt mã dự án nhé" (tên quá dài, user thấy vướng).
|
||||
|
||||
**Chẩn:** `PurchaseEvaluationsListPage.tsx` tree render `pg.projectName` (line 452). `PeListItem` có `projectName` nhưng KHÔNG `projectCode`; BE list query select `p.Name` không `p.Code`. → cross-stack tight (1 field BE→FE) = em-main solo nhanh hơn fan-out.
|
||||
|
||||
**Fix (7 file, 17+/10−, NO migration):**
|
||||
- BE: `PurchaseEvaluationListItemDto` +`ProjectCode` (positional record) + thread `x.p.Code`/`p.Code` vào **3 projection** (List 622 + Inbox 739 + ListApproved-from-evaluation `CreateContractFromEvaluationFeatures:178`) + search PE khớp thêm `p.Code`.
|
||||
- FE 2 app SHA-mirror: `PeListItem` +`projectCode`; tree node render `pg.projectCode || pg.projectName` + tooltip=tên + sort theo code (fallback name).
|
||||
- **3 DTO construction site** — `replace_all` bắt 2, grep `new PurchaseEvaluationListItemDto(` bắt site #3 (`e.ProjectId, p.Name,` không có `x.` prefix → thoát replace_all) → BE build đỏ CS7036 → fix. **Bài học `feedback_cardinality_change_grep_consumers`: đổi positional record = grep MỌI construction site.**
|
||||
|
||||
**Verify:** dotnet build 0/0 · npm build ×2 PASS · test **434** (45D+389I). Commit `8ee8f3e` → cicd **Run #473/#359 PASS** ~5m23s: bundle admin `xz8FdmLN`→**`CDn40vpV`** / user `CA8Rla2w`→**`CoPmPBg7`** (JS rotate, CSS frozen logic-only); Mig prod=59 unchanged; smoke 4×200. **NEXT UAT anh Kiệt:** node 📁 hiện FLOCK02/RMIT01 (mã) thay tên; nếu ô khoanh là Hạng-mục (không phải Dự-án) → đổi sang work-item code (1 phút).
|
||||
|
||||
## Task 2 — adopt Harness-16 MFE (memory-fidelity-EVAL), commit `9580098`, 0 production code
|
||||
|
||||
**Flow:** `/check-email AI_INFRA` (0 thư directed mới) + `/adap-apply` (33 broadcast vs 23 report) → **MỚI = Harness-16 MFE (3 broadcast 29/06)**; H15-v3-sub-load-channels = covered-S83 + fold; 8 broadcast cũ = verify-covered (name-drift).
|
||||
|
||||
**2-workflow mandate (Harness-9):**
|
||||
- **WF1 IMPLEMENT** `wf_4c63e1bd-99e` (3 agent ground-truth: lead-denominator-spec + sub-role-denominator + cross-harness-map). **Bắt 1 BLOCKING vocab-fork** (xharness reviewer): "memory-fidelity" ĐÃ là H6.7 `memoryDelta`-routing-fidelity → đặt tên H16 = **MFE = memory-fidelity-EVAL**, ghi alias-map §H, KHÔNG seed `$aliasSets` (2-khái-niệm-1-từ ≠ fork-to-merge). **#53 recover-from-disk:** sub-role-denominator agent return rỗng nhưng ĐÃ ghi finding vào diary trước → em-main đọc lại.
|
||||
- **AS-10 2nd-fire dogfood:** 3 WF1-agent (return-only) tự-ghi agent-memory (diary + archive-self-curate + stray `project_s92_*` mis-named) → git-diff post-P2 containment bắt ALL → em-main revert (giữ cicd-monitor PE-harvest). Guard HELD. → ledger E-006 recurrence.
|
||||
- **em-main author** (single-writer, 8 artifact): `scripts/mfe-eval.ps1` (deterministic NO-API ASCII#30 exit-0: LEAD coverage-FIT token-RANGE live-read-cap + age-band flag-not-cut + Goodhart-anchor strikes/RCA · SUB per-role coverage đo-thật content-word-match defeat-leading-verb · sub-workflow N/A · prose-role→N/A KHÔNG 0%) + `budget.json:mfe` config + `eval/mfe/` (seed 12-câu stable-id + README) + engine §H + artifact-row + C3-comment + wire `session-start §2.1.6`/`session-end §L.b(c)` opt-in + agents/README S93. Judge layer = SCAFFOLD-only (honest: số chưa nghĩa tới khi age-mature + independent judge).
|
||||
- **WF2 REVIEW** `wf_13e3d35a-023` (3 lane) = **PASS 0-blocking, RETURN-ONLY honored (0 residual** — WF2 thêm "do NOT write" prompt → instruction-fix worked): code-gate re-derived denom-29 to-the-digit + leading-verb-trap adversarial-probed-DEFEATED; cross-harness READ-ONLY-budget proof (1 write-op=.mfe-state.json) + 0-conflict; honesty 5-floor + live-numbers-KHỚP-§H (S81 stale-config trap KHÔNG tái). 2 minor → fixed (read_only_scope caveat + README judge-cost wording).
|
||||
|
||||
**MFE đo SE hiện tại:** LEAD denom **29 item** (4 mark + 13 AS + 5 guard + 7 gotcha, dedup-by-AS-cross-reference) / 220K = **1.5%** FIT thừa; Goodhart strikes 21/RCA 9. SUB: impl-backend 94% · impl-frontend 85% · reviewer/inv-codebase 88% · cicd 100% · 3 prose-role N/A.
|
||||
|
||||
**Artifact:** adap-report `2026-06-29-Governance-harness-16-mfe.md` + `2026-06-21-Governance-harness-15-v3-sub-load-channels.md` (covered/folded) + email `outbox/ai_infra/2026-06-29-se-to-ai_infra-harness-16-mfe-report.md` (hash `da768330…`) + `.gitignore` state-file. commit `9580098` push (docs-only CI-skip).
|
||||
|
||||
## Lessons
|
||||
- **Cardinality/positional change = grep MỌI consumer** (`feedback_cardinality_change_grep_consumers`) — site #3 thoát `replace_all` vì viết khác prefix; chỉ grep construction-site toàn repo mới lộ.
|
||||
- **Vocab-collision on adoption** — adopt khái-niệm-có-tên → grep term-collision (tên mới có thể đã mang nghĩa khác trong hệ); 2-workflow review là cái bắt được (1-workflow self-chấm sẽ trượt). alias-map ≠ seed-detector (2-concept-1-word KHÔNG phải fork-to-merge). Folded vào memory `feedback_harness9_l2_recovery_2workflow_adap`.
|
||||
- **AS-10 instruction-fix:** workflow-agent frontmatter "update MEMORY before return" đấu với return-only → prompt PHẢI override tường-minh ("do NOT write ANY file") + git-diff post-P2 = net. WF1 (không override) → 3 residual; WF2 (override) → 0 residual.
|
||||
- **MFE dogfood "đóng vòng":** detector D1 OOM đầu phiên (STATUS mega-line 61K-char) = "đã-nạp khổng-lồ nhưng dùng được %?" — đúng câu hỏi MFE trả lời.
|
||||
|
||||
## State THẬT (GIỮ NGUYÊN — Task 2 = 0 production code; Task 1 NO-migration)
|
||||
**Mig 59 · 88 bảng · 434 test (45D+389I) · gotcha 76 · menu 54 · bundle admin `CDn40vpV`/user `CoPmPBg7` · prod 17 user/7 NCC.**
|
||||
|
||||
## 🔴 NEXT
|
||||
- **Anh:** ⚠️ restart CLI (MFE opt-in + wire session-start/end + agents/README no hot-reload) · UAT eoffice node Dự án hiện mã (anh Kiệt).
|
||||
- **Em (carry):** monthly **2026-07-01 (2 ngày) GẤP** — re-tier STATUS/HANDOFF mega-line (detector D1 **OOM do bloat** = tooling vỡ, không chỉ "khó Read") + ef-core SKILL Mig→59 + docs/CLAUDE Budget-removed + 3 vocab-fork alias-map. + curate test-specialist/FD L1 WATCH (carry). MFE retention chạy `/session-start … eval` sau restart.
|
||||
- **Pending product:** Section B cột Dự-án wire · Ngưỡng giá CEO Mig 54 Designer UAT · "C" chuyển phiếu→dự án chờ spec.
|
||||
@ -47,7 +47,7 @@ Detect by **action-signature** (NOT "AI tự phán có vi phạm không"). Scan
|
||||
| agent frontmatter `model: inherit` (not `[1m]`) | gotcha #37 | procedural | — | ✅ (FD agent loaded S48) | ++ |
|
||||
| **lead = sole RAG-writer** (`store_memory` stripped, mechanized) | store_memory rebootstrap-loss (S41) + AS-3 | procedural | 2 (NamGroup + SE S41) | ✅ runtime S48 (0/8 subs) | +++ (failure-safe) |
|
||||
| session-end verify memory byte>0 | S46 0-byte (AS-8) | procedural | 1 (S46) | ✅ S49 (new mem 2355B + 0 byte-0 scan) | ++ |
|
||||
| **git-diff + chunk-count post-P2 containment** (defense-in-depth, HMW) | R1 sub-write residual (AS-10) · store_memory bypass (AS-3) | **procedural** (institutionalized S50 = standard B6 post-wave audit) | 1 (S49) | ✅ S49 (caught inv-api self-MEMORY in git-diff; chunk 2414=2414) + **S50 wave `h2-verify` (git-diff agent-memory EMPTY, chunk 2415=2415, 0 leak)** | ++ (G-015 honest — NOT allowlist-alone) |
|
||||
| **git-diff + chunk-count post-P2 containment** (defense-in-depth, HMW) | R1 sub-write residual (AS-10) · store_memory bypass (AS-3) | **procedural** (institutionalized S50 = standard B6 post-wave audit) | 1 (S49) | ✅ S49 (caught inv-api self-MEMORY in git-diff; chunk 2414=2414) + **S50 wave `h2-verify` (git-diff agent-memory EMPTY, chunk 2415=2415, 0 leak)** + **S93 (WF1 3-agent residual caught+reverted; WF2 0-residual after explicit return-only)** | ++ (G-015 honest — NOT allowlist-alone) |
|
||||
| heavy spawn → `run_in_background` | looks-frozen | **procedural** (2-strike met) | 2 (S45, S48) | ✅ S48 (FD bg) + S50 (all 4 monitor+wave spawns bg) | + |
|
||||
| RAG glob `**/`-anchored (not root) | gotcha #10 node_modules leak | procedural | 1 (S41) | ✅ (2406 clean) | ++ |
|
||||
| dump bảng env-đích TRƯỚC identifier-based data op (lock/seed-by-email) | gotcha #60 (AS-12) | episodic | 1 (S57bis lock NO-OP) | ✅ S58 (recon dump → fix `5998163` → Run #382 đo 34 locked) | ++ |
|
||||
@ -87,7 +87,8 @@ Detect by **action-signature** (NOT "AI tự phán có vi phạm không"). Scan
|
||||
- **5-why:** monitors retain `Bash` (G-015 residual write-channel; `store_memory`-strip ≠ read-only) → ≥1 wrote canonical session-end content via shell → exceeded propose-only mandate (B3 single-writer) → self-report ≠ disk (Fidelity gap) → undetected until em-main git-diff commit-gate.
|
||||
- **fix:** (process) em-main commit-gate `git diff` review = backstop, **HELD** — every changed line reviewed pre-commit → accurate / benign / correctly-placed / 0-mojibake / chunk-2415 → **adopted per AS-10 keep-if-correct** (NOT a content bug: matches what §L.b prescribes). (guard) "git-diff + chunk-count post-P2 containment" already promoted procedural this session; AS-10 now has its **first real fire**.
|
||||
- **prevention/guard:** RECOMMEND (anh / AI_INFRA, charter-v2 infra): harden monitor tool-grant — `Write/Edit` removal alone leaves Bash residual → consider a session-end hook blocking sub-Bash-write to tracked paths, OR accept commit-gate as sufficient defense-in-depth. Fidelity: if monitors write, their reports MUST disclose it → escalate 🟥 reviewer if recurs. Provenance timing-implicated, **not definitively attributable** (no false accusation).
|
||||
- **tags:** [containment-residual-write / monitor-sub / governance-docs+agent-memory]
|
||||
- **recurrence S93 (2026-06-29):** AS-10 2nd fire — 3 WF1 workflow-agents (investigator-codebase ×2 + reviewer, return-only) self-wrote agent-memory (diary append + archive self-curate + 1 stray `project_s92_*` mis-named file). git-diff post-P2 containment caught ALL → em-main reverted (kept cicd-monitor PE-deploy harvest hợp-lệ). Guard HELD again. **WF2 fix:** added explicit "RETURN-ONLY: do NOT write ANY file incl MEMORY.md" to every lane prompt → **0 residual** (instruction-fix worked, git-diff confirmed). Lesson: workflow-agent frontmatter "update MEMORY before return" fights return-only mandate → prompt MUST override + git-diff is the net (G-015, not mechanized).
|
||||
- **tags:** [containment-residual-write / monitor-sub+workflow-agent / governance-docs+agent-memory]
|
||||
|
||||
### E-005 — AS-1 `git add -A` on S49 governance commit (self-caught @session-end §L.a)
|
||||
- **rule (AS-1):** stage specific files, not `git add -A`/`.` (concurrency safety — `feedback_rag_mcp_recovery_concurrency`).
|
||||
|
||||
Reference in New Issue
Block a user