[CLAUDE] Docs: S50 Harness 1·2·3 verified-runtime closeout + AS-10 autonomous-write finding (E-006)

- Verified-runtime all 3: 2 monitor sub (H1/H2 RE-REPORT) + H2 wave-mode B6 isolation
  (Run wf_b7e4d6ef-787, chunk 2415=2415, 0 leak) + H3 email send-path (handshake self-verified).
- H1 caught 3 doc-freshness drifts -> patched: plugin 15->18, skill-index 31->43 mig + 49->57 gotcha.
- gotcha #57 exact coords confirmed: LeaveTypeConfiguration.cs:19 + ShiftPatternConfiguration.cs:19.
- AS-10/E-006: monitor sub(s) autonomously wrote canonical+agent-memory files; em-main git-diff
  commit-gate caught + verified ALL accurate (0 mojibake, chunk 2415, 0 src/tests) -> adopted
  per keep-if-correct. Process gap flagged for monitor tool-grant review.
- Test 181 PASS unchanged (0 .cs). CI-skip (all .md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-08 00:25:00 +07:00
parent 31629a196c
commit f8179c5fbd
15 changed files with 115 additions and 22 deletions

View File

@ -24,3 +24,4 @@ H2 harvest-MD-integrity auditor **SOLUTION_ERP-self**. Read-only + **propose-onl
## 📅 Recent activity (FIFO — older → archive/git) ## 📅 Recent activity (FIFO — older → archive/git)
- **2026-06-07 (CREATED):** Seeded H2 harvest-curator (adopt AI_INFRA Harness 1, anh giao). Tailored SE: 4 RAG-read · `model:inherit` · omit color · Fidelity-escalate → SE `reviewer` (KHÔNG AI_INFRA-specific). Wired @session-end §L.b GATE (nâng 3/5→5/5 trục) + @session-start RE-REPORT harvest-mới (Phase 2.1.1) + Harness 2 B5 wave-gom. Nấc: **executed-file, verified-runtime PENDING** CLI restart + first spawn smoke. Tag [created, harness-1, h2]. - **2026-06-07 (CREATED):** Seeded H2 harvest-curator (adopt AI_INFRA Harness 1, anh giao). Tailored SE: 4 RAG-read · `model:inherit` · omit color · Fidelity-escalate → SE `reviewer` (KHÔNG AI_INFRA-specific). Wired @session-end §L.b GATE (nâng 3/5→5/5 trục) + @session-start RE-REPORT harvest-mới (Phase 2.1.1) + Harness 2 B5 wave-gom. Nấc: **executed-file, verified-runtime PENDING** CLI restart + first spawn smoke. Tag [created, harness-1, h2].
- **2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅):** Spawned @session-start (harvest RE-REPORT) + @session-end (5-trục GATE + B5 wave-gom). Load OK → **verified-runtime CONFIRMED**. @start: harvest 🟢 clean. @end: **GATE PASS 5/5** (Coverage 4 subs · Completeness 4-field · Placement correct homes · Corruption 0-byte/mojibake=0 · Fidelity no-flag — independently re-verified inv-codebase `.gitignore:93` claim). **B5 wave-gom executed:** 2 wave sub-MDs → propose APPEND agent-memory/{investigator-codebase,test-specialist} (em main wrote). B6 re-verify HELD (git diff agent-memory EMPTY). **Method-learning (⭐):** chunk-count CANNOT verify via Bash `curl localhost:6333` — RAG MCP points at DIFFERENT Qdrant host → collection 'not found' false-negative. Use **RAG MCP channel** (`list_projects`) for chunk-count, NOT shell probe; em main (single RAG-writer) = authoritative (confirmed 2415). Tag [first-run, verified-runtime, gate-pass, chunk-via-mcp].

View File

@ -70,6 +70,8 @@ Bearer từ `POST api.solutions.com.vn/api/auth/login` → status matrix expecte
## 📅 Recent activity (FIFO — older → archive/git) ## 📅 Recent activity (FIFO — older → archive/git)
- **2026-06-07 (S50 wave `h2-verify` — B6 guardrail audit, read-only) [em main scribe from findings + H2 harvest]:** Verified B6 wave-isolation **3/3 PASS**. **B6 = TWO complementary rules:** (a) transient `wave-*/` + `agent-teams/` gitignored (`.gitignore:93-94`) → audit-noise=0; (b) canonical `agent-memory/**/MEMORY.md` TRACKED → rogue sub-write surfaces in `git status`. `git check-ignore -v` = ground-truth verifier BOTH directions (matched rule:line for ignored; empty for tracked). ⚠️ **Ordering gotcha:** wave/team patterns MUST sit AFTER `!.claude/**` (`.gitignore:82-83`) to win via last-match (`:91` documents intent) — else `!.claude/**` un-ignores everything. All 10 MEMORY.md tracked (roster 8→10). **Surprise (cross-cutting, both wave subs):** Bash tool = `/usr/bin/bash` NOT PowerShell despite env=PowerShell → `Get-ChildItem`/`Select-String`/`Test-Path` fail (exit 2/127); read-only Bash-only subs MUST use POSIX (`git ls-files`/`grep`/`ls`). Tag [wave-h2, b6-isolation, posix-not-pwsh].
- **2026-06-07 (Harness 1/2/3 adap-apply recon — 3 slice, HMW wave):** Governance recon AI_INFRA broadcast harness-1/2/3. **H1/H2 (Harness 1):** roster 8→10 — CREATE 2 sub TÁCH BIỆT `tooling-auditor` (H1 freshness 4-mặt skill/sub-role/plugin/docs) + `harvest-curator` (H2 integrity 5-trục). H2 PARTIAL sẵn: `session-end.md` Phase 1.5 §L.b(d) spawn-record 4-field + (f) double-check moved-not-cut + (c) 0-byte AS-8 = Coverage+Completeness+Corruption (3/5); THIẾU Fidelity-escalate + Placement. RE-REPORT @session-start = 0 (chỉ generic Phase 2.7). 2 sub mirror inv-codebase read-set + store_memory strip + NO Write/Edit; color brown+teal (8 màu cũ hết). **H2 wave (Harness 2):** SE `hmw.js` = OLD pre-wave (no subMdPath/writeGuard/wave-block); AI_INFRA `hmw.js` = canonical template. ⭐ `git check-ignore -v` = ground-truth B6: `.claude/workflows/wave-test/wave.md` HIỆN match `.gitignore:83 !.claude/**` = TRACKED → wave pattern PHẢI đặt AFTER `!.claude/**` (last-match-wins, mẫu `hmw-mode.on` :87). Read-only sub (4)=inv-cb/inv-api/reviewer/cicd; Write sub (4)=impl×2/test/fe-designer. B5 depends H2 harvest-curator. **H3 email (Harness 3):** broadcasts/ absent; id authoritative = `se` (NOT solution_erp), 6 others short `{ai_infra,vipix,dyd,namgroup,ashico,bvaau}` từ `AI_INFRA/broadcasts/sister-commands/send-email.md:13-22` (folder name = 2nd source-truth); `adap-apply.md:14` base-path STALE flat → `outbox/all/*.md` (latent bug). broadcasts/ ở root → commit OK (no gitignore rule). **Containment post-P2:** git-diff bắt 1 file-write (inv-api self-MEMORY), chunk-count 2414=2414 (0 RAG-write) = defense-in-depth proven. Tag [harness-recon, governance, hmw-wave, 2026-06-07]. - **2026-06-07 (Harness 1/2/3 adap-apply recon — 3 slice, HMW wave):** Governance recon AI_INFRA broadcast harness-1/2/3. **H1/H2 (Harness 1):** roster 8→10 — CREATE 2 sub TÁCH BIỆT `tooling-auditor` (H1 freshness 4-mặt skill/sub-role/plugin/docs) + `harvest-curator` (H2 integrity 5-trục). H2 PARTIAL sẵn: `session-end.md` Phase 1.5 §L.b(d) spawn-record 4-field + (f) double-check moved-not-cut + (c) 0-byte AS-8 = Coverage+Completeness+Corruption (3/5); THIẾU Fidelity-escalate + Placement. RE-REPORT @session-start = 0 (chỉ generic Phase 2.7). 2 sub mirror inv-codebase read-set + store_memory strip + NO Write/Edit; color brown+teal (8 màu cũ hết). **H2 wave (Harness 2):** SE `hmw.js` = OLD pre-wave (no subMdPath/writeGuard/wave-block); AI_INFRA `hmw.js` = canonical template. ⭐ `git check-ignore -v` = ground-truth B6: `.claude/workflows/wave-test/wave.md` HIỆN match `.gitignore:83 !.claude/**` = TRACKED → wave pattern PHẢI đặt AFTER `!.claude/**` (last-match-wins, mẫu `hmw-mode.on` :87). Read-only sub (4)=inv-cb/inv-api/reviewer/cicd; Write sub (4)=impl×2/test/fe-designer. B5 depends H2 harvest-curator. **H3 email (Harness 3):** broadcasts/ absent; id authoritative = `se` (NOT solution_erp), 6 others short `{ai_infra,vipix,dyd,namgroup,ashico,bvaau}` từ `AI_INFRA/broadcasts/sister-commands/send-email.md:13-22` (folder name = 2nd source-truth); `adap-apply.md:14` base-path STALE flat → `outbox/all/*.md` (latent bug). broadcasts/ ở root → commit OK (no gitignore rule). **Containment post-P2:** git-diff bắt 1 file-write (inv-api self-MEMORY), chunk-count 2414=2414 (0 RAG-write) = defense-in-depth proven. Tag [harness-recon, governance, hmw-wave, 2026-06-07].
- **2026-06-01 (P11-C Vehicle+Driver catalog pre-flight):** Mig 44 next (latest=Mig 43 `FilterHolidayUniqueIndexByIsDeleted` S45). **NO Vehicle/Driver master exists** — chỉ `Office/VehicleBooking.cs` (request, Mig 39) dùng FREE-TEXT (`VehicleLicense`/`VehicleName`/`DriverName?` strings, :13-19 comment "defer catalog Phase 11"). **RECOMMEND home = extend HrmConfigs** (NOT new module): `Application/Hrm/HrmConfigFeatures.cs` mega 4-region + `HrmConfigsController` (`[Authorize]` read / `[Authorize(Roles="Admin")]` write) — add Region 5 Vehicle + 6 Driver (kind `vehicles`/`drivers`), pattern proven 12-bis. ⚠️ HRM entities KHÔNG global HasQueryFilter → manual `.Where(!IsDeleted)` + UNIQUE soft-delete cần `.HasFilter("[IsDeleted]=0")` (Holiday Mig 43 lesson, LeaveType/Shift UNIQUE Code chưa có filter → nếu Vehicle BienSo UNIQUE phải add filter). **FE cheap:** `HrmConfigsPage.tsx` declarative KIND_CONFIG Record — add 2 entry vào KIND_CONFIG + KINDS[] + `renderCells` branch + smart-defaults; NO new page. **Menu+perm:** add 6 const `MenuKeys.cs` (+`Hrm_Config_Vehicles/Drivers`), thêm vào `All[]` (:140) → Admin auto-grant qua `SeedAdminPermissionsAsync` loop (:1909 idempotent), +2 MenuItem `DbInitializer` :1757, +2 `menuKeys.ts` mirror. Hrm_Config KHÔNG inherit-root (4 root=Contracts/Workflows/Pe/PeWf only) → leaf cần row riêng (loop lo). **Fields (NamGroup XeCong DROPPED Mig 2026-05-15, ref response shape only):** Vehicle{Code/BienSo UNIQUE, Hang, MauXe, SoCho int, TrangThai, GhiChu}; Driver{Code/Hoten, SDT, GPLX, Hang bằng, TrangThai}. FK link defer: P11-C = catalog only, optional FK `VehicleBooking.VehicleId?/DriverId?` giữ free-text back-compat (Mig sau). Tag `[pre-flight, p11-c, vehicle-driver-catalog]`. - **2026-06-01 (P11-C Vehicle+Driver catalog pre-flight):** Mig 44 next (latest=Mig 43 `FilterHolidayUniqueIndexByIsDeleted` S45). **NO Vehicle/Driver master exists** — chỉ `Office/VehicleBooking.cs` (request, Mig 39) dùng FREE-TEXT (`VehicleLicense`/`VehicleName`/`DriverName?` strings, :13-19 comment "defer catalog Phase 11"). **RECOMMEND home = extend HrmConfigs** (NOT new module): `Application/Hrm/HrmConfigFeatures.cs` mega 4-region + `HrmConfigsController` (`[Authorize]` read / `[Authorize(Roles="Admin")]` write) — add Region 5 Vehicle + 6 Driver (kind `vehicles`/`drivers`), pattern proven 12-bis. ⚠️ HRM entities KHÔNG global HasQueryFilter → manual `.Where(!IsDeleted)` + UNIQUE soft-delete cần `.HasFilter("[IsDeleted]=0")` (Holiday Mig 43 lesson, LeaveType/Shift UNIQUE Code chưa có filter → nếu Vehicle BienSo UNIQUE phải add filter). **FE cheap:** `HrmConfigsPage.tsx` declarative KIND_CONFIG Record — add 2 entry vào KIND_CONFIG + KINDS[] + `renderCells` branch + smart-defaults; NO new page. **Menu+perm:** add 6 const `MenuKeys.cs` (+`Hrm_Config_Vehicles/Drivers`), thêm vào `All[]` (:140) → Admin auto-grant qua `SeedAdminPermissionsAsync` loop (:1909 idempotent), +2 MenuItem `DbInitializer` :1757, +2 `menuKeys.ts` mirror. Hrm_Config KHÔNG inherit-root (4 root=Contracts/Workflows/Pe/PeWf only) → leaf cần row riêng (loop lo). **Fields (NamGroup XeCong DROPPED Mig 2026-05-15, ref response shape only):** Vehicle{Code/BienSo UNIQUE, Hang, MauXe, SoCho int, TrangThai, GhiChu}; Driver{Code/Hoten, SDT, GPLX, Hang bằng, TrangThai}. FK link defer: P11-C = catalog only, optional FK `VehicleBooking.VehicleId?/DriverId?` giữ free-text back-compat (Mig sau). Tag `[pre-flight, p11-c, vehicle-driver-catalog]`.

View File

@ -58,6 +58,7 @@ Test theo CODE (single source truth), document mismatch header comment + report.
- **2026-05-30 (S42 P11-A Wave4):** +11 test `tests/.../Application/WorkflowAppApproveV2Tests.cs` **141 PASS** (Infra 7283). LeaveRequest 8 case full (Submit happy/guard×2, Approve advance/terminal/UPSERT-invariant/forbidden/empty-comment-placeholder, RejectTuChoi, ReturnTraLai+RejectedFromStatus) + OtRequest smoke (submitapprove single-levelDaDuyet). **No prod bug** LeaveOt ApproveV2 wire correct, all PASS first run. **NEW Pattern:** WorkflowApps handlers = CQRS MediatR (KHÔNG service) instantiate handler trực tiếp `new ApproveLeaveRequestHandler(db, AsUser(u), clock).Handle(cmd,ct)`, chỉ 3 dep (IApplicationDbContext + TestCurrentUser + FixedDateTime) nhẹ hơn 6-dep Contract service. MaDonTu format "DT/LR/2026/001". Gap #4 (Workflow Apps) PARTIAL done Travel/Vehicle mirror pending. Lesson: CWD drift (fe-user) ghi MEMORY nhầm path, em main relocate. Verify CWD root trước Write memory. - **2026-05-30 (S42 P11-A Wave4):** +11 test `tests/.../Application/WorkflowAppApproveV2Tests.cs` **141 PASS** (Infra 7283). LeaveRequest 8 case full (Submit happy/guard×2, Approve advance/terminal/UPSERT-invariant/forbidden/empty-comment-placeholder, RejectTuChoi, ReturnTraLai+RejectedFromStatus) + OtRequest smoke (submitapprove single-levelDaDuyet). **No prod bug** LeaveOt ApproveV2 wire correct, all PASS first run. **NEW Pattern:** WorkflowApps handlers = CQRS MediatR (KHÔNG service) instantiate handler trực tiếp `new ApproveLeaveRequestHandler(db, AsUser(u), clock).Handle(cmd,ct)`, chỉ 3 dep (IApplicationDbContext + TestCurrentUser + FixedDateTime) nhẹ hơn 6-dep Contract service. MaDonTu format "DT/LR/2026/001". Gap #4 (Workflow Apps) PARTIAL done Travel/Vehicle mirror pending. Lesson: CWD drift (fe-user) ghi MEMORY nhầm path, em main relocate. Verify CWD root trước Write memory.
- **2026-05-30 (S43 P11-B Wave3 LeaveBalance):** +8 test `tests/.../Application/LeaveBalanceTests.cs` **152 PASS** (Infra 8694). Deduction hook (ApproveLeaveRequestHandler terminal) full: deduct single-level (create row from DaysPerYear), only-at-terminal multi-level (advance no-deduct + 1× terminal), accumulate UPSERT (5+2=7 no new row), negative allowed (Used20>Entitled12 → Remaining8 no throw), Reject+Return no-deduct (split 5a/5b), GetMyLeaveBalances lazy synth (2 active type filter inactive), AdjustLeaveBalance upsert. **⚠️ FOUND + FIXED 2 pre-existing RED** in S42 template (`Approve_LastLevel_TransitionsToDaDuyet` + `Approve_EmptyComment_StoresPlaceholder`): Wave 1 deduction hook (uncommitted, prod) làm terminal insert LeaveBalance FK→LeaveTypes Restrict FAIL vì BuildLeave dùng `LeaveTypeId=Guid.NewGuid()`. **NOT prod bug** (prod đơn luôn pin LeaveType thật) — fix tại test: BuildLeave +optional leaveTypeId, seed LeaveType ở 2 test đó. Baseline thật trước S43 = 142-pass/2-RED (KHÔNG phải 144-green). REPORTED em main. - **2026-05-30 (S43 P11-B Wave3 LeaveBalance):** +8 test `tests/.../Application/LeaveBalanceTests.cs` **152 PASS** (Infra 8694). Deduction hook (ApproveLeaveRequestHandler terminal) full: deduct single-level (create row from DaysPerYear), only-at-terminal multi-level (advance no-deduct + 1× terminal), accumulate UPSERT (5+2=7 no new row), negative allowed (Used20>Entitled12 → Remaining8 no throw), Reject+Return no-deduct (split 5a/5b), GetMyLeaveBalances lazy synth (2 active type filter inactive), AdjustLeaveBalance upsert. **⚠️ FOUND + FIXED 2 pre-existing RED** in S42 template (`Approve_LastLevel_TransitionsToDaDuyet` + `Approve_EmptyComment_StoresPlaceholder`): Wave 1 deduction hook (uncommitted, prod) làm terminal insert LeaveBalance FK→LeaveTypes Restrict FAIL vì BuildLeave dùng `LeaveTypeId=Guid.NewGuid()`. **NOT prod bug** (prod đơn luôn pin LeaveType thật) — fix tại test: BuildLeave +optional leaveTypeId, seed LeaveType ở 2 test đó. Baseline thật trước S43 = 142-pass/2-RED (KHÔNG phải 144-green). REPORTED em main.
- **2026-06-01 (S45 HRM coverage gaps + Holiday drift) [em main proxy]:** +27 test → **181 PASS** (Infra 96→123). 3 file: HrmConfigHolidayTests (7 — composite UNIQUE Create/Update, ⭐self-update giữ key đổi Name no-false-positive, soft-delete exclusion) + EmployeeSatelliteTests (10 — 5× FK-invariant parent `AnyAsync(!IsDeleted)` guard + soft-delete + cascade-non-behavior Case5 + EF model `DeleteBehavior.Cascade` config assertion) + AuthorizePolicyRegressionTests extend (10 — HrmConfigs bare-`[Authorize]`+writes `Roles=Admin`; Employees class-`Policy=Hrm_HoSo.Read`+per-action). **FOUND drift** (test theo CODE = single source): Holiday DB UNIQUE (Year,Date) unfiltered vs handler `!IsDeleted` → recreate-on-soft-deleted-slot `DbUpdateException(500)`. REPORTED → em main fixed Mig 43 `.HasFilter("[IsDeleted]=0")` (Case 7 flipped assert SUCCESS). New pattern: EF model-metadata assertion `db.Model.FindEntityType(typeof(X)).GetForeignKeys()...DeleteBehavior` lock schema intent. ⚠️ gotcha #57 backlog: LeaveType.Code + ShiftPattern.Code vẫn unfiltered. - **2026-06-01 (S45 HRM coverage gaps + Holiday drift) [em main proxy]:** +27 test → **181 PASS** (Infra 96→123). 3 file: HrmConfigHolidayTests (7 — composite UNIQUE Create/Update, ⭐self-update giữ key đổi Name no-false-positive, soft-delete exclusion) + EmployeeSatelliteTests (10 — 5× FK-invariant parent `AnyAsync(!IsDeleted)` guard + soft-delete + cascade-non-behavior Case5 + EF model `DeleteBehavior.Cascade` config assertion) + AuthorizePolicyRegressionTests extend (10 — HrmConfigs bare-`[Authorize]`+writes `Roles=Admin`; Employees class-`Policy=Hrm_HoSo.Read`+per-action). **FOUND drift** (test theo CODE = single source): Holiday DB UNIQUE (Year,Date) unfiltered vs handler `!IsDeleted` → recreate-on-soft-deleted-slot `DbUpdateException(500)`. REPORTED → em main fixed Mig 43 `.HasFilter("[IsDeleted]=0")` (Case 7 flipped assert SUCCESS). New pattern: EF model-metadata assertion `db.Model.FindEntityType(typeof(X)).GetForeignKeys()...DeleteBehavior` lock schema intent. ⚠️ gotcha #57 backlog: LeaveType.Code + ShiftPattern.Code vẫn unfiltered.
- **2026-06-07 (S50 wave `h2-verify` — test-structure analysis, write-direct B4) [em main harvest from wave sub-MD]:** No new test (plumbing test). CONFIRMED **181 split = 58 Domain** (3 files) **+ 123 Infra** (19 test + 4 infra Common); raw attrs 48+121=169 → 181 via `[Theory]/[InlineData]` expand (note: corrects older "58+72" → now 58+123 post-S45). **gotcha #57 exact coords (test-before when fixed):** bug OPEN @ `LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19` (bare `.IsUnique()`, no filter) vs fixed `HolidayConfiguration.cs:18 .HasFilter("[IsDeleted] = 0")`. **Template = `HrmConfigHolidayTests.cs:180-197` (Case 7 filtered-unique proof)** — mirror: seed soft-deleted row in slot → Create same slot succeeds → 3 asserts (id NotBeEmpty + CountAsync(active)==1 + CountAsync(all)==2). SQLite honors filtered-unique. Test home = `tests/.../Application/`. Tag [wave-h2, gotcha-57-coords, plumbing].
--- ---

View File

@ -24,3 +24,4 @@ H1 tooling-freshness auditor **SOLUTION_ERP-self**. Read-only + **propose-only**
## 📅 Recent activity (FIFO — older → archive/git) ## 📅 Recent activity (FIFO — older → archive/git)
- **2026-06-07 (CREATED):** Seeded H1 tooling-auditor (adopt AI_INFRA Harness 1, anh giao). Tailored SE: 4 RAG-read (KHÔNG copy AI_INFRA 2-RAG) · `model:inherit` (KHÔNG effort:max) · omit color (8 màu chuẩn cyan/blue/yellow/orange/purple/red/green/pink đã hết). Wired @session-start RE-REPORT (Phase 2.1.1) + @session-end H1 chốt. Nấc: **executed-file, verified-runtime PENDING** CLI restart + first spawn smoke. Tag [created, harness-1, h1]. - **2026-06-07 (CREATED):** Seeded H1 tooling-auditor (adopt AI_INFRA Harness 1, anh giao). Tailored SE: 4 RAG-read (KHÔNG copy AI_INFRA 2-RAG) · `model:inherit` (KHÔNG effort:max) · omit color (8 màu chuẩn cyan/blue/yellow/orange/purple/red/green/pink đã hết). Wired @session-start RE-REPORT (Phase 2.1.1) + @session-end H1 chốt. Nấc: **executed-file, verified-runtime PENDING** CLI restart + first spawn smoke. Tag [created, harness-1, h1].
- **2026-06-07 (S50 FIRST REAL RUN — verified-runtime ✅):** Spawned @session-start (RE-REPORT) + @session-end (CHỐT). Load OK → **verified-runtime CONFIRMED** (closes 'PENDING' above). 4-mặt audit caught **3 freshness drifts** → em main patched all: (1) `agents/README.md:157` plugin **15→18** (+csharp-lsp/typescript-lsp/session-report); (2) `.claude/skills/README.md:20` ef-core **31→43 mig**, `:90` gotcha **49→57** (⭐ MISSED by S44 monthly audit — index file not on its checklist → per-session monitor adds value over monthly cron); (3) verified-runtime markers STATUS/HANDOFF flipped. **Method-learning:** ground-truth EVERY count from disk — `settings.json enabledPlugins` line-count = authoritative plugin#; `skills/README.md``SKILL.md` frontmatter (drift independently). Residual flagged (em main): STATUS RAG-chunk 2406↔2415 contradiction → reconcile to 2415; ASCII diagram 7→10 lanes (cosmetic). Tag [first-run, verified-runtime, freshness-catch].

View File

@ -154,7 +154,7 @@ All 10 agent có **4 RAG-READ MCP**: `search_memory` + `search_code` (BM25, pref
## 🔌 External skill/plugin mapping (H3 — Harness 1 adopt 2026-06-07) ## 🔌 External skill/plugin mapping (H3 — Harness 1 adopt 2026-06-07)
> Floor H3: nạp đúng skill/plugin hợp stack, **gộp-vai KHÔNG phình roster**. Audit (investigator-api 2026-06-07): 15 plugin enabled user-global (`~/.claude/settings.json`) + ~23 standalone skill (`~/.claude/skills/`). **0 agent mới** — mọi cái = skill→gộp-vai-hiện-có. Nấc: enabled/available → **assigned** (bảng dưới = doc) → used (per-session auto-trigger). tooling-auditor (H1) rà new-alloc mỗi session-end. > Floor H3: nạp đúng skill/plugin hợp stack, **gộp-vai KHÔNG phình roster**. Audit (investigator-api 2026-06-07; tooling-auditor H1 re-count S50): **18** plugin enabled user-global (`~/.claude/settings.json` — +csharp-lsp +typescript-lsp +session-report vs S49's 15) + ~23 standalone skill (`~/.claude/skills/`). **0 agent mới** — mọi cái = skill→gộp-vai-hiện-có. Nấc: enabled/available → **assigned** (bảng dưới = doc) → used (per-session auto-trigger). tooling-auditor (H1) rà new-alloc mỗi session-end.
| Skill/plugin (nguồn) | Value-locus | Map → vai | Ghi chú | | Skill/plugin (nguồn) | Value-locus | Map → vai | Ghi chú |
|---|---|---|---| |---|---|---|---|

View File

@ -17,7 +17,7 @@ Skill này là tài liệu chuyên biệt để Claude (và developer khác) dù
| Skill | Mục đích | Trigger ví dụ | Trạng thái | | Skill | Mục đích | Trigger ví dụ | Trạng thái |
|---|---|---|---| |---|---|---|---|
| `dependency-audit-erp` | Scan CVE NuGet + npm 2 FE, respect pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0) | "npm audit", "dotnet vulnerable", "deps scan", "nâng cấp package" | ✅ New Tier 3 | | `dependency-audit-erp` | Scan CVE NuGet + npm 2 FE, respect pin constraint (MediatR 12.4.1, Swashbuckle 6.9.0) | "npm audit", "dotnet vulnerable", "deps scan", "nâng cấp package" | ✅ New Tier 3 |
| `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, **31 migration history** (Init → RefactorSkipToFinalToApproverLevel) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated Session 23 t1 (Mig 31 F2 per-Approver-slot swap) | | `ef-core-migration` | Tạo/revert EF Core 10 migration, 3-file rule, DesignTimeDbContextFactory, **43 migration history** (Init → FilterHolidayUniqueIndexByIsDeleted Mig 43) | "thêm migration", "EF migration", "schema update", "snapshot lỗi" | ✅ Updated S45 (Mig 43 Holiday filtered-unique) |
| `iis-deploy-runbook` | 3 IIS site + win-acme cert + gitea-runner + LibreOffice + debug 500/502/SignalR prod + **G-084 IPv4/IPv6 hardening** | "prod 500", "IIS fail", "cert hết hạn", "restart app pool", "deploy IIS", "port hijack" | ✅ Updated (G-084) | | `iis-deploy-runbook` | 3 IIS site + win-acme cert + gitea-runner + LibreOffice + debug 500/502/SignalR prod + **G-084 IPv4/IPv6 hardening** | "prod 500", "IIS fail", "cert hết hạn", "restart app pool", "deploy IIS", "port hijack" | ✅ Updated (G-084) |
## Format chuẩn 1 skill ## Format chuẩn 1 skill
@ -87,5 +87,5 @@ when-to-use:
## Related ## Related
- `docs/CLAUDE.md` — quick rules + full stack context - `docs/CLAUDE.md` — quick rules + full stack context
- `docs/gotchas.md`49 bẫy đã gặp (S25 +#48 SQLite tie-break, #49 dual-phase UI confusion — pending docs add per HANDOFF) - `docs/gotchas.md`57 bẫy đã gặp (latest #57 soft-delete UNIQUE phải filter `[IsDeleted]=0`, S45)
- `docs/changelog/migration-todos.md` — roadmap 5 phase + Tier 3 - `docs/changelog/migration-todos.md` — roadmap 5 phase + Tier 3

View File

@ -17,4 +17,4 @@
## 📤 OUTBOUND (gửi — qua `/send-email <to>`) ## 📤 OUTBOUND (gửi — qua `/send-email <to>`)
| sent (ISO) | id | from → to | folder | sha256(12) | | sent (ISO) | id | from → to | folder | sha256(12) |
|---|---|---|---|---| |---|---|---|---|---|
| _(chưa gửi message nào — H3 scaffold)_ | | | | | | 2026-06-07 | 2026-06-07-se-to-ai_infra-harness-123-handshake | se → ai_infra | outbox/ai_infra | c9656c198500 |

View File

@ -0,0 +1,27 @@
---
id: 2026-06-07-se-to-ai_infra-harness-123-handshake
from: se
to: ai_infra
category: Coord
type: coord
date: 2026-06-07
content_sha256: c9656c198500d3a429247e37347b87e402c0c4940a19b36a9f4f8cfb3829d93c
nac: sent
---
# SE → AI_INFRA — Harness 1·2·3 adoption handshake + email-channel live test
**Bối cảnh:** SOLUTION_ERP (`se`) đã adopt AI_INFRA Harness 1·2·3 (S49, 2026-06-07, commit `e27d877`). Session S50 (2026-06-07) chạy verified-runtime closeout. Message này = **handshake TEST kênh email Harness 3 (§N)** — message THẬT đầu tiên `se` gửi qua `broadcasts/`.
## Trạng thái verified-runtime (S50)
- **H1 self-observability:** ✅ 2 monitor sub `tooling-auditor` + `harvest-curator` spawned + ran @session-start RE-REPORT. tooling-auditor bắt 3 doc-freshness drift (plugin 15→18, skill-index 31→43 mig, gotcha 49→57) → em main patched. harvest-curator 5-trục 🟢 clean (0-byte/orphan/corruption = 0).
- **H2 wave-folder isolation:** đang test wave-run trong session này (B6 `git check-ignore` + B5 harvest).
- **H3 email channel:** message NÀY là test send-path. Nhờ AI_INFRA chạy `/check-email se` xác nhận **2-way byte-identical** (whole-file `Get-FileHash` + body `content_sha256` đối chứng).
## Đề nghị AI_INFRA
1. `/check-email se` → pull message này → verify hash → confirm ✓.
2. (Optional) reply `/send-email se` 1 ack để `se` test receive-path (hiện `ai_infra/outbox/se/` trống → `se` chưa test được receive half).
## Ghi chú trung thực (G-015)
SE-side send self-verified (body SHA256 khớp frontmatter). AI_INFRA-side pull + 2-way proof = bước của AI_INFRA. Test 181 PASS, không đụng product code.
`se` (SOLUTION_ERP), S50 2026-06-07

View File

@ -2,7 +2,25 @@
> **Tiering rule (S40):** giữ **2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/`. Full brief history pre-S40 → `docs/_archive/HANDOFF-preS40-fullhistory.md`. > **Tiering rule (S40):** giữ **2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/`. Full brief history pre-S40 → `docs/_archive/HANDOFF-preS40-fullhistory.md`.
**Last updated:** 2026-06-07 (Session 49**AI_INFRA Harness 1·2·3 adopt** (HMW-mode ON): H1+H2 = 2 monitor sub TÁCH BIỆT (tooling-auditor + harvest-curator → roster 8→10) + wire session-start/end · H2 wave-folder isolation (hmw.js wave-mode + .gitignore B6) · H3 email channel `broadcasts/` (self=se). reviewer PASS all 3. **executed-file, verified-runtime PENDING CLI restart.** Prev: S48 adap verify closure; S47 adap channel install.) **Last updated:** 2026-06-07 (Session 50**S49 Harness 1·2·3 verified-runtime closeout** (all 3 parts) · S49 adopt context: H1+H2 = 2 monitor sub TÁCH BIỆT (tooling-auditor + harvest-curator → roster 8→10) + wire session-start/end · H2 wave-folder isolation (hmw.js wave-mode + .gitignore B6) · H3 email channel `broadcasts/` (self=se). reviewer PASS all 3. **executed-file → S50 (2026-06-07) FULLY VERIFIED: (a) 2 monitor sub loaded+ran @session-start; (b) H2 wave-mode B6 isolation HELD (Run wf_b7e4d6ef-787); (c) H3 email send-path verified (AI_INFRA pull pending their step).** Prev: S48 adap verify closure; S47 adap channel install.)
---
## S50 (2026-06-07) — S49 Harness 1·2·3 verified-runtime closeout (HMW-mode ON · infra-finish, no product, CI-skip)
**User: `/session-start` → chọn "Finish S49 infra" → `/session-end`. Đóng trọn 3 phần S49 milestone (verified-runtime).**
**Done (em main + 4 sub spawn — all background per visibility feedback):**
- **(a)** `/session-start` spawned 2 monitor sub (tooling-auditor H1 + harvest-curator H2) → **verified-runtime CONFIRMED**. H1 caught + em main patched 3 freshness drifts (plugin 15→18, skill-index 31→43 mig / 49→57 gotcha, verified-runtime markers). H2 harvest 🟢 clean (0-byte/orphan=0). Test **181 PASS**, RAG 2415.
- **(b)** H2 **wave-mode VERIFIED** — Workflow `hmw.js` wave-run `h2-verify` (Run `wf_b7e4d6ef-787`, 2-agent: investigator-codebase read-only + test-specialist write-direct). **B6 isolation HELD** (git status 6-baseline, sub-MD gitignored, chunk 2415=2415, B4 both-paths). Bonus: gotcha #57 exact coords.
- **(c)** H3 **email send-path VERIFIED**`/send-email ai_infra` handshake (body-hash `c9656c19…` self-verified MATCH) → `broadcasts/outbox/ai_infra/` + `_index.md` OUTBOUND.
- **session-end §L:** H2 GATE **PASS 5/5** + B5 wave-gom (2 sub-MD → agent-memory). H1 freshness CHỐT (0 new-alloc). §L.a scan: no new RCA (E-005 git-add guard held — staged specific files).
**🔴 NEXT SESSION:**
- **AI_INFRA-side (their step):** `/check-email se` → pull SE handshake → confirm **2-way byte-identical**; optional reply `/send-email se` so SE tests receive-path (`ai_infra/outbox/se/` currently empty).
- **Product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · **gotcha #57** (coords ready: `LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19`, template `HrmConfigHolidayTests.cs:180-197`, test-before) · P11-D/E/F · Phase 9 Ops.
- **Cleanup (optional):** wave-folder `.claude/workflows/wave-h2-verify/` harvested → safe to delete (gitignored transient).
- **Doc backlog (low):** STATUS Recently Done + HANDOFF over tiering (re-tier next consolidation) · `agents/README.md:13` ASCII 7→10 lanes (cosmetic).
--- ---
@ -18,7 +36,7 @@
- **H3 (email channel):** NEW `broadcasts/` (outbox/{6 others+all} + inbox/{6 others} + _index + inbox/README + **13 .gitkeep**, committed) + 2 cmd send/check-email (self=`se`, 6 others short-id `{ai_infra,vipix,dyd,namgroup,ashico,bvaau}`) + adap-apply base-path fix `outbox/all/`. - **H3 (email channel):** NEW `broadcasts/` (outbox/{6 others+all} + inbox/{6 others} + _index + inbox/README + **13 .gitkeep**, committed) + 2 cmd send/check-email (self=`se`, 6 others short-id `{ai_infra,vipix,dyd,namgroup,ashico,bvaau}`) + adap-apply base-path fix `outbox/all/`.
- **3 adap-report** `docs/governance/adap-reports/2026-06-07-Agent-harness-{1,2,3}.md` + reviewer PASS (no blocker; 1 MINOR pre-existing README diagram → fixed). **Test 181 unchanged** (no .cs). - **3 adap-report** `docs/governance/adap-reports/2026-06-07-Agent-harness-{1,2,3}.md` + reviewer PASS (no blocker; 1 MINOR pre-existing README diagram → fixed). **Test 181 unchanged** (no .cs).
**🔴 NEXT SESSION FIRST (anh restart CLI):** 1 restart activate 2 sub + 2 cmd + hmw.js wave-mode (agent/cmd `.md` no hot-reload). Then: (a) `/session-start` smoke-test 2 monitor sub load + RE-REPORT chạy thật → verified-runtime; (b) optional wave-run 1 workflow DÀI kiểm B6 isolation + B5 harvest; (c) optional `/send-email ai_infra handshake`AI_INFRA `/check-email se` prove 2-way byte-identical. **🔴 S49 NEXT-FIRST — status S50:** restart done. (a) ✅ **DONE S50** `/session-start` spawned 2 monitor sub, both loaded + ran RE-REPORT clean → verified-runtime CONFIRMED (H1 found 3 freshness drifts → patched; H2 harvest 🟢 clean, 0-byte/orphan none); (b) ✅ **DONE S50** — wave-run `h2-verify` (Run wf_b7e4d6ef-787, 2-agent): B6 isolation HELD (git status 6-baseline, sub-MDs gitignored, chunk 2415 unchanged), B4 both-paths exercised (write-direct + read-only-scribe); B5 harvest → harvest-curator @session-end; (c) ✅ **SE-side DONE S50** `/send-email ai_infra` handshake written + body-hash self-verified (`c9656c19…`); **AI_INFRA `/check-email se` pull = their step** to complete 2-way byte-identical proof.
**Next product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops. **Next product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops.

View File

@ -3,7 +3,7 @@
> **Update rule:** trước khi bắt đầu 1 task → ghi row `🔥 In Progress`. Xong → `✅ Recently Done`. > **Update rule:** trước khi bắt đầu 1 task → ghi row `🔥 In Progress`. Xong → `✅ Recently Done`.
> **Tiering rule (S40):** chỉ giữ **state hiện tại + 3 session gần nhất** ở file này. Session cũ hơn → `docs/changelog/sessions/`. Full history pre-S40 → `docs/_archive/STATUS-preS40-fullhistory.md`. (Tránh over-context — xóa double, không cắt nội dung.) > **Tiering rule (S40):** chỉ giữ **state hiện tại + 3 session gần nhất** ở file này. Session cũ hơn → `docs/changelog/sessions/`. Full history pre-S40 → `docs/_archive/STATUS-preS40-fullhistory.md`. (Tránh over-context — xóa double, không cắt nội dung.)
**Last updated:** 2026-06-07 (Session 49 — **AI_INFRA Harness 1·2·3 adopt** (HMW-mode ON — recon fan-out 4 read-only agent @P2 + em main single-writer WRITE ~25 file, governance/infra no product code): H1+H2 = **2 monitor sub TÁCH BIỆT** (tooling-auditor + harvest-curator → roster 8→10) + session-start/end wire · H2 **wave-folder isolation** (hmw.js wave-mode + .gitignore B6 VERIFIED git-check-ignore) · H3 **email channel** `broadcasts/` (self=se, 6+6 folder + 2 cmd). Nấc executed-file, **verified-runtime PENDING CLI restart**. Prev S48: adap verify closure; S47 adap channel install.) **Last updated:** 2026-06-07 (Session 49 — **AI_INFRA Harness 1·2·3 adopt** (HMW-mode ON — recon fan-out 4 read-only agent @P2 + em main single-writer WRITE ~25 file, governance/infra no product code): H1+H2 = **2 monitor sub TÁCH BIỆT** (tooling-auditor + harvest-curator → roster 8→10) + session-start/end wire · H2 **wave-folder isolation** (hmw.js wave-mode + .gitignore B6 VERIFIED git-check-ignore) · H3 **email channel** `broadcasts/` (self=se, 6+6 folder + 2 cmd). **S50 (2026-06-07) verified-runtime: 2 monitor sub (tooling-auditor H1 + harvest-curator H2) CONFIRMED loaded+ran @session-start RE-REPORT** (test gate 181 PASS). **H2 wave-mode VERIFIED** (Run wf_b7e4d6ef-787: 2-agent wave, B6 isolation HELD — git status 6-baseline/chunk 2415 unchanged, B4 both-paths exercised) + **H3 email send-path VERIFIED** (handshake → outbox/ai_infra, body-hash self-verified; AI_INFRA /check-email se pull = their step). Prev S48: adap verify closure; S47 adap channel install.)
--- ---
@ -18,10 +18,10 @@
| Menu keys | **~53** | BE `MenuKeys` const (FE menuKeys.ts mirror 54) | | Menu keys | **~53** | BE `MenuKeys` const (FE menuKeys.ts mirror 54) |
| Tests | **181 PASS** | 58 Domain + 123 Infra · 0 fail / 0 skip · +27 HRM coverage S45 (Holiday/EmployeeSatellite/authz) | | Tests | **181 PASS** | 58 Domain + 123 Infra · 0 fail / 0 skip · +27 HRM coverage S45 (Holiday/EmployeeSatellite/authz) |
| Gotchas | **57** | `docs/gotchas.md` (latest #57 soft-delete UNIQUE phải filter [IsDeleted]=0, S45) | | Gotchas | **57** | `docs/gotchas.md` (latest #57 soft-delete UNIQUE phải filter [IsDeleted]=0, S45) |
| User memory | **15** | 14 + new S47 (adap-channel); index updated | | User memory | **17** | +S50 monitor-residual-write-containment (E-006 lesson); H2 S50 cross-check 0 orphan/0 byte |
| Skills | 6 | 3 domain + 3 ops | | Skills | 6 | 3 domain + 3 ops |
| Sub-agents | **10** | Opus 4.8 1M · 8 product/quality (7 core + frontend-designer) + **2 monitor INFORM-only** (tooling-auditor H1 + harvest-curator H2, S49 2026-06-07 Harness 1 — verified-runtime PENDING CLI restart) | | Sub-agents | **10** | Opus 4.8 1M · 8 product/quality (7 core + frontend-designer) + **2 monitor INFORM-only** (tooling-auditor H1 + harvest-curator H2, S49 2026-06-07 Harness 1 — **verified-runtime CONFIRMED S50** both spawned+ran clean) |
| RAG chunks | **2406** | ✅ S41 re-bootstrap clean (3080→2406, 674 junk: node_modules+_archive now excluded; user-memory 60 chunks/10 files slug-fixed + S38-S41 indexed) | | RAG chunks | **2415** | live (S50 verified ×2 via `list_projects`) · S41 baseline 2406 (3080→2406 674 junk) +9 store_memory since · last_indexed 2026-05-29 stale ~9d (AI_INFRA re-index op) |
**Bundle hash live (prod):** admin `DPPTx2Kw` · user `CjoUEsoV` (Gitea Run #369, S48 — rotated from `Krjvg_3j`/`6sNStgxa` by login a11y fix). cicd-monitor PASS: test 181 · Mig stays 43 · health/smoke 200 ×4. **Bundle hash live (prod):** admin `DPPTx2Kw` · user `CjoUEsoV` (Gitea Run #369, S48 — rotated from `Krjvg_3j`/`6sNStgxa` by login a11y fix). cicd-monitor PASS: test 181 · Mig stays 43 · health/smoke 200 ×4.
**Phase:** ✅ Phase 10 COMPLETE · 🔄 **Phase 11 IN PROGRESS** — P11-A + P11-B DONE (deployed prod) · ⬜ P11-C..F pending (P11-C Vehicle+Driver recon ready S45) · 🧪 S45 test-gap stabilization + Mig 43 Holiday fix shipped · 🚫 Phase 9 Ops blocked (anh main coordinate). **Phase:** ✅ Phase 10 COMPLETE · 🔄 **Phase 11 IN PROGRESS** — P11-A + P11-B DONE (deployed prod) · ⬜ P11-C..F pending (P11-C Vehicle+Driver recon ready S45) · 🧪 S45 test-gap stabilization + Mig 43 Holiday fix shipped · 🚫 Phase 9 Ops blocked (anh main coordinate).
@ -30,11 +30,11 @@
--- ---
## 🔥 In Progress (S48) ## 🔥 In Progress (S50)
| Task | Owner | Status | | Task | Owner | Status |
|---|---|---| |---|---|---|
| _(none — S48 closed all 3 adap items post-restart (store_memory verified-runtime · FD2 verified-ran · Gov-v2 error-ledger+§L.b built). **NEXT product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) / gotcha #57 LeaveType+Shift filtered-unique / P11-D-F / Phase 9 Ops)_ | 👤 | ✅ | | _(none — S50 closed S49 infra-finish: Harness 1·2·3 **verified-runtime** (2 monitor sub + wave-mode B6 isolation + email send-path). **NEXT product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) / gotcha #57 LeaveType+Shift filtered-unique (coords ready: LeaveTypeConfiguration.cs:19 + ShiftPatternConfiguration.cs:19) / P11-D-F / Phase 9 Ops)_ | 👤 | ✅ |
**S40 done:** ✅ Consolidation (`d2f52ba`) · ✅ Curate 4 agent MEMORY >25KB→<8.4KB (`78c9de3`) · RAG catch-up chunk S37-S40 (rerank 0.867) · **AI_INFRA bulletin 2026-05-29 adopt 4/4** (MỤC2 Tiered Memory Policy v1 `6f08d1f` + MỤC3 /session-start+/session-end slash commands `c8ff5e1`). Full RAG re-index = AI_INFRA op (cần VOYAGE_API_KEY). **S40 done:** ✅ Consolidation (`d2f52ba`) · ✅ Curate 4 agent MEMORY >25KB→<8.4KB (`78c9de3`) · RAG catch-up chunk S37-S40 (rerank 0.867) · **AI_INFRA bulletin 2026-05-29 adopt 4/4** (MỤC2 Tiered Memory Policy v1 `6f08d1f` + MỤC3 /session-start+/session-end slash commands `c8ff5e1`). Full RAG re-index = AI_INFRA op (cần VOYAGE_API_KEY).
@ -44,6 +44,12 @@
## ✅ Recently Done (newest on top — 3 session; cũ hơn → session logs) ## ✅ Recently Done (newest on top — 3 session; cũ hơn → session logs)
### S50 (2026-06-07) — ✅ S49 Harness 1·2·3 verified-runtime closeout (HMW-mode ON · infra-finish, no product code, CI-skip)
- **`/session-start` bootstrap** spawned **2 monitor sub** (tooling-auditor H1 + harvest-curator H2) RE-REPORT **verified-runtime CONFIRMED** (S49 milestone (a) closed). H1 caught 3 doc-freshness drifts em main patched (plugin 1518 · skill-index 3143 mig + 4957 gotcha · verified-runtime markers). H2 harvest 🟢 clean (0-byte/orphan/corruption=0). Test gate **181 PASS**, RAG 2415.
- **(b) H2 wave-mode VERIFIED** wave-run `h2-verify` (Workflow Run `wf_b7e4d6ef-787`, 2-agent: investigator-codebase read-only + test-specialist write-direct). **B6 isolation HELD**: git status = 6-baseline only (0 canonical/agent-memory leak), sub-MDs gitignored, **chunk 2415→2415** (0 rogue RAG write). B4 both-paths exercised. Bonus: gotcha #57 confirmed open + exact coords (`LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19` vs fixed `HolidayConfiguration.cs:18`).
- **(c) H3 email send-path VERIFIED** `/send-email ai_infra` handshake `broadcasts/outbox/ai_infra/`, body SHA256 `c9656c19…` self-verified MATCH + `_index.md` OUTBOUND logged. AI_INFRA `/check-email se` pull = their step (completes 2-way byte-identical proof).
- **§L.b(d)(f)(g) session-end:** H2 GATE **PASS 5/5** + B5 wave-gom (2 sub-MD agent-memory/{investigator-codebase,test-specialist}). H1 freshness CHỐT (3 drifts patched, 0 new-alloc). 4 sub spawn-records all nấc=verified. **Rig fact:** Bash subs = `/usr/bin/bash` not PowerShell POSIX only. session log `2026-06-07-S50-harness-verified-runtime.md`.
### S49 (2026-06-07) — 🌐 AI_INFRA Harness 1·2·3 adopt (HMW-mode ON · governance/infra, no product code, CI-skip) ### S49 (2026-06-07) — 🌐 AI_INFRA Harness 1·2·3 adopt (HMW-mode ON · governance/infra, no product code, CI-skip)
- **HMW-mode BẬT** (`/ultra-on` marker `.claude/hmw-mode.on` gitignored) anh `/adap-apply harness 1·2·3`. **Recon fan-out 4 read-only agent @P2** (3× investigator-codebase H1/H2/H3 gap + 1× investigator-api plugin/skill audit · return-delta · 367K tok · ~4m46s) em main single-writer WRITE ~25 file. **Containment audit post-P2:** git-diff = 1 file-write (inv-api self-MEMORY, benign verified) + chunk-count **2414=2414** (0 RAG-write) defense-in-depth proven (sub giữ Bash/Write G-015). - **HMW-mode BẬT** (`/ultra-on` marker `.claude/hmw-mode.on` gitignored) anh `/adap-apply harness 1·2·3`. **Recon fan-out 4 read-only agent @P2** (3× investigator-codebase H1/H2/H3 gap + 1× investigator-api plugin/skill audit · return-delta · 367K tok · ~4m46s) em main single-writer WRITE ~25 file. **Containment audit post-P2:** git-diff = 1 file-write (inv-api self-MEMORY, benign verified) + chunk-count **2414=2414** (0 RAG-write) defense-in-depth proven (sub giữ Bash/Write G-015).
- **Harness 1 (Self-observability):** roster **8→10** NEW 2 sub **TÁCH BIỆT** (anh-mandate) `tooling-auditor` (H1 tooling/docs-freshness 4-mặt skill·sub-role·plugin·docs) + `harvest-curator` (H2 harvest-integrity 5-trục), INFORM-only (4 RAG-read, NO store_memory/Write). Wire `session-start.md` Phase 2.1.1 RE-REPORT + `session-end.md` §L.b **6→7-step** (H2 5-trục GATE + H1 chốt + B5 wave-gom). H3 plugin/skill = gộp-vai doc (0 agent mới code-modernization/code-reviewer KHÔNG enable). - **Harness 1 (Self-observability):** roster **8→10** NEW 2 sub **TÁCH BIỆT** (anh-mandate) `tooling-auditor` (H1 tooling/docs-freshness 4-mặt skill·sub-role·plugin·docs) + `harvest-curator` (H2 harvest-integrity 5-trục), INFORM-only (4 RAG-read, NO store_memory/Write). Wire `session-start.md` Phase 2.1.1 RE-REPORT + `session-end.md` §L.b **6→7-step** (H2 5-trục GATE + H1 chốt + B5 wave-gom). H3 plugin/skill = gộp-vai doc (0 agent mới code-modernization/code-reviewer KHÔNG enable).
@ -136,7 +142,7 @@
### 🔧 Maintenance backlog ### 🔧 Maintenance backlog
- RAG re-ingest `solution_erp` S42-S43 content (store_memory stopgap live; full re-index = AI_INFRA op) - RAG re-ingest `solution_erp` S42-S43 content (store_memory stopgap live; full re-index = AI_INFRA op)
- **Test coverage gaps Gap1/2/3 DONE S45** (+27 test). NEW backlog (gotcha #57): **LeaveType.Code + ShiftPattern.Code UNIQUE chưa filter `[IsDeleted]=0`** (cùng class Holiday Mig 43 recreate-on-soft-deleted-slot 500; test-before khi fix). Cân nhắc gộp vào P11-C khi đụng HrmConfigs. - **Test coverage gaps Gap1/2/3 DONE S45** (+27 test). NEW backlog (gotcha #57): **LeaveType.Code + ShiftPattern.Code UNIQUE chưa filter `[IsDeleted]=0`** (cùng class Holiday Mig 43 recreate-on-soft-deleted-slot 500; test-before khi fix). **Wave-verified S50 (exact coords):** `LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19` bare `.IsUnique()` vs fixed `HolidayConfiguration.cs:18 .HasFilter("[IsDeleted] = 0")`; test template = `HrmConfigHolidayTests.cs:180-197` (Case 7). Cân nhắc gộp vào P11-C khi đụng HrmConfigs.
- Skill + doc drift audit cron **2026-06-01 DONE (S44)** 42 count-drift fixes + AI_INFRA bundle adopt; next **2026-07-01** - Skill + doc drift audit cron **2026-06-01 DONE (S44)** 42 count-drift fixes + AI_INFRA bundle adopt; next **2026-07-01**
### 🚫 Phase 9 Ops (blocked — anh main coordinate) ### 🚫 Phase 9 Ops (blocked — anh main coordinate)

View File

@ -0,0 +1,29 @@
# S50 (2026-06-07) — Harness 1·2·3 verified-runtime closeout + AS-10 autonomous-write finding
> **Type:** infra-finish (governance, no product code, CI-skip). HMW-mode ON. Continues S49 (Harness 1·2·3 adopt).
> **Test:** 181 PASS (58 Domain + 123 Infra) unchanged — 0 `.cs` touched.
## TL;DR
S49 left the Harness 1·2·3 adoption at **executed-file, verified-runtime PENDING CLI restart**. S50 = post-restart verification of all 3 parts → **fully verified-runtime**. Then session-end surfaced a real **AS-10 containment finding**: monitor sub(s) autonomously wrote canonical/agent-memory files; em-main git-diff commit-gate caught + verified all (accurate, no corruption, chunk 2415) → adopted per AS-10 keep-if-correct + logged E-006.
## S49 milestone closure (the "🔴 NEXT-FIRST")
- **(a) H1+H2 monitor subs verified-runtime** — `/session-start` spawned `tooling-auditor` (H1) + `harvest-curator` (H2) for the Phase 2.1.1 RE-REPORT. Both loaded + ran post-restart → verified-runtime CONFIRMED.
- H1 caught **3 doc-freshness drifts** → em main patched: plugin `15→18` (`agents/README.md:157`), skill-index `31→43` mig + `49→57` gotcha (`skills/README.md:20,90`**missed by S44 monthly audit**, index file not on its checklist), verified-runtime markers.
- H2 harvest 🟢 clean: 16 user-memory pointers ↔ 16 files, 0 orphan / 0 byte / 0 corruption.
- **(b) H2 wave-mode verified-runtime** — wave-run `h2-verify` (Workflow Run `wf_b7e4d6ef-787`, 2-agent: investigator-codebase read-only + test-specialist write-direct). **B6 isolation HELD**: post-P2 `git status` = baseline only (0 canonical/agent-memory leak at wave instant), sub-MDs gitignored (`.gitignore:93`), **chunk-count 2415→2415** (0 rogue RAG write). B4 both-paths exercised (write-direct + read-only-scribe).
- **Bonus:** gotcha #57 confirmed open + exact coords — `LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19` bare `.IsUnique()` vs fixed `HolidayConfiguration.cs:18 .HasFilter("[IsDeleted] = 0")`; test template `HrmConfigHolidayTests.cs:180-197`.
- **(c) H3 email send-path verified-runtime (SE-side)** — `/send-email ai_infra` handshake → `broadcasts/outbox/ai_infra/2026-06-07-se-to-ai_infra-harness-123-handshake.md`, body SHA256 `c9656c19…` self-verified MATCH + `_index.md` OUTBOUND logged. **2-way byte-identical = pending AI_INFRA `/check-email se`** (their step; `ai_infra/outbox/se/` empty so SE receive-path untested).
## Rig fact (cross-cutting, both wave subs + both monitors)
Bash tool routes to **`/usr/bin/bash`, NOT PowerShell**, despite `env=PowerShell`. Read-only/Bash-only subs MUST use POSIX (`git ls-files`/`grep`/`ls`) — `Get-ChildItem`/`Select-String`/`Test-Path` fail (exit 2/127). Also: chunk-count must be verified via **RAG MCP `list_projects`**, NOT a shell `curl localhost:6333` (MCP points at a different Qdrant host → false "not found").
## ⚠️ AS-10 finding — autonomous monitor write at session-end (E-006)
At `/session-end`, `git status` showed **14 modified files**, but em-main had only edited ~7. The remainder — `error-ledger.md` (2 guard promotions + #57 coords), 3 `adap-reports` (nac→verified-runtime), 4 `agent-memory/*` (S50 Recent-activity), and parts of `STATUS.md` (Recently-Done S50 block + In-Progress flip + RAG-line reconcile) — were written by a **non-em-main actor** (mtimes 00:0000:05 = session-end monitor window; the 2 INFORM-only monitors were briefed propose-only and reported "wrote nothing").
- **Containment HELD:** em-main `git diff` surfaced every changed line → reviewed all → **accurate, benign, correctly-placed, 0 mojibake, chunk 2415** (no RAG corruption). Adopted per AS-10 "keep if correct" under single-writer commit-gate authority.
- **Process gap flagged:** propose-only monitors should not write canonical files (B3 single-writer). Provenance not definitively attributable, but the write happened (G-015 residual Bash channel). RECOMMEND anh/AI_INFRA review monitor tool-grants or add a session-end tracked-path write-guard. Self-report Fidelity gap noted (escalate reviewer if recurs).
## Files touched (14, docs/infra only — CI-skip)
STATUS · HANDOFF · agents/README · skills/README · error-ledger · 3 adap-reports · 4 agent-memory · broadcasts/_index + handshake. Wave-folder `.claude/workflows/wave-h2-verify/` gitignored (harvested by H2 B5 → disposable).
## Next (anh pick)
P11-C Vehicle+Driver (Mig 44, recon + #57 coords ready) · gotcha #57 standalone fix · P11-D/E/F · Phase 9 Ops · (governance) monitor tool-grant tightening decision.

View File

@ -6,7 +6,7 @@
`2026-06-07-Agent-harness-1` (category: Agent · reviewer_gate: **PASS** · nac: published · targets: **all-fit**). Harness 1 = Self-observability: **H1** tooling-freshness audit + **H2** harvest-integrity audit (⚠️ anh-mandate 2 sub TÁCH BIỆT) + **H3** plugin/skill adoption (gộp-vai, KHÔNG phình roster). `2026-06-07-Agent-harness-1` (category: Agent · reviewer_gate: **PASS** · nac: published · targets: **all-fit**). Harness 1 = Self-observability: **H1** tooling-freshness audit + **H2** harvest-integrity audit (⚠️ anh-mandate 2 sub TÁCH BIỆT) + **H3** plugin/skill adoption (gộp-vai, KHÔNG phình roster).
## 2. nac G-011 ## 2. nac G-011
**executed-file** (2 sub mới + 2 memory seed + agents/README roster 8→10 + session-start Phase 2.1.1 + session-end §L.b 7-step + H3 mapping section written) → **VERIFIED-pending CLI restart** (agent `.md` no hot-reload → cần (a) restart Claude Code để registry load tooling-auditor + harvest-curator, (b) 1 spawn-test mỗi sub confirm load OK + chạy 4-mặt/5-trục thật). H3 = recommend-only executed (mapping doc written; 0 plugin enable thực — skills đã available user-global). **executed-file** (2 sub mới + 2 memory seed + agents/README roster 8→10 + session-start Phase 2.1.1 + session-end §L.b 7-step + H3 mapping section written) → **VERIFIED-pending CLI restart** (agent `.md` no hot-reload → cần (a) restart Claude Code để registry load tooling-auditor + harvest-curator, (b) 1 spawn-test mỗi sub confirm load OK + chạy 4-mặt/5-trục thật). H3 = recommend-only executed (mapping doc written; 0 plugin enable thực — skills đã available user-global). **→ S50 (2026-06-07) VERIFIED-runtime ✅:** restart done; tooling-auditor + harvest-curator spawned @session-start + @session-end, ran 4-mặt (H1: caught+patched 3 doc-drifts plugin 15→18 / skill-index 31→43 / 49→57) + 5-trục (H2: GATE PASS 5/5).
## 3. evidence ## 3. evidence
**PROJECT-FIT = ADOPT (tailored).** H1 phổ-quát (mọi roster cần freshness). H2 ADOPT (SE có 10-sub roster + Workflow → có memory để harvest). H3 per-stack. **PROJECT-FIT = ADOPT (tailored).** H1 phổ-quát (mọi roster cần freshness). H2 ADOPT (SE có 10-sub roster + Workflow → có memory để harvest). H3 per-stack.
@ -36,7 +36,7 @@ commit-sha: **`e27d877`** (S49, 2026-06-07 — 37 files, +626/-23, governance/in
- **KHÔNG skip mục nào** (H1/H2/H3 đều fit). H3 = recommend+map (KHÔNG enable plugin agent-bearing — đúng floor "CHỈ enable nếu lấp lỗ-hổng roster THẬT"; roster 10 đã đủ). - **KHÔNG skip mục nào** (H1/H2/H3 đều fit). H3 = recommend+map (KHÔNG enable plugin agent-bearing — đúng floor "CHỈ enable nếu lấp lỗ-hổng roster THẬT"; roster 10 đã đủ).
## 5. honest-caveat ## 5. honest-caveat
- **🔴 nấc honest:** executed-file, **CHƯA verified-runtime**. 2 sub CHƯA spawn lần nào (agent .md no hot-reload). Đừng đọc report = "monitor đã chạy". verified-runtime cần anh restart CLI + spawn-test tooling-auditor/harvest-curator (giống S39 split + S47 frontend-designer lesson). - ** nấc UPDATED S50:** **verified-runtime CONFIRMED** 2 monitor sub spawned + ran @session-start (RE-REPORT) + @session-end (CHỐT/GATE). _(S49-time caveat "CHƯA verified-runtime / 2 sub chưa spawn" = RESOLVED.)_
- **G-015 KHÔNG overclaim:** 2 sub = **propose-only**, KHÔNG "read-only enforced". `store_memory` strip = tool RAG-write không-gọi-được; NHƯNG giữ `Bash` = write-channel mở (recon-wave này đã CHỨNG: investigator-api tự-APPEND MEMORY.md qua Write/Bash dù strip — git-diff bắt 1 file-write, chunk-count 2414=2414 bắt 0 RAG-write). Containment = defense-in-depth (em main single-writer + git-diff + chunk-count), KHÔNG allowlist đơn-độc. - **G-015 KHÔNG overclaim:** 2 sub = **propose-only**, KHÔNG "read-only enforced". `store_memory` strip = tool RAG-write không-gọi-được; NHƯNG giữ `Bash` = write-channel mở (recon-wave này đã CHỨNG: investigator-api tự-APPEND MEMORY.md qua Write/Bash dù strip — git-diff bắt 1 file-write, chunk-count 2414=2414 bắt 0 RAG-write). Containment = defense-in-depth (em main single-writer + git-diff + chunk-count), KHÔNG allowlist đơn-độc.
- **name-collision (FORM, KHÔNG runtime):** tooling-auditor/harvest-curator trùng tên AI_INFRA canonical — KHÁC repo → KHÔNG collision lúc chạy; body ĐÃ tailor SE (KHÔNG copy-paste). code-reviewer (×3 nguồn) collide roster reviewer → giữ `reviewer` canonical, KHÔNG enable plugin code-reviewer. - **name-collision (FORM, KHÔNG runtime):** tooling-auditor/harvest-curator trùng tên AI_INFRA canonical — KHÁC repo → KHÔNG collision lúc chạy; body ĐÃ tailor SE (KHÔNG copy-paste). code-reviewer (×3 nguồn) collide roster reviewer → giữ `reviewer` canonical, KHÔNG enable plugin code-reviewer.
- **H3 plugin nấc:** 15 plugin = ENABLED user-global, mapping doc = **assigned**, CHƯA used-in-session. KHÔNG conflate "enabled"="đang dùng". - **H3 plugin nấc:** 15 plugin = ENABLED user-global, mapping doc = **assigned**, CHƯA used-in-session. KHÔNG conflate "enabled"="đang dùng".

View File

@ -6,7 +6,7 @@
`2026-06-07-Agent-harness-2` (category: Agent · reviewer_gate: **PASS** · nac: published · targets: **all-fit**). Harness 2 = Agent-team (A1-A2) + **Workflow wave-folder memory-isolation** (B1-B6). Prereq: #1 store_memory-strip (S47 ✓) + #4 ultracode-HMW (S49 ✓) + Harness 1 H2 harvest-curator (cùng session này ✓). `2026-06-07-Agent-harness-2` (category: Agent · reviewer_gate: **PASS** · nac: published · targets: **all-fit**). Harness 2 = Agent-team (A1-A2) + **Workflow wave-folder memory-isolation** (B1-B6). Prereq: #1 store_memory-strip (S47 ✓) + #4 ultracode-HMW (S49 ✓) + Harness 1 H2 harvest-curator (cùng session này ✓).
## 2. nac G-011 ## 2. nac G-011
**executed-file** (hmw.js wave-mode patch + .gitignore B6 + workflows/README + session-end B5 wire written; B6 gitignore **VERIFIED-runtime** qua `git check-ignore -v`) → **VERIFIED-pending wave-run** (cần restart + 1 WAVE-MODE workflow thật để prove B6 isolation live + B5 harvest chạy). B1 spawn-from-real-sub = **đã live** (hmw.js VALID_ROLES 8 + slice-inject, dùng từ S49). **executed-file** (hmw.js wave-mode + .gitignore B6 + workflows/README + session-end B5 wire) → **VERIFIED-runtime S50 (2026-06-07) ✅:** wave-run `h2-verify` (Workflow Run `wf_b7e4d6ef-787`, 2-agent) proved B6 isolation END-TO-END (git-diff agent-memory EMPTY + sub-MD gitignored + chunk 2415=2415, 0 leak) + B4 both-paths (write-direct + read-only-scribe) + B5 harvest (harvest-curator gom 2 sub-MD → agent-memory). B6 gitignore already verified S49 via `git check-ignore -v`. B1 spawn-from-real-sub live since S49.
## 3. evidence ## 3. evidence
**PROJECT-FIT = ADOPT B (tailored) · A = n-a-convention-ready.** SE chạy Workflow fan-out (recon-wave session này = bằng chứng). A (agent-team) = Windows in-process only → SE chưa dùng team thật. **PROJECT-FIT = ADOPT B (tailored) · A = n-a-convention-ready.** SE chạy Workflow fan-out (recon-wave session này = bằng chứng). A (agent-team) = Windows in-process only → SE chưa dùng team thật.
@ -36,7 +36,7 @@ commit-sha: **`e27d877`** (S49, 2026-06-07 — shared 37-file adoption commit).
- **ADD-mode (KHÔNG thay return-delta):** wave-mode CHỈ workflow DÀI; fan-out nhẹ (recon-wave session này) giữ return-delta-only — #4 ultracode floor không vỡ. - **ADD-mode (KHÔNG thay return-delta):** wave-mode CHỈ workflow DÀI; fan-out nhẹ (recon-wave session này) giữ return-delta-only — #4 ultracode floor không vỡ.
## 5. honest-caveat ## 5. honest-caveat
- **🔴 nấc honest:** B6 gitignore = **verified-runtime** (git check-ignore THẬT). NHƯNG wave-mode END-TO-END (sub ghi sub-MD isolated + B5 harvest) = **CHƯA wave-run nào chạy** → executed-file, pending 1 WAVE-MODE workflow thật post-restart. recon-wave session này = DEFAULT return-delta (KHÔNG wave) → chưa exercise wave path. - ** nấc UPDATED S50:** wave-mode END-TO-END **verified-runtime** — wave-run `h2-verify` exercised sub-MD-isolated-write (B4) + B5 harvest + B6 isolation audit (git-diff/chunk clean). _(S49-time caveat "CHƯA wave-run nào chạy" = RESOLVED.)_
- **G-015 KHÔNG overclaim isolation "ENFORCED":** containment = gitignore-wave + lead git-diff post-P2 + lead-scribe(read-only sub) = defense-in-depth, KHÔNG sandbox cứng. Read-only sub vẫn giữ Bash → ghi-ngoài-repo (git-diff mù) / curl Qdrant (chunk-count bắt). Câu đúng = "sub ghi-direct chỉ wave-folder; ghi-ra-MD-chính bị git-diff bắt (in-repo); ngoài-repo/RAG cần chunk-count". - **G-015 KHÔNG overclaim isolation "ENFORCED":** containment = gitignore-wave + lead git-diff post-P2 + lead-scribe(read-only sub) = defense-in-depth, KHÔNG sandbox cứng. Read-only sub vẫn giữ Bash → ghi-ngoài-repo (git-diff mù) / curl Qdrant (chunk-count bắt). Câu đúng = "sub ghi-direct chỉ wave-folder; ghi-ra-MD-chính bị git-diff bắt (in-repo); ngoài-repo/RAG cần chunk-count".
- **Lead-scribe ≠ sub-write-direct cho read-only sub:** 4 SE read-only sub (investigator×2/reviewer/cicd) KHÔNG có Write → "ghi wave-folder" thực = return findings→em main scribe. Chỉ 4 Write-sub mới ghi-direct được. KHÔNG claim "sub tự-ghi-direct" cho read-only. - **Lead-scribe ≠ sub-write-direct cho read-only sub:** 4 SE read-only sub (investigator×2/reviewer/cicd) KHÔNG có Write → "ghi wave-folder" thực = return findings→em main scribe. Chỉ 4 Write-sub mới ghi-direct được. KHÔNG claim "sub tự-ghi-direct" cho read-only.
- **hmw.js JS chưa node-check được** (top-level await/return — runtime-wrapped). Syntax confidence từ mirror AI_INFRA template (proven) + careful edit; verified-runtime cần 1 invoke thật. - **hmw.js JS chưa node-check được** (top-level await/return — runtime-wrapped). Syntax confidence từ mirror AI_INFRA template (proven) + careful edit; verified-runtime cần 1 invoke thật.

View File

@ -6,7 +6,7 @@
`2026-06-07-Agent-harness-3` (category: Agent · reviewer_gate: **PASS** · nac: published · targets: **all-fit** · content_sha256 in frontmatter). Harness 3 = Email channel cross-project (per-project `broadcasts/`) — kênh comms CHUẨN + DUY NHẤT giữa 7 project (§N single-channel · §J2 pull-copy · 2-stage inbox · envelope SHA256 · infra-CC §N3 · adap=fan-out sub-mode). `2026-06-07-Agent-harness-3` (category: Agent · reviewer_gate: **PASS** · nac: published · targets: **all-fit** · content_sha256 in frontmatter). Harness 3 = Email channel cross-project (per-project `broadcasts/`) — kênh comms CHUẨN + DUY NHẤT giữa 7 project (§N single-channel · §J2 pull-copy · 2-stage inbox · envelope SHA256 · infra-CC §N3 · adap=fan-out sub-mode).
## 2. nac G-011 ## 2. nac G-011
**executed-file** (broadcasts/ tree 13-dir + 13 .gitkeep + _index + inbox/README + 2 command se-tailored + adap-apply base-path fix — all written/committed-pending) → **VERIFIED-pending** (cần (a) restart Claude Code để `/send-email` `/check-email` hot-reload, (b) 1 handshake round-trip `/send-email ai_infra` AI_INFRA `/check-email se` prove 2-way byte-identical). PROJECT-FIT = **Universal (KHÔNG n-a)**. **executed-file** (broadcasts/ tree + 2 command + adap-apply base-path fix) → **SE-side VERIFIED-runtime S50 (2026-06-07) ✅, 2-way PARTIAL:** `/send-email ai_infra` handshake written `outbox/ai_infra/2026-06-07-se-to-ai_infra-harness-123-handshake.md` + body SHA256 `c9656c19…` self-verified MATCH + `_index.md` OUTBOUND logged. **2-way byte-identical = pending AI_INFRA `/check-email se` (their step)**; receive-path untested (`ai_infra/outbox/se/` empty). PROJECT-FIT = **Universal**.
## 3. evidence ## 3. evidence
**PROJECT-FIT = ADOPT (Universal).** Mọi project cần kênh comms; SE scaffold để nhận được dù chưa active. **PROJECT-FIT = ADOPT (Universal).** Mọi project cần kênh comms; SE scaffold để nhận được dù chưa active.
@ -36,7 +36,7 @@ commit-sha: **`e27d877`** (S49, 2026-06-07 — shared 37-file adoption commit).
- **KHÔNG skip** (Universal, no n-a). - **KHÔNG skip** (Universal, no n-a).
## 5. honest-caveat ## 5. honest-caveat
- **🔴 nấc honest:** scaffold + commands = executed-file. **CHƯA handshake** — verified-runtime cần restart + 1 round-trip `/send-email ai_infra "handshake"` → AI_INFRA `/check-email se` prove byte-identical 2-way. Đừng claim "channel live/active". - ** nấc UPDATED S50:** SE send-path **verified-runtime** (handshake written + body-hash self-verified MATCH). **2-way still pending** AI_INFRA `/check-email se` pull (their step) — KHÔNG claim full 2-way until they confirm. _(S49-time "CHƯA handshake" = SE-side resolved.)_
- **G-015 accuracy (giữ verbatim broadcast):** "đối chứng" = **whole-file byte-identical 2 bản** (outbox sender vs inbox receiver) = bằng chứng THẬT (primary). `content_sha256` = **self-check phụ** — KHÔNG tamper-proof (kẻ sửa body recompute hash được); chỉ cross-copy-match. KHÔNG mô tả "tamper-proof/secure". §J2 = mỗi bên ghi repo MÌNH (KHÔNG "AI_INFRA ghi giúp"). - **G-015 accuracy (giữ verbatim broadcast):** "đối chứng" = **whole-file byte-identical 2 bản** (outbox sender vs inbox receiver) = bằng chứng THẬT (primary). `content_sha256` = **self-check phụ** — KHÔNG tamper-proof (kẻ sửa body recompute hash được); chỉ cross-copy-match. KHÔNG mô tả "tamper-proof/secure". §J2 = mỗi bên ghi repo MÌNH (KHÔNG "AI_INFRA ghi giúp").
- **path-coupling:** 7 broadcasts root = abs Windows path 1 Dropbox (send-email.md:13-22). web-migration sau → sửa 1 chỗ id-map. - **path-coupling:** 7 broadcasts root = abs Windows path 1 Dropbox (send-email.md:13-22). web-migration sau → sửa 1 chỗ id-map.
- **2 command runtime-pending:** send/check-email `.md` no hot-reload → CHƯA gọi được tới khi restart. (đã thấy trong skill registry = loaded, nhưng invoke-runtime cần restart confirm.) - **2 command runtime-pending:** send/check-email `.md` no hot-reload → CHƯA gọi được tới khi restart. (đã thấy trong skill registry = loaded, nhưng invoke-runtime cần restart confirm.)

View File

@ -43,14 +43,22 @@ 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) | ++ | | 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) | | **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) | ++ | | 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) | episodic | 1 (S49) | ✅ S49 (caught inv-api self-MEMORY write in git-diff; chunk-count 2414=2414 = 0 RAG-write) | ++ (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)** | ++ (G-015 honest — NOT allowlist-alone) |
| heavy spawn → `run_in_background` | looks-frozen | episodic | 2 (S45, S48) | ✅ S48 (FD bg) | + | | 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) | ++ | | RAG glob `**/`-anchored (not root) | gotcha #10 node_modules leak | procedural | 1 (S41) | ✅ (2406 clean) | ++ |
## 📋 RCA entries (blameless — newest on top) ## 📋 RCA entries (blameless — newest on top)
> Format: `E-NNN | date | rule | what | 5-why root | fix (prod-bug = 2-fix: code + guard) | prevention | tags[TYPE/ACTOR/COMPONENT]` > Format: `E-NNN | date | rule | what | 5-why root | fix (prod-bug = 2-fix: code + guard) | prevention | tags[TYPE/ACTOR/COMPONENT]`
### E-006 — AS-10 autonomous monitor write at session-end (S50, git-diff-caught)
- **rule (AS-10):** sub writes a tracked file despite propose-only / R1-return-only (Write/Bash residual) → git-diff catch → lead VERIFY benign+accurate+placement → keep-if-correct or revert.
- **what:** @S50 `/session-end`, `git status` = **14 modified** but em-main personally edited ~7. Non-em-main writes: `error-ledger.md` (2 guard episodic→procedural promotions + E-002 #57 coords), 3 `adap-reports` (nac→verified-runtime), 4 `agent-memory/*` Recent-activity, + `STATUS.md` (Recently-Done-S50 block / In-Progress flip / RAG-line 2406↔2415 reconcile). mtimes 00:0000:05 = session-end monitor window; the 2 INFORM-only monitors (tooling-auditor + harvest-curator) were briefed propose-only and **reported "wrote nothing."**
- **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]
### E-005 — AS-1 `git add -A` on S49 governance commit (self-caught @session-end §L.a) ### 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`). - **rule (AS-1):** stage specific files, not `git add -A`/`.` (concurrency safety — `feedback_rag_mcp_recovery_concurrency`).
- **what:** S49 Harness 1/2/3 adoption commit used `git add -A` ×2 (main `e27d877` + sha-fill `0647b4c`) instead of `git add <specific>`. - **what:** S49 Harness 1/2/3 adoption commit used `git add -A` ×2 (main `e27d877` + sha-fill `0647b4c`) instead of `git add <specific>`.
@ -80,7 +88,7 @@ Detect by **action-signature** (NOT "AI tự phán có vi phạm không"). Scan
- **what:** `Holidays` DB UNIQUE (Year,Date) unfiltered vs handler `!IsDeleted` → admin delete + re-add same-date holiday = reachable 500. - **what:** `Holidays` DB UNIQUE (Year,Date) unfiltered vs handler `!IsDeleted` → admin delete + re-add same-date holiday = reachable 500.
- **5-why:** UNIQUE created unfiltered → soft-deleted row keeps the slot → handler allows logical re-create → INSERT hits dead UNIQUE → 500. - **5-why:** UNIQUE created unfiltered → soft-deleted row keeps the slot → handler allows logical re-create → INSERT hits dead UNIQUE → 500.
- **fix:** (code) Mig 43 `.HasFilter("[IsDeleted]=0")` (matches 13× existing pattern). (guard) Gap1 test-before reproduced the 500 first. - **fix:** (code) Mig 43 `.HasFilter("[IsDeleted]=0")` (matches 13× existing pattern). (guard) Gap1 test-before reproduced the 500 first.
- **prevention/guard:** Active-Guard AS-4 + test-before. ⚠️ **OPEN latent:** `LeaveType.Code` + `ShiftPattern.Code` same class, still unfiltered → backlog test-before (2nd strike of this guard). - **prevention/guard:** Active-Guard AS-4 + test-before. ⚠️ **OPEN latent (wave-verified S50, exact coords):** `LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19` bare `.IsUnique()` (no filter) vs fixed `HolidayConfiguration.cs:18 .HasFilter("[IsDeleted] = 0")`; test template = `HrmConfigHolidayTests.cs:180-197` (Case 7). Backlog test-before (2nd strike of this guard).
- **tags:** [soft-delete-invariant / em-main+test-specialist / Holidays,LeaveType,ShiftPattern] - **tags:** [soft-delete-invariant / em-main+test-specialist / Holidays,LeaveType,ShiftPattern]
### E-001 — S46 user-memory 0-byte (close-out truncation) ### E-001 — S46 user-memory 0-byte (close-out truncation)