[CLAUDE] Docs: S125 adap tien-de-vong4 — relabel token CAN-TREN + hash-verify byte-safe + dinh-chinh hub + fable-real review/invest checklist

- adap broadcast phuong-phap-dem-token (type:new): negative-control tai lap 3-probe (notice-N = heuristic char-dem, KHONG phai token that) -> relabel STATUS:41 + HANDOFF:5 x2 + do-token report ADDENDUM (dai [31K byte/4 - 70,9K notice] => lead-share [8,2-18,7]%)
- false-TAMPER RCA: PS5.1 Get-Content -Raw doc UTF-8-no-BOM bang ANSI -> va check-email/send-email byte-safe + verifier-suspect-first; stamp hub verify OK bang stamp_verify.py (exit-0)
- email dinh-chinh hub (58f5afd8, selftest exit-0 x2) + adap-report + adap-request hash-verify-byte-safe-decode + FYI 2 broadcast no-stamp
- STAGE-2: git mv 7 broadcast processed -> inbox/ai_infra/ (root sach)
- fable-real review+invest (vai compound reviewer+inv-cb): run-trace + spec 3-muc + checklist A-D cho hmw @Opus 4.8 MAX; va stale all-inherit fable-real.md:37 + fable-clone.md:43
- hook-curate inv-cb MEMORY 23,9->16,9KB moved-not-cut (14 dong + 2 digest -> archive/2026-07.md)
- h18 memory +sibling-test-2-chieu; monitor self-compact S125-start + counter tick=4

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-16 13:29:43 +07:00
parent 3aacdf9d1c
commit 010d12c5f8
29 changed files with 261 additions and 41 deletions

File diff suppressed because one or more lines are too long

View File

@ -32,3 +32,9 @@
- **2026-07-12 (S114 @start RE-REPORT self-write diary, VERIFY-idempotent 0 re-APPEND):** Model `claude-opus-4-8` (Opus). Verdict 🟢 **ALL-CLEAN 5/5 trục + 0/21 orphan** (post-S113 final wal-flush `a3e9e14` 19:39:33; S113 harvest ĐÃ HOÀN-TẤT @S113-end, đây = re-verify sau flush cuối). (1) Harvest-mới **0**: porcelain 0 dòng + 12/12 L1 mtime 19:36:52 < `a3e9e14` (method-#3) 0 mồ-côi by-construction; post-end DUY-NHẤT 1 commit = `a3e9e14` chạm CHỈ diary SELF (S113@end-entry + self-compact). (2) Orphan **0/21** (embedded-synth re-scan sau khi tự-bắt `-cl`-bug false-flag: 4 S112 embed=1 `## synthesis` · S113 embed=2 `## Synthesis`+`## OUTCOME` · 14×06-18 sep-synth · h21/h22 sep). (3) Coverage 6/6 sub S113 landed đủ 4-field (impl-be:77·impl-fe:9·test-spec:59·reviewer:17-TIERED·cicd:73·inv-cb:20-ensemble); **#53-garble ×2 CẢ HAI captured** (inv-cb:23 visibility-lane em-solo-recover + impl-be:77 backend-first-return SendMessage-resume); **4-BUG captured** đúng nhà (NRE-null-Code#80 test-spec:59 · draft-leak+CreateSupplier-IsPublic reviewer:17 · authz-403D3 rolepolicy-fix impl-be:77); S113-start 2-GAP STAY-CLOSED (impl-be:80 S112-Supplier entry + test-spec narrative). (4) Corruption 0: 0-byte 0/12 · tail `0a` 12/12 · FFFD 1 = SELF-baseline self-quote (method-#9). (5) Self-compact S107S109 @S113-end (`a3e9e14`) **moved-not-cut VERIFIED** (5 anchor L1=0/AR=1; S108-GATE L1=1 = digest-line mention đúng; archive 18390B tail-`0a`). **2 KNOWN benign nit persist** (em-main chưa fix, 0-data-loss, INFORM KHÔNG escalate): inv-cb:21 "journal.jsonl" dead-pointer (folder RETURN-only 0-jsonl, content THẬT @run.md-synth+narrative:20-25) · impl-be:77 "backfill 22 prod" stale-est (thật 37, `UPDATE SET IsPublic=1` all-rowsmoot). Self-inconsistency benign: S113@end body ghi "compact deferred" nhưng digest+diff = EXECUTED HOOK-directed (pattern S111). Chore: inv-cb 21.6K cao nhất · reviewer 20.8 · cicd 20.4 · impl-be 20.2 · SELF 16.8K post-compact healthy self-compact S110S111 phiên tới; all < 25.6 cap. Tag `[s114-start, all-clean, 0-orphan-0of21, verify-idempotent, garble-x2-captured, 4bug-captured, self-compact-s107-s109-moved-not-cut]`.
- **2026-07-13 (S116 @end GATE self-write diary, VERIFY-idempotent 0 re-APPEND):** Model `claude-opus-4-8`. GATE **PASS 5-trục + close-gate 0/24** (PE nhập giá ÂM ô báo giá, shipped `88368fd` + CI #386; HEAD `0edbc58` wal-flush-landing, tree clean). **Coverage 🟡 5/6 role-bucket đủ (1 sub-gap):** 3 impl self-write đủ 4-field (impl-fe :9-15 sign-toggle-immediate-commit `math.abs`-no-global-mod SHA `3e16dba5` ×2 + gotcha `details[].quotes``suppliers[]` · impl-be :77 guard-1line ACCEPT + stale-comment-flag · test-spec :59 486495 +9 T1-T4) + cicd :79 #386 GO 5m28s; invest-ensemble 4-lane RETURN-only em-main consolidated 42 (:78 Budget-consumers + :97 edge/precedent, FE+BE-surface embedded, knowledge-complete); review-ensemble 3-lane RETURN-only Lane1 correctness-wire :21 **TIERED-pointer** (`project_pe_negative_quote_correctness_review.md` 2908B EXISTS not-dead) + Lane3 financial-invariant :77 **NHƯNG Lane2 mirror-completeness KHÔNG có spawn-record riêng** (knowledge NOT-lost: run.md:11 'mirror clean' + correctness-pointer + invest:97 SHA-identical + impl-fe SHA-pair) propose em-main APPEND minimal Lane2. fable-real deep-pass #53-GARBLE 0-verdict em-main-solo gate (run.md:13), nothing-to-harvest. **Fidelity STRONG 0-fab → KHÔNG escalate:** `88368fd` = 7-file EXACT (2FE+1BE+4test no-mig) · BE `Sum()<=0``.All(x==0)` verbatim in-diff · 9 new `[Fact]/[Theory]` = +9 = gate 495. Corruption 0: 0-byte 0 · tail 0a 7/7 · FFFD 0 worker (self=1 baseline #9) · cicd:58 `$(cygpath)` = intentional-cmd-example không shell-baked · moved-not-cut ×2 VERIFIED (reviewer2026-07 3-anchor · impl-be FIFO2026-06 5-anchor). Close-gate: run.md embedded-synth `✅ PIPELINE COMPLETE`:19 + run.md/spec git-tracked HEAD; orphan **0/24** (14×06-18 sep · h21/h22/presence sep · 4×S112+S113emb2+S114+S116 embedded). **method-#10 DOUBLE session-drift-tag S116** (cả 2 = em-main ON-BEHALF harvest, self-write all-correct-S116): reviewer:77 label `S117`-forward + invest:78 tag `[s115?]`-backward mislabel clusters tại on-behalf-harvest propose normalizeS116. Nit: run.md:20-23 leftover template `[ ]` rows dup completed Stages4-6 (benign residue, propose trim). Chore: fe-designer 21.5K idle-07-01 · invest-cb 21.1 · impl-fe 21.1 · cicd 20.4 · reviewer 19.2 (post-curate + re-append) · SELF 19.1→~21K **self-compact S110→S111 STILL-DUE** phiên tới; all < 25.6 cap. Tag `[s116-end-gate, pass-5truc, close-gate-0of24, review-lane2-mirror-gap, double-session-drift-tag-m10, fidelity-strong-7file-exact]`.
- **2026-07-14 (S117 @end GATE self-write diary, VERIFY-idempotent 0 re-APPEND):** Model `claude-opus-4-8`. GATE **PASS 5-trục + close-gate 0-orphan** (2 chỉnh PE UAT anh Kiệt: lũy-kế display-lie fix + duyệt-theo-khoảng MinMax ProMinMax, shipped `316a82f` + CI #387 501-gate; HEAD `fc1b8d9` closeout tree-clean). **Coverage 5/5 spawn** (inv×2 share investigator-codebase/ + test-spec + impl-fe + cicd): inv-luyke :107 `[fable-real-single·Fable-S117]` wf ab2657ee (#53-garbleresume + em-main prod-DB verify) · inv-minmax :104 wf abbbb86d 0-garble Model-A · test-spec :59 +5 ProMinMax · impl-fe :9 `[s117]` SHA 011ee8cf/617b0aa0 · cicd :41/59/60/61 #387. **BE both-features = em-main-solo by-design** (financial signature-ripple) 0 impl-backend record expected (KHÔNG gap). **Fidelity STRONG 0-fab → KHÔNG escalate:** commit 316a82f file-list EXACT match mọi claim (Mig 66 3-file `ApprovedPriceMaxAmount` + entity+9 + service+34 + 6 FE 3/app symmetric + 2 test-file); STATUS 501; Mig 66 COL_LENGTH=9 prod; 2 garble-lane (invest-1+cicd) 0 claim-bịa (em-main-curl cross-verify khớp). Corruption 0: tail 0a 6/6 · FFFD 0 · impl-fe compact 23.313.3KB **MOVED-NOT-CUT VERIFIED** (archive/2026-H1.md +5 entry verbatim, 6/6 SHA-anchor; HOT S117/S116/S113 giữ) · cicd:58 `$(cygpath)` intentional-cmd. Close-gate: 2 /fable-real folder spec-*.md present+tracked (luyke 5828B/minmax 4202B, dual-accept hmw-synthesis); 0 orphan (no run.md-sans-synth); delta mồ-côi 0 (4 memory WAL-committed 11:0011:29, porcelain clean). **3 benign nit INFORM (0 data-loss, KHÔNG escalate):** (a) inv-minmax mis-tag **S118→S117** (method-#10 drift fwd-1; content+spec đều S117) · (b) test-spec baseline **500/455→501/456** (thiếu em-main-solo +1 luyke `PeFinalizeProjectionTests`; đếm own +5 only) · (c) cicd:17 self-claim "S117 CLEAN no-garble ×3" vs session-log+task = garble-then-resume (under-report own garble; verdict-substance disk-true). Chore: 0 memory >25.6 cap (cicd 19.8/inv-cb 19.6 max); impl-fe healthy 13.3 post-compact; SELF 15.6→~17.2K → self-compact S113 phiên tới soft-due. Tag `[s117-end-gate, pass-5truc, close-gate-0orphan-fable-real-spec, moved-not-cut-verified, 3nit-s118mistag-testcount500-cicdgarbleclaim, fidelity-strong-commit-exact]`.
## Moved @S125-start 2026-07-16 - hook-directed self-compact (S118@start/S118@end/S119@start, 3 entries, file-order verbatim from L1; block-md5 9f7a11dcd057a27d03b06843bbdf2274, 6252 bytes)
- **2026-07-14 (S118 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re-APPEND):** Model `claude-fable-5`. Verdict 🟢 **ALL-CLEAN — 0 harvest-mới · 0 orphan/26 · 0 delta mồ-côi · corruption 0 · 3-nit-S117 ALL-FIXED**. Post-S117-gate đúng 2 commit chạm memory, cả 2 accounted: `1b8b065` (em-main reconcile 3 diary = đóng trọn 3 benign-nit INFORM @S117-end, diff-verified: (a) inv-cb `## S118``## S117` · (b) test-spec 500/455→501/456 + nguồn +1 em-main-solo `PeFinalizeProjectionTests` · (c) cicd "no-garble ×3"→"×2; S117 garble→SendMessage-resume verdict-substance OK") + `5c7569e` final-flush (+1 dòng = chính S117@end-entry SELF). Porcelain 0 + 12/12 L1 mtime ≤ 11:56:15 ⟹ 0 mồ-côi by-construction (method-#3). Orphan **0/26** dual-accept: 14×06-18 (5 sub-synth maxdepth-2 + 9 flat) · 3 flat Jul (h21/h22/presence) · 6 embedded (4×S112+S113+S114) · **pe-negative-quote embedded NON-heading `✅ PIPELINE COMPLETE`:19** (regex `^## synthesis` MISS → verify-trực-tiếp trước flag, đừng tin heading-scan đơn thuần) · 2×S117 fable-real spec-only KHÔNG run.md (spec 5828B/4202B tracked) = by-design ≠ orphan. Corruption 0: 0-byte 0/12 · tail 0a 8/8 touched · FFFD 0/12 — SELF-baseline FFFD 1→0 (entry chứa self-quote đã rời L1 qua archive, sạch hơn không phải mất; cập nhật baseline method-#9). Chore: 0 L1 > 25.6 cap (fe-designer 21.5K idle-07-01 · cicd 19.96 · inv-cb 19.6); SELF ~19.3K > 17.1 target → **self-compact S113-block DUE phiên này** (plan đứng từ S117-end). Delta cần APPEND: 0. Tag `[s118-start, all-clean, 0-orphan-0of26, 3nit-all-fixed-1b8b065, embedded-nonheading-pipeline-complete, fffd-baseline-1to0]`.
- **2026-07-14 (S118 @end GATE — em-main-APPENDED on-behalf từ propose-only):** Model lead=Opus. GATE **PASS 5-trục** — close OK 0-corruption/data-loss/orphan/fabrication. 7-spawn/5-bucket cov 6/7 (cicd#1 #388 durability PARTIAL: method`:63`+baseline`:41` captured, GO-run-verdict missing). close-gate **0-orphan** (no S118 run-trace by-construction — session = Agent-tool spawns only, no fan-out). corruption 0 (moved-not-cut cicd S117#387→archive byte-id `e5f655f`). **Fidelity 2 cicd-garble INFORM (NOT escalate — all substance git+em-main-verified TRUE):** F1 #389`:80` tự-dán "CLEAN-return" SAI (thực garble→em-main-solo-recover) → **em-main FIXED** · F2 #388 garble unrecorded (durable method survived) · F3 tracker`:17` stale-S117 → **em-main FIXED**. cicd = habitual mislabel-garble-as-clean pattern (archived S117#387 mang cùng nhãn sai). 5 propose-delta: cicd`:80`/`:17`/`:97` em-main-reconciled + this @end line. Tag `[s118-end-gate, pass-5truc, cicd-garble-x2-returnlabel-nit-FIXED, moved-not-cut-verified, 0-orphan-no-runtrace]`.
- **2026-07-15 (S119 @start RE-REPORT — self-write diary, VERIFY-idempotent 0 re-APPEND):** Model `claude-opus-4-8`. Verdict 🟢 **ALL-CLEAN — 0 harvest-mới · 0 orphan/26 · 0 mồ-côi · corruption 0 · 0-stray**. Post-S118-gate ĐÚNG 1 commit `6de7db6` wal-flush chạm CHỈ `.claude/WAL.md` (1 dòng), KHÔNG memory; 12/12 L1 mtime ≤16:29:08 < closeout `3fde8af`@16:29:55 (m#3) + porcelain 0 **@scan-baseline** + **77/77 memory .md TRACKED** 0 mồ-côi by-construction. 🔴 **LIVE mid-flight catch (mới, S119-only):** giữa lượt quét, sibling **tooling-auditor đang self-compact S111-block** `archive/2026-07.md` +3 dòng 0-del @08:40:00 (2 entry S111 @start/@end) NHƯNG **L1 CHƯA trim** (mtime vẫn 07-14 16:24:34) + `_INDEX` chưa pointer **dup-state L1=1/ARC=1 ×2 anchor** = append-BEFORE-trim = **THỨ-TỰ AN-TOÀN** (die giữa chừng dup, KHÔNG mất data; ngược cut-then-die). KHÔNG vi-phạm (nhà , additive-only, tail 0a) INFORM: moved-not-cut verify **PREMATURE giờ**, defer S119 @close gate (dedup L1-trim + `_INDEX` pointer). **S116 gitignore-trap check MỞ-RỘNG:** `--ignored=matching` dưới `.claude/` ignored-untracked DUY-NHẤT = `hmw-mode.on` runtime-flag benign (0 memory ẩn); runs/ 93 file tracked. Coverage 7-spawn: tooling `:48/:49` · SELF `:47/:48` (S104 self-blind-spot PASS) · reviewer `:22`+satellite `project_s118_procurement_master_access_review.md` 3255B TIERED-not-dead 4-field ĐỦ (M1 Reports-leak = ĐÚNG cái `c808b9a` fix) · test-spec **2/2** (`:60` Procurement +4 · `:59` S118b authz +4) · cicd `:80` #389 GO-row **#388 PARTIAL PERSIST** (carry-forward S118-end, KHÔNG mới; substance knowledge-complete `:17` tracker + `:41` baseline + `:63` Serilog-method, chỉ thiếu Recent-runs row) = LOW accepted-by-omission. **Fidelity STRONG 0-fab → KHÔNG escalate:** `c808b9a` EXACT 3-file (ReportsController **+2 `[Authorize(Policy="Reports.Read")]` verbatim in-diff** + my-dashboard kept-open · AuthorizePolicy tests **+4 [Fact] đếm-TỪ-DIFF** file fd80e66d713d80 KHÔNG new, 19=total≠delta: đừng đếm file-total khi claim delta) · `c2135ba` DbInitializer+83 + Procurement-seed-test **4** · STATUS 509=45+464 "S118 +8" + Gotchas 82 khớp. 2 cicd-garble substance disk-true (F1/F3 STAY-FIXED). Corruption 0: 0-byte 0/77 · tail 0a 7/7 · FFFD 0/12 · **gist FROZEN** (0 modified từ `fc1b8d9`, distill-gen 1/2 nguyên) · archive **additive-only** (`2 ++`/`1 +` 0-del) · **moved-not-cut cicd S117#387 VERIFIED** (anchor ×2 L1=0/ARC=1 + archive 21376B tail-0a; fold `e5f655f``3fde8af` 0-mất-byte). Orphan **0/26** (24 run.md đều synth sep/embedded · 2×S117 fable-real spec-only no-run.md = by-design; 0 run-folder S118 by-construction = Agent-tool spawn thuần no-fanout). **Tự-bắt m#5 trap:** archive-diff `grep -v "^[+-][+-]"` NUỐT dòng `+- **` suýt kết-luận false-"empty-diff"; verify lại bằng stat(`2 ++` no-minus)+anchor. Chore: 0 L1 > 25.6 cap (fe-designer 21.0K idle-07-01 · cicd 20.4 · reviewer 19.3 · inv-cb 19.2); SELF 16.9→~18.5K > 17.1 target → **self-compact S114-block soft-due** phiên tới. Delta cần APPEND: 0 (1 LOW-optional cicd #388 GO-row). Tag `[s119-start, all-clean, 0-orphan-0of26, 0-mocoi, 77of77-tracked-no-gitignore-miss, cicd388-partial-carryforward-low, fidelity-strong-exact, m5-trap-selfcaught]`.

View File

@ -56,7 +56,7 @@ Bearer từ `POST api.solutions.com.vn/api/auth/login` → status matrix expecte
- **DB:** Dev `SolutionErp_Dev` · Design `SolutionErp_Design` (distinct) · Prod `.\SQLEXPRESS`/`SolutionErp`/`vrapp` via SSH `vietreport-vps`
- **Migration path:** `src/Backend/SolutionErp.Infrastructure/Persistence/Migrations/*.cs` (⚠️ NOT root `/Migrations/`). **57 mig**, last `AddPeSuggestedPriceNotes`.
- **Counts S80 (canonical docs/STATUS.md):** 57 mig · **88 SQL tables** (count `.ToTable()` ModelSnapshot NOT DbSet) · ~253 endpoints · 68 FE pages · **54 menu keys** (BE `MenuKeys` const) · **354 test** (45 Domain + 309 Infra) · **71 gotchas** (format `### N.`) · 30 user-memory · 6 skills · **11 sub-agents** (all-inherit H8)
- **Counts S80 (canonical docs/STATUS.md):** 57 mig · **88 SQL tables** (count `.ToTable()` ModelSnapshot NOT DbSet) · ~253 endpoints · 68 FE pages · **54 menu keys** (BE `MenuKeys` const) · **354 test** (45 Domain + 309 Infra) · **71 gotchas** (format `### N.`) · 30 user-memory · 6 skills · **11 sub-agents** (S80-snapshot — roster nay 14 vai + worker-tier-pin S124; số sống đọc STATUS.md)
- **Tech:** .NET 10 Clean Arch (Api→Application←Domain + Infra) + CQRS MediatR + EF Core 10 + 2 React 19 Vite 8 TS 6 (fe-admin :8082 + fe-user :8080) + SQL Server + Gitea CI + IIS
- **Prod:** api/admin/eoffice.solutions.com.vn · Gitea `git.baocaogiaoduc.vn/vietreport-admin/solution-erp` (Actions API `/api/v1/repos/.../actions/tasks` NOT `/runs` 404, cache stale ~2min gotcha #46 — cross-check VPS mtime). Bundle live admin `CsJetgZH`/user `BVS0ApIm` (Run #330).
- **Auth:** `admin@solutions.com.vn/Admin@123456` (full) / `nv.test@solutions.com.vn/TestUser@123456` (Drafter). Response `accessToken`+`refreshToken`+`user`. Password ≥12 chars.
@ -75,21 +75,22 @@ Bearer từ `POST api.solutions.com.vn/api/auth/login` → status matrix expecte
## 📅 Recent activity (compressed — full verbatim → `archive/2026-06.md` via `archive/_INDEX.md`)
- **S125 (2026-07-16) adap-review invest-lens [engine:fable-real single deep-pass · vai compound anh gán reviewer+inv-cb · chạy inline-lead]:** probes: auto-memory **50 tracked/0 porcelain** (R6 git-track ĐẠT — còn WRITE-path post-restart) · agents **14/14 `model:opus`+`effort:max`** (file 15=README benign) · 6/6 product-carry còn HANDOFF · H24 counter=4 tick-S125 content-addressed (light@9/deep@18, 0 class-repeat≥3) · Stop-hook wal-flush KHÔNG fire per-turn phiên này (HEAD đứng `3aacdf9` suốt) · residue `all-inherit` floor-sống chỉ 2: `fable-real.md:37` (gap thật — file NGOÀI sync-list S124) + `fable-clone.md:43` (asym trong-file, :57 updated :43 sót) — CẢ 2 vá S125; `session-start.md:52`+`hmw.js` comments = lineage GIỮ. Hub-side: outbox/all=65, `stamp_verify.py` 3-OK / 2-NO-DECLARED-SHA (do-token·h17-bookend) · hub ĐÃ CÓ script-verify s76 `check_email_pull.py` (hub check-email.md:31) — bootstrap-copy sister CHƯA mang. Tag `[s125, adap-review, verifier-suspect-first, worker-tier-pin-residue]`.
- **[→ archive/2026-07.md] 2026-07-13 PE negative-quote 2× LENS (Budget-consumers + edge/precedent/test)** — key giữ: budget-not-mutated-by-quote (architectural) · submit-guard `Sum()<=0` `:206` duy-nhất reject · no-quote-validator · parseVnd strip-minus · giaTri-âm bypass validator · gotcha #81 orthogonal-dấu. Executed S116; anchors sống trong S116/S117 entries.
- **[→ git 07-12 · superseded by S115 entry above] PE per-HANGMUC multi-winner LENS BE-consumer-audit:** 3 cardinality axes — `SelectedSupplierId` single (legacy) · Mig58 `IsWinner`=WHOLE-SUPPLIER liên-danh · `Quote.IsSelected` per hangmuc×supplier (S114 made LIVE). 5 money consumers keyed off IsSelected now (winnerQuoteTotal/submit-guard/ccm-threshold/giaTri/budget-block-B). ~6 test files. Tag `[pe-multiwinner, per-hangmuc, quote-isselected, cardinality]`.
- **[→ git 07-12] Supplier-import-v2 LENS-3 FE-dialog-UX:** SupplierImportDialog+SuppliersPage SHA-identical 2-app; dialog 2-step preview→confirm round-trips `preview.rows` → per-row edit feasible; `ExpectedHeaderTokens` 30-token baked `SupplierExcelImportService.cs:35-68` = template single-source; Mã NCC=Code; import authz-mismatch BE `[Roles=Admin,CatalogManager]` vs FE `Suppliers/Create` open. Tag `[s112, supplier-import-v2, fe-lens3, import-authz-mismatch]`.
- **[→ git+session-log 07-07] S105 BVAAU cross-repo auth RCA:** Q1 root-cause = FE Home MÙ session (bundle cũ relative `/api` trên site TĨNH `web.config` loại `^/api/` `/api/auth/me` 404 → anonymous); fix API_BASE-absolute `51c69fb` LIVE. Q2 CRM1 hở 2 tầng (FE soft + API `enforceCrmGate:false`) → flip `AUTH_ENFORCE_CRM_GATE=true`. Q3 Zalo "User_ID" KHÔNG có UI. Class **"hub+site-tĩnh relative-`/api` chết im prod"**; #53-garble-7 → SendMessage-resume recover. *(verbatim → archive/2026-07.md)*
- **[→ 07-12 LENS-3 entry above + git 07-06] S104 Supplier 30-field 🅰️ schema-invest WF `wf_5ac2cdb0`:** SUPERSEDED anchors giữ: ClosedXML 0.105.0 = Excel-standard (KHÔNG OpenXml-raw, `csproj:8`); reuse-existing-cols>parallel; `UpdateSupplierCommand.cs:49-57` blind-set=latent#73; seed fill-nulls-if-exists (`DbInitializer.cs:2781`); `SupplierDto` hand-projected 2-site (`GetSupplierQuery.cs:21`+`ListSuppliersQuery.cs:48-50`); `Dialog.tsx:48` max-h-70vh; extract `ui/PathLink.tsx`. Chốt Mig 62 +18 nullable. *(verbatim → archive/2026-07.md)*
- **[→ archive/2026-07.md verbatim + digest @S125] S105 BVAAU auth RCA:** class **"hub+site-tĩnh relative-`/api` chết im prod"** (web.config loại `^/api/` → 404 → anonymous); fix API_BASE-absolute `51c69fb`.
- **[→ archive/2026-07.md verbatim + digest @S125] S104 Supplier 30-field schema-invest:** ClosedXML 0.105.0 chuẩn (KHÔNG OpenXml-raw) · `UpdateSupplierCommand.cs:49-57` blind-set=latent#73 · SupplierDto hand-projected 2-site · chốt Mig 62 +18 nullable.
- **[→ git+session-log 07-03 + adap-reports] S101 H19-adopt Lane-2:** map reviewer=review-gate / investigator=ground-truth-lane; 12-pt tier-checklist ALL✅ (11/11 inherit, C3 no-`[1m]`-in-frontmatter); toggle-marker MUST copy `.gitignore:87` last-match placement; VACUOUS-MET all-inherit+Fable. *(verbatim → archive/2026-07.md)*
- **[→ git+session-log 07-02 + adap-reports] S100 H18-adopt WF1:** ⭐ ghost-wire-class **config-key-defined-but-unread** (`budget.json:54-55` script re-hardcode same-value→no-flag; catch=grep-key-across-scripts); cron=ghost-wire (CronList=0); `_ledger` orphan-catch 0/15-lifetime. *(verbatim → archive/2026-07.md)*
- **[→ git 07-12 · Mig64 IsPublic shipped since] Supplier import-v2 LENS-4 public/visibility recon:** 3 SELECTION consumers ALL hit `GET /suppliers` ListSuppliersQuery (SuppliersPage:83 · PeDetailTabs:2222 · ContractCreatePage:321); DISPLAY-of-existing joins by stored SupplierId MUST NOT filter (ContractFeatures/PeFeatures/Dashboard); write-guard backstops `ContractFeatures.cs:64`+`PurchaseEvaluationSupplierFeatures.cs:49`. Rec fail-closed default + stored `IsPublic bit`. Tag `[s112b, supplier-visibility, fail-closed-default]`.
- **[all verbatim → archive/2026-07.md] S98 verify-lane (detector 28→25, 8 derived-stale=FP vs canonical 61/89/440/79; grep exact misses README variant) · S97 feedback-audit (#77/#78/#79 `gotchas.md:1301/1317/1325`; #53-garble×6=cicd MEMORY-self-target ~17.5KB; Mig60 wrong-table Approvals→Mig61 Changelogs) · 07-01 Supplier-predecessor SUPERSEDED by 07-06 · S93 MFE denom=marks/AS/guards dedup-AS-xref=29, coverage exact-id OR ≥2-content-word.**
- **PE FROZEN-Mig59 patchwork + go-live recon cluster (S87→S89, 8 entries verbatim → `archive/2026-06.md`):** key catches — AREA-4 **LATENT #73-class BUG** HoSoLink absolute-set `PurchaseEvaluationFeatures.cs:280` but PeHeaderForm PUT OMITS→clears (2 PUT mutually destructive, no preserve-test) · AREA-3 AllowApproverFinalize AUTO(Mig58)+finalizeByCcmDelegation OPT-IN(Mig54) coexist AUTO-first, ApplyApprovedPrice allow-list {Ncc,ProMin,ProMax,Ccm} · AREA-2 budget-matrix band-aid `PeSuggestedPriceFeatures.cs:153-199` PRO=drafter vs CCM=role authz-asymm · AREA-6 FE all 6-comp+3-pages SHA-mirror 2-app, #70 stale-echo · S89 AllowApproverFinalize-NOTE **GAP BE-field-MỚI** (flag only `currentLevelOptions`, DTO no-carry→expose EndsBeforeCeo) · 06-24 winner=SINGLE `SelectedSupplierId` derived-3-site, terminal=per-Level bool · 06-23 urgent authz asymmetric, PE-create dropdown `PeWorkspaceCreateView.tsx:94`.
- **2026-06-20 governance recon (both → archive/_INDEX):** (a) landing-map — `harness-11-engine.md`=CANONICAL engine (D5/6/7 safety-tier+D8 one-dir-lock+D9 single-writer+D10 Bash-residual+CAVEAT no-OS-hook); `error-ledger.md`=§L.a AS-1..13+§L.b 7-step; rules.md §6.6=objective-criteria; report-before-stamp ⊂ D7 (extend not duplicate→C3 vocab-fork). (b) Harness-14 = age/recency-decay KHÔNG căn-cứ cắt feature; `memory-budget.json` 0 decay `keep_floor=5`=newest-protect drains-OLDEST; detectors canonical-anchor-vs-STATUS+disk 0 age-window; EVAL `golden-set-solution_erp.jsonl` 14q recall@5≥0.7 weekly-manual; anti-downgrade=H8 all-inherit PARTIAL (no generic rule grep 0).
- **PE recon cluster (S69→S76, verbatim → _INDEX):** "Giá chào thầu" mục-c=`WinnerQuoteTotal`=SUM(Quote.ThanhTien WHERE supplier==Selected) DERIVED 3-site; Budget gate=PURE ROLE no-phase (`canEditPro/Ccm` `PurchaseEvaluationFeatures.cs:800-801`); submission-count-lock NEXISTS (grep 0); Value-threshold HOOK B=`ApproveV2Async :816-845`; PRO/CCM/CEO=`Procurement/CostControl/Director` shorthand; V2 routing IGNORES roles (=ApproverUserId) 100% LINEAR.
- **Office/HRM recon cluster (S65→S69, verbatim → _INDEX):** 21 `Off_*` keys, 10 office pages `{fe-admin,fe-user}/src/pages/office/` SHA-mirror (exc MyAttendance+AttendanceReport admin-only); golive-flip=remove `RevokeTemporarilyHiddenModulesAsync` `DbInitializer.cs:2040`; Employee master-detail EXISTS, Dept FLAT pre-Mig51; NamGroup PURO=UI-skin hardcoded-navTree; **gotcha #66** `index.css h1-4{color}` OUTSIDE @layer→TW-v4 unlayered wins→heading MUST `text-white!`.
- **Governance/Harness recon cluster (S71, → _INDEX):** H8 all-inherit FULLY adopted both layers (12/12 frontmatter + hmw.js resolveModel); **run-trace "TRACKED" = 2-level** (`git check-ignore` eligible vs `git ls-files` committed — model works only post `git add`); G-015 containment shift (Harness-2 "mọi tracked=vi-phạm" → H10 "tracked NGOÀI run-folder+code-disjoint=vi-phạm"). **path-trap:** bare `runs/` from repo-root = 0 → actual `.claude/workflows/runs/` (22 tracked). detector refine(b) = `.claude/hooks`/`.claude/scripts` not-exist (now S75 has `scripts/governance-detectors.ps1`).
- **[→ archive/2026-07.md @S125 + archive/2026-06.md] PE FROZEN-Mig59 + go-live recon (S87→S89):** giữ nóng ⭐ LATENT #73-class HoSoLink PUT-clears (`PurchaseEvaluationFeatures.cs:280` vs PeHeaderForm PUT omits, no preserve-test) · 3 cơ-chế finalize coexist AUTO-first · budget-matrix authz-asymm PRO=drafter/CCM=role (`PeSuggestedPriceFeatures.cs:153-199`).
- **[→ archive/2026-07.md @S125 + _INDEX] 2026-06-20 governance recon:** `harness-11-engine.md`=CANONICAL (D5-D10) · `error-ledger.md` §L.a/§L.b · H14 age-decay KHÔNG căn-cứ cắt feature · EVAL golden-set 14q weekly-manual.
- **[→ archive/2026-07.md @S125 + _INDEX] PE recon (S69→S76):** WinnerQuoteTotal DERIVED 3-site · Budget gate PURE-ROLE (`PurchaseEvaluationFeatures.cs:800-801`) · V2 routing IGNORES roles (=ApproverUserId) 100% LINEAR.
- **[→ archive/2026-07.md @S125 + _INDEX] Office/HRM recon (S65→S69):** 21 `Off_*` keys · 10 office pages SHA-mirror · golive-flip=remove `RevokeTemporarilyHiddenModulesAsync` (`DbInitializer.cs:2040`) · **gotcha #66** `index.css` ngoài @layer → heading cần `text-white!`.
- **[→ archive/2026-07.md @S125 + _INDEX] Governance/Harness recon (S71):** run-trace TRACKED = 2-level (`check-ignore` eligible vs `ls-files` committed) · path-trap `.claude/workflows/runs/` (bare `runs/`=0) · G-015 containment H10.
- **[→ git pre-S60]** S60 recon#2 V2-engine-map (ApproveV2Async:446-634 guard+UPSERT+advance; skipToFinal F2:561-602 precedent) · S60 PE Section-3 submit-guard ROLE-only. Full text git.
- **[→ archive/2026-06.md + git]** S52 P11-D/E/F 6-gap recon · S50 HrmConfigs add-kind 11-spot · S51 gotcha #57 EXT reachability (curated S59).
- **[→ archive/2026-05-q4.md + git d2f52ba]** S29-S37: clean-room > NamGroup-port verified 4× · Pattern 12-bis cross-module mirror · FK+freetext dual-write.
@ -101,22 +102,16 @@ Bearer từ `POST api.solutions.com.vn/api/auth/login` → status matrix expecte
---
## S117 PE giá-chốt RANGE Min+Max invest (fable-real single, 07-14)
- ApprovedPrice WRITE = 1 site duy nhất `ApplyApprovedPriceOnFinalize` (`PurchaseEvaluationWorkflowService.cs:951-966`, allow-list :950) gọi tại 3 nhánh DaDuyet :858 level-finalize / :896 ccm-delegation / :928 all-steps-done (skipToFinal :820 chỉ dời pointer, KHÔNG finalize-site thứ 4). READ prod = detail-DTO ONLY (`PurchaseEvaluationFeatures.cs:1230``PurchaseEvaluationDtos.cs:285`) + FE display `PeDetailTabs.tsx:1712/:1850-1863`. ⭐ **HĐ-gen KHÔNG đọc ApprovedPrice** — GiaTri=SUM Quote.IsSelected per-winner (`CreateContractFromEvaluationFeatures.cs:88-100` LOCKED A1/D4) → range 0-impact contract/lũy-kế/list. Rec model A: +1 col nullable `ApprovedPriceMaxAmount` + source token `ProMinMax` = radio thứ-5 (chỉ khi cả Min+Max present), no backfill, phiếu cũ nguyên. PRO-entry đã enforce Min≤Max (`PeSuggestedPriceFeatures.cs:38-40`). Panel+DetailTabs SHA-mirror 2-app NHƯNG `types/purchaseEvaluation.ts` KHÔNG mirror (SHA differ) — edit riêng từng app. Latent edge: winnerQuoteTotal subset-selected có thể ÂM (S116) vs validator `ApprovedPriceAmount>=0` `:501` → transition reject khó hiểu. WIP S117 uncommitted CÙNG file PurchaseEvaluationFeatures.cs (endsBeforeCeo pointer-aware :642/:768/:1157) — vùng khác, merge-safe. `[s117, pe-approved-price-range, prominmax]`
## S117 — PE lũy-kế "không bắt sau duyệt" RCA (fable-real single deep-pass)
- **2026-07-14** VERDICT: phiếu nguồn A/018 KHÔNG hề DaDuyet — Chương (Bước2 Cấp2 `AllowApproverFinalize`, badge "Duyệt thay CEO" = CONFIG-display `PeWorkflowPanel.tsx:364`) duyệt KHÔNG tick ô OPT-IN "Cấp này KẾT THÚC" (S97 Part1 đảo default UNCHECKED `PeWorkflowPanel.tsx:57` useState(false); FE gửi tường minh :203) → advance thường lên Bước3 CEO, Phase=10 ChoDuyet. Prod ground-truth: StepIdx=2 LvlOrd=1 EndedFin=0; changelog 13/07 12:23Z "Hoàn tất Bước 2/3, sang Bước 3 (Cấp 1)" no-finalize-marker; IsWinner=1 SelQ=1 (749.564M) → RC-2 refuted. Lũy-kế Row2 filter `Phase==DaDuyet` (`PeFeatures.cs:906`) ĐÚNG nguyên tắc Kenny "duyệt rồi mới bắc"; tính LIVE :886-918 no-store → xóa+tạo-lại phiếu-XEM vô ích. ⭐ Residual = DISPLAY-LIE nửa-còn-lại gotcha #78: non-DaDuyet `endsBeforeCeo`=config TRUE bất chấp pointer (detail `:1152-1154` literal `: true`; list `:647-651` subquery `.Any()`) → Bước3 mờ "Kết thúc tại Cấp 2" + chip list "⚑ Kết thúc·CCM" NGAY KHI phiếu nằm inbox CEO → user tưởng xong. 3 cơ chế chồng phân biệt: AllowApproverFinalize (Mig58 + opt-in S97) ≠ finalizeByCcmDelegation (Mig53/54 threshold — v04 CeoThresh=NULL không dùng) ≠ skipToFinal (Mig31 pointer-jump giữ ChoDuyet). Fix rec: vận-hành CEO-duyệt hoặc trả-lại→Chương tick; code = pointer-aware endsBeforeCeo (detail in-memory trivial, list EF-subquery kềnh), KHÔNG nới filter lũy kế. `[engine: fable-real-single · Fable-S117]`
- **[→ archive/2026-07.md @S125 · Mig 66 SHIPPED] S117 PE giá-chốt RANGE Min+Max invest [fable-real-single]:** ApprovedPrice WRITE 1-site `ApplyApprovedPriceOnFinalize` (3 nhánh DaDuyet; skipToFinal chỉ dời pointer) · ⭐ HĐ-gen KHÔNG đọc ApprovedPrice (GiaTri=SUM IsSelected `CreateContractFromEvaluationFeatures.cs:88-100`) · `types/purchaseEvaluation.ts` KHÔNG SHA-mirror 2-app (edit riêng) · latent: winnerQuoteTotal subset ÂM vs validator `>=0 :501`. `[s117, prominmax]`
- **[→ archive/2026-07.md @S125] S117 PE lũy-kế RCA [fable-real-single]:** phiếu A/018 KHÔNG DaDuyet (opt-in finalize UNCHECKED S97 `PeWorkflowPanel.tsx:57`) · ⭐ residual DISPLAY-LIE #78 nửa-còn-lại: `endsBeforeCeo`=config-TRUE bất chấp pointer (detail `:1152-1154` · list `:647-651`) · 3 cơ-chế finalize phân biệt Mig58-optin ≠ Mig53/54-threshold ≠ Mig31-pointer · fix-rec pointer-aware, KHÔNG nới filter lũy-kế `PeFeatures.cs:906`. `[fable-S117]`
## S116 — PE negative-quote invest (fable-clone ensemble, 07-13)
- Hội-tụ **FE-ONLY**: BE/DB nhận âm sẵn (no validator/CHECK); NS giữ-nguyên architectural; 3 chốt FE parseVnd/format/gate; sign-aware `VndInlineEdit:1003` tái dùng; chỉ submit-guard `:206` hard-reject. ⚠️ Lesson: quote sống `details[].quotes` KHÔNG `suppliers[].quotes`. **Detail:** `.claude/workflows/runs/2026-07-13-pe-negative-quote/` + session-log S116 + archive/2026-07.md 2×LENS. `[Opus-S116]`
- **2026-07-15 (S122 retro-harvest 7 orphan, 7 lane read-only qua `/hmw` RUN-TRACE `wf_5ce007c4-980`; 7/7 done · 0 error · 1 RỖNG schema-fail · 526s · 836K tok):** Task: đọc 7 run-folder "orphan" + truy `git log` → đối-chiếu run ĐỊNH-làm vs THẬT-land, neo bằng `file:line`/SHA THẬT; **CẤM bịa sha, CẤM suy "chắc xong rồi" từ việc folder tồn-tại**. Nấc: **executed + lead verify từng cái**. Evidence: 6/6 lane có return **neo SHA thật, 0 garble**`a829d0d` (PE A1+EDGE-5, 2 file +513/148) · `e100ef0`+**Mig 63** (Supplier Excel-import Phase B, 20 file +8268/14) · `5fa11b5`+**Mig 64** (import v2, 28 file +7659/105) · `d436af2`+**Mig 65** (multi-NCC, 18 file +7272/425) · `88368fd` (PE giá-ÂM, spec-match 7/7, **S116 KHÔNG phải S113**).
🔴 **KẾT-QUẢ LẬT TIỀN-ĐỀ CỦA CHÍNH RUN — 0/7 là việc mất; 7/7 ĐÃ XONG, chỉ ghi synthesis SAI CHỖ.** 6 folder có `## synthesis` trong THÂN `run.md` (dạng-3) · `pe-negative-quote` rải trong `## Stages`+`## wf run-id` (dạng-4, `run.md:19` ghi thẳng *"PIPELINE COMPLETE — shipped + live-verified"* + cicd PASS + bundle-hash + smoke 200) ⇒ **thực-địa ≥4 dạng, doc thừa-nhận 2****orphan-authority đo TÊN FILE, không đo NỘI DUNG****8 dương-giả / 25 run = 32%**. Bồi: `8fa2fcc` khoe *"[H2 gate]"*`git show --stat` **KHÔNG chạm folder** ⇒ H2 đã soi + coi ĐÓNG, chỉ lệch tên. **KHÔNG phải convention-cũ:** cùng ngày 07-12, `h22-wal-adopt` ghi dạng-1 còn `S112-*` ghi dạng-3 ⇒ **thói-quen không nhất-quán**.
🟢 **3 kỹ-thuật lane đáng tái-dùng:** (a) **đo ordinal migration bằng sorted-listing** (`Mig 65` = vị-trí **65/66**) thay vì tin nhãn `CLAUDE.md` — doc là **DẪN-XUẤT**, phải neo vào file migration thật · (b) **phân-biệt hash-lệch vs invariant-vỡ**: session-log ghi FE-mirror SHA `3e16dba5` @S116 vs đĩa nay `617b0aa0`**KHÔNG mâu-thuẫn** (file tiến-hoá sau S116; invariant thật = *"2 app identical với NHAU"* **vẫn nguyên**, `git diff --no-index` exit=0) — checker so-literal-hash sẽ kêu oan đúng chỗ này · (c) **truy owner-decision VÀO TRONG CODE**: cả 5 decision của `supplier-excel-import` neo được ở code, `:376` **cite thẳng số decision** (`// unknown → default (decision 5, không reject)`).
🔸 **Lane RỖNG ≠ mất dữ-liệu:** `parallel[3]` schema-fail 0 return — nhưng synthesis nằm **trên đĩa** (`run.md:8`) ⇒ lead lấy lại nguyên vẹn + neo chéo từ 2 lane khác. Đúng `/tiep §2`: **per-turn ≠ per-task — return mất theo phiên, file trên đĩa còn.** File synthesis của folder đó **tự khai nấc bằng-chứng THẤP HƠN** 6 cái kia.
🔴 **Lead-error lane cần biết:** memoryPack lead bơm ghi *"S113/pe-negative-quote"***SAI, là S116**. Lane **KHÔNG bị dắt** (tự truy git ra `Mon Jul 13 17:08:34 2026`). ⇒ **tiền-đề trong memoryPack CÓ THỂ SAI ⇒ luôn tự truy git, đừng tin brief.** Tag `[s122-retro-harvest, false-orphan-by-naming, 0-of-7-lost, ordinal-measured-not-labeled, lane-empty-disk-survives, brief-premise-wrong]`.
- **[→ archive/2026-07.md @S125 verbatim] S122 retro-harvest 7 orphan (`wf_5ce007c4-980`, 836K tok, 6/6 lane neo-SHA-thật 0-garble):** 🔴 LẬT tiền-đề — **0/7 mất, 7/7 ĐÃ XONG chỉ synthesis SAI CHỖ** ⇒ orphan-authority đo TÊN không đo NỘI-DUNG (8 dương-giả/25 run = 32%) · 🟢 tái-dùng: (a) ordinal-mig = sorted-listing, KHÔNG tin nhãn doc (doc = DẪN-XUẤT) · (b) hash-lệch ≠ invariant-vỡ (`git diff --no-index` 2-app exit-0 = mirror còn) · (c) owner-decision truy VÀO code (`:376` cite số decision) · 🔸 lane-RỖNG ≠ mất (synthesis trên đĩa `run.md:8` — per-turn ≠ per-task) · 🔴 memoryPack premise CÓ THỂ SAI (S113→thật S116), lane tự truy git đừng tin brief. Tag `[s122-retro-harvest, false-orphan-by-naming]`.
## 🔄 Curate trigger
- >~30KB → archive recent → L2 `archive/<period>.md` (byte-exact append) + `_INDEX.md` substring pointer. Stale >3mo → remove.
- **Last curate: 2026-07-06 (em-main single-writer, hook-triggered @21.4KB)** — 6 stale governance/superseded entries (S93/S97/S98/S100/S101 + 07-01 Supplier-predecessor) verbatim → `archive/2026-07.md`, replaced with pointer-stubs. L1 back under target.
- **Last curate: 2026-07-16 S125 (em-main single-writer, hook-triggered @23.9KB)** — 14 dòng ≈9.5KB (5 cluster digest S87-89/06-20/S69-76/S65-69/S71 + 2 section S117 + block S122 retro-harvest) verbatim byte-exact → `archive/2026-07.md`, thay stub giữ anchor nóng. L1 ~15KB.
- **Prev curate: 2026-07-06 (em-main single-writer, hook-triggered @21.4KB)** — 6 stale governance/superseded entries (S93/S97/S98/S100/S101 + 07-01 Supplier-predecessor) verbatim → `archive/2026-07.md`, replaced with pointer-stubs. L1 back under target.
- **Prev curate: 2026-06-18 S71** (29.8→23.2KB FIFO-trim 3 + gist gen:2). **Prev S70** (47.0→24.1KB dark-matter recovery + built _INDEX/gist). **Prev S40** (35.7→~20KB).

View File

@ -21,3 +21,25 @@
- **2026-07-12 (S111 H22 WAL deep-pass) `[engine: fable-real-single · Fable-S111]`:** H22 WAL adopt → READY_WITH_NUANCES + spec 3-mục (em-main gov/settings · w1 pause+tiep · w2 start/end delta · w3 hook+README). Chốt: (1) `.claude/settings*.json` KHÔNG tồn tại → hooks-entry CREATE mới; hook = STAGED-until-verified (S100 ghost-wire, chỉ claim khi thấy `wal:` commit phiên mới). (2) engine`:402` no-OS-hook = MÔ-TẢ (CAVEAT) không phải luật cấm; `:116` E.3 "hook fails-open ≠ gate" → persist-only TƯƠNG THÍCH, update :402; ACTIVE-MARKS 0 mark cấm-hook; H5 start`:41` chỉ cấm hook-switch MODEL. (3) AS-6 KHÔNG tăng: 2 runtime .json gitignored (`.gitignore:124-125`), hook commit LOCAL — push-set ≡ hôm nay. (4) cmd-PATH Git Bash trước WSL, bash 5.2.26 OK. (5) `.gitattributes` exists broadcasts-scoped → append `*.sh`; repo 0 .sh = zero churn. (6) 16 command 0 trùng pause/tiep. (7) Stop-hook fire chỉ TURN-boundary → chết giữa workflow-turn = vật-liệu DISK uncommitted, /tiep đọc cả git status/disk. (8) run.md thiếu taskList snapshot. Learned: "luật cấm hook" phải phân MÔ-TẢ vs LUẬT trước khi đòi carve-out. L1@19.8KB → suggest em-main curate.
- **2026-07-11 (S110 H21+MTv3 deep-pass) `[engine: fable-real-single · Fable-S110]`:** Task ground-truth 2 broadcast (H21 spec-file+per-invocation · MTv3 owner-choice) + inventory TOKEN toàn repo + SPEC 3-mục. Verdict **PASS**: (1) **12 persona file SẠCH 0-hit** fable/engine-token (grep 2 vòng cả `engine-đắt|top-model|ensemble`) — NGƯỢC hub vòng-1 bắt persona-phụ lỗi; (2) MTv3 self-check regex §5 chính-thức **0-hit** nhưng extended "lead LUÔN top-model" bắt 5 ACTIVE (engine:332 K.D · runbook:140/:455 · fable-real.md:17 · mark ACTIVE-MARKS:19) = **regex-heuristic-miss class** — sister diễn-đạt khác cụm regex; (3) **hmw.js:38 comment "tier:'fable' khi hệ-trọng" = xung-đột MTv3 §1.3/H21 §3** (đường nâng hạng-nhất DUY NHẤT = owner gõ; comment cho lead-discretion) — comment-only fix; (4) hmw-mode.on = HỆ KHÁC (consent fan-out T3 `ultracode-hmw-mem-governance`, content tự khai /ultra-on) — ngoài scope H21; (5) mega-line "VẪN ON" class = **standing-imperative-trong-history-blurb** (S109-header + HANDOFF NEXT-anh = ACTIVE cần sửa; blurb-body = snapshot giữ). Bẫy fidelity lớn nhất: MTv3 §1.2/1.3 "sub gán cứng hạng-hai" đọc như floor → tưởng phá H8 all-inherit; triage-reply S2 CÙNG NGÀY waive đích-danh ("không đổi gì với form all-inherit"). ⚠️ #53 garble lượt return đầu (trả status-line giữa-chừng thay verdict) → coordinator SendMessage re-emit trong-session = recover OK, diary ghi trước re-emit.
## S125 hook-curate @23.9KB (em-main single-writer, moved-not-cut byte-exact tu MEMORY.md L1) - 2026-07-16
- **PE FROZEN-Mig59 patchwork + go-live recon cluster (S87→S89, 8 entries verbatim → `archive/2026-06.md`):** key catches — AREA-4 **LATENT #73-class BUG** HoSoLink absolute-set `PurchaseEvaluationFeatures.cs:280` but PeHeaderForm PUT OMITS→clears (2 PUT mutually destructive, no preserve-test) · AREA-3 AllowApproverFinalize AUTO(Mig58)+finalizeByCcmDelegation OPT-IN(Mig54) coexist AUTO-first, ApplyApprovedPrice allow-list {Ncc,ProMin,ProMax,Ccm} · AREA-2 budget-matrix band-aid `PeSuggestedPriceFeatures.cs:153-199` PRO=drafter vs CCM=role authz-asymm · AREA-6 FE all 6-comp+3-pages SHA-mirror 2-app, #70 stale-echo · S89 AllowApproverFinalize-NOTE **GAP BE-field-MỚI** (flag only `currentLevelOptions`, DTO no-carry→expose EndsBeforeCeo) · 06-24 winner=SINGLE `SelectedSupplierId` derived-3-site, terminal=per-Level bool · 06-23 urgent authz asymmetric, PE-create dropdown `PeWorkspaceCreateView.tsx:94`.
- **2026-06-20 governance recon (both → archive/_INDEX):** (a) landing-map — `harness-11-engine.md`=CANONICAL engine (D5/6/7 safety-tier+D8 one-dir-lock+D9 single-writer+D10 Bash-residual+CAVEAT no-OS-hook); `error-ledger.md`=§L.a AS-1..13+§L.b 7-step; rules.md §6.6=objective-criteria; report-before-stamp ⊂ D7 (extend not duplicate→C3 vocab-fork). (b) Harness-14 = age/recency-decay KHÔNG căn-cứ cắt feature; `memory-budget.json` 0 decay `keep_floor=5`=newest-protect drains-OLDEST; detectors canonical-anchor-vs-STATUS+disk 0 age-window; EVAL `golden-set-solution_erp.jsonl` 14q recall@5≥0.7 weekly-manual; anti-downgrade=H8 all-inherit PARTIAL (no generic rule grep 0).
- **PE recon cluster (S69→S76, verbatim → _INDEX):** "Giá chào thầu" mục-c=`WinnerQuoteTotal`=SUM(Quote.ThanhTien WHERE supplier==Selected) DERIVED 3-site; Budget gate=PURE ROLE no-phase (`canEditPro/Ccm` `PurchaseEvaluationFeatures.cs:800-801`); submission-count-lock NEXISTS (grep 0); Value-threshold HOOK B=`ApproveV2Async :816-845`; PRO/CCM/CEO=`Procurement/CostControl/Director` shorthand; V2 routing IGNORES roles (=ApproverUserId) 100% LINEAR.
- **Office/HRM recon cluster (S65→S69, verbatim → _INDEX):** 21 `Off_*` keys, 10 office pages `{fe-admin,fe-user}/src/pages/office/` SHA-mirror (exc MyAttendance+AttendanceReport admin-only); golive-flip=remove `RevokeTemporarilyHiddenModulesAsync` `DbInitializer.cs:2040`; Employee master-detail EXISTS, Dept FLAT pre-Mig51; NamGroup PURO=UI-skin hardcoded-navTree; **gotcha #66** `index.css h1-4{color}` OUTSIDE @layer→TW-v4 unlayered wins→heading MUST `text-white!`.
- **Governance/Harness recon cluster (S71, → _INDEX):** H8 all-inherit FULLY adopted both layers (12/12 frontmatter + hmw.js resolveModel); **run-trace "TRACKED" = 2-level** (`git check-ignore` eligible vs `git ls-files` committed — model works only post `git add`); G-015 containment shift (Harness-2 "mọi tracked=vi-phạm" → H10 "tracked NGOÀI run-folder+code-disjoint=vi-phạm"). **path-trap:** bare `runs/` from repo-root = 0 → actual `.claude/workflows/runs/` (22 tracked). detector refine(b) = `.claude/hooks`/`.claude/scripts` not-exist (now S75 has `scripts/governance-detectors.ps1`).
## S117 — PE giá-chốt RANGE Min+Max invest (fable-real single, 07-14)
- ApprovedPrice WRITE = 1 site duy nhất `ApplyApprovedPriceOnFinalize` (`PurchaseEvaluationWorkflowService.cs:951-966`, allow-list :950) gọi tại 3 nhánh DaDuyet :858 level-finalize / :896 ccm-delegation / :928 all-steps-done (skipToFinal :820 chỉ dời pointer, KHÔNG finalize-site thứ 4). READ prod = detail-DTO ONLY (`PurchaseEvaluationFeatures.cs:1230``PurchaseEvaluationDtos.cs:285`) + FE display `PeDetailTabs.tsx:1712/:1850-1863`. ⭐ **HĐ-gen KHÔNG đọc ApprovedPrice** — GiaTri=SUM Quote.IsSelected per-winner (`CreateContractFromEvaluationFeatures.cs:88-100` LOCKED A1/D4) → range 0-impact contract/lũy-kế/list. Rec model A: +1 col nullable `ApprovedPriceMaxAmount` + source token `ProMinMax` = radio thứ-5 (chỉ khi cả Min+Max present), no backfill, phiếu cũ nguyên. PRO-entry đã enforce Min≤Max (`PeSuggestedPriceFeatures.cs:38-40`). Panel+DetailTabs SHA-mirror 2-app NHƯNG `types/purchaseEvaluation.ts` KHÔNG mirror (SHA differ) — edit riêng từng app. Latent edge: winnerQuoteTotal subset-selected có thể ÂM (S116) vs validator `ApprovedPriceAmount>=0` `:501` → transition reject khó hiểu. WIP S117 uncommitted CÙNG file PurchaseEvaluationFeatures.cs (endsBeforeCeo pointer-aware :642/:768/:1157) — vùng khác, merge-safe. `[s117, pe-approved-price-range, prominmax]`
## S117 — PE lũy-kế "không bắt sau duyệt" RCA (fable-real single deep-pass)
- **2026-07-14** VERDICT: phiếu nguồn A/018 KHÔNG hề DaDuyet — Chương (Bước2 Cấp2 `AllowApproverFinalize`, badge "Duyệt thay CEO" = CONFIG-display `PeWorkflowPanel.tsx:364`) duyệt KHÔNG tick ô OPT-IN "Cấp này KẾT THÚC" (S97 Part1 đảo default UNCHECKED `PeWorkflowPanel.tsx:57` useState(false); FE gửi tường minh :203) → advance thường lên Bước3 CEO, Phase=10 ChoDuyet. Prod ground-truth: StepIdx=2 LvlOrd=1 EndedFin=0; changelog 13/07 12:23Z "Hoàn tất Bước 2/3, sang Bước 3 (Cấp 1)" no-finalize-marker; IsWinner=1 SelQ=1 (749.564M) → RC-2 refuted. Lũy-kế Row2 filter `Phase==DaDuyet` (`PeFeatures.cs:906`) ĐÚNG nguyên tắc Kenny "duyệt rồi mới bắc"; tính LIVE :886-918 no-store → xóa+tạo-lại phiếu-XEM vô ích. ⭐ Residual = DISPLAY-LIE nửa-còn-lại gotcha #78: non-DaDuyet `endsBeforeCeo`=config TRUE bất chấp pointer (detail `:1152-1154` literal `: true`; list `:647-651` subquery `.Any()`) → Bước3 mờ "Kết thúc tại Cấp 2" + chip list "⚑ Kết thúc·CCM" NGAY KHI phiếu nằm inbox CEO → user tưởng xong. 3 cơ chế chồng phân biệt: AllowApproverFinalize (Mig58 + opt-in S97) ≠ finalizeByCcmDelegation (Mig53/54 threshold — v04 CeoThresh=NULL không dùng) ≠ skipToFinal (Mig31 pointer-jump giữ ChoDuyet). Fix rec: vận-hành CEO-duyệt hoặc trả-lại→Chương tick; code = pointer-aware endsBeforeCeo (detail in-memory trivial, list EF-subquery kềnh), KHÔNG nới filter lũy kế. `[engine: fable-real-single · Fable-S117]`
- **2026-07-15 (S122 — retro-harvest 7 orphan, 7 lane read-only qua `/hmw` RUN-TRACE `wf_5ce007c4-980`; 7/7 done · 0 error · 1 RỖNG schema-fail · 526s · 836K tok):** Task: đọc 7 run-folder "orphan" + truy `git log` → đối-chiếu run ĐỊNH-làm vs THẬT-land, neo bằng `file:line`/SHA THẬT; **CẤM bịa sha, CẤM suy "chắc xong rồi" từ việc folder tồn-tại**. Nấc: **executed + lead verify từng cái**. Evidence: 6/6 lane có return **neo SHA thật, 0 garble**`a829d0d` (PE A1+EDGE-5, 2 file +513/148) · `e100ef0`+**Mig 63** (Supplier Excel-import Phase B, 20 file +8268/14) · `5fa11b5`+**Mig 64** (import v2, 28 file +7659/105) · `d436af2`+**Mig 65** (multi-NCC, 18 file +7272/425) · `88368fd` (PE giá-ÂM, spec-match 7/7, **S116 KHÔNG phải S113**).
🔴 **KẾT-QUẢ LẬT TIỀN-ĐỀ CỦA CHÍNH RUN — 0/7 là việc mất; 7/7 ĐÃ XONG, chỉ ghi synthesis SAI CHỖ.** 6 folder có `## synthesis` trong THÂN `run.md` (dạng-3) · `pe-negative-quote` rải trong `## Stages`+`## wf run-id` (dạng-4, `run.md:19` ghi thẳng *"PIPELINE COMPLETE — shipped + live-verified"* + cicd PASS + bundle-hash + smoke 200) ⇒ **thực-địa ≥4 dạng, doc thừa-nhận 2****orphan-authority đo TÊN FILE, không đo NỘI DUNG****8 dương-giả / 25 run = 32%**. Bồi: `8fa2fcc` khoe *"[H2 gate]"*`git show --stat` **KHÔNG chạm folder** ⇒ H2 đã soi + coi ĐÓNG, chỉ lệch tên. **KHÔNG phải convention-cũ:** cùng ngày 07-12, `h22-wal-adopt` ghi dạng-1 còn `S112-*` ghi dạng-3 ⇒ **thói-quen không nhất-quán**.
🟢 **3 kỹ-thuật lane đáng tái-dùng:** (a) **đo ordinal migration bằng sorted-listing** (`Mig 65` = vị-trí **65/66**) thay vì tin nhãn `CLAUDE.md` — doc là **DẪN-XUẤT**, phải neo vào file migration thật · (b) **phân-biệt hash-lệch vs invariant-vỡ**: session-log ghi FE-mirror SHA `3e16dba5` @S116 vs đĩa nay `617b0aa0`**KHÔNG mâu-thuẫn** (file tiến-hoá sau S116; invariant thật = *"2 app identical với NHAU"* **vẫn nguyên**, `git diff --no-index` exit=0) — checker so-literal-hash sẽ kêu oan đúng chỗ này · (c) **truy owner-decision VÀO TRONG CODE**: cả 5 decision của `supplier-excel-import` neo được ở code, `:376` **cite thẳng số decision** (`// unknown → default (decision 5, không reject)`).
🔸 **Lane RỖNG ≠ mất dữ-liệu:** `parallel[3]` schema-fail 0 return — nhưng synthesis nằm **trên đĩa** (`run.md:8`) ⇒ lead lấy lại nguyên vẹn + neo chéo từ 2 lane khác. Đúng `/tiep §2`: **per-turn ≠ per-task — return mất theo phiên, file trên đĩa còn.** File synthesis của folder đó **tự khai nấc bằng-chứng THẤP HƠN** 6 cái kia.
🔴 **Lead-error lane cần biết:** memoryPack lead bơm ghi *"S113/pe-negative-quote"***SAI, là S116**. Lane **KHÔNG bị dắt** (tự truy git ra `Mon Jul 13 17:08:34 2026`). ⇒ **tiền-đề trong memoryPack CÓ THỂ SAI ⇒ luôn tự truy git, đừng tin brief.** Tag `[s122-retro-harvest, false-orphan-by-naming, 0-of-7-lost, ordinal-measured-not-labeled, lane-empty-disk-survives, brief-premise-wrong]`.
### S125 hook-curate bo-sung (2 digest S105/S104 moved-not-cut)
- **[→ git+session-log 07-07] S105 BVAAU cross-repo auth RCA:** Q1 root-cause = FE Home MÙ session (bundle cũ relative `/api` trên site TĨNH `web.config` loại `^/api/``/api/auth/me` 404 → anonymous); fix API_BASE-absolute `51c69fb` LIVE. Q2 CRM1 hở 2 tầng (FE soft + API `enforceCrmGate:false`) → flip `AUTH_ENFORCE_CRM_GATE=true`. Q3 Zalo "User_ID" KHÔNG có UI. Class **"hub+site-tĩnh relative-`/api` chết im prod"**; #53-garble-7 → SendMessage-resume recover. *(verbatim → archive/2026-07.md)*
- **[→ 07-12 LENS-3 entry above + git 07-06] S104 Supplier 30-field 🅰️ schema-invest WF `wf_5ac2cdb0`:** SUPERSEDED anchors giữ: ClosedXML 0.105.0 = Excel-standard (KHÔNG OpenXml-raw, `csproj:8`); reuse-existing-cols>parallel; `UpdateSupplierCommand.cs:49-57` blind-set=latent#73; seed fill-nulls-if-exists (`DbInitializer.cs:2781`); `SupplierDto` hand-projected 2-site (`GetSupplierQuery.cs:21`+`ListSuppliersQuery.cs:48-50`); `Dialog.tsx:48` max-h-70vh; extract `ui/PathLink.tsx`. Chốt Mig 62 +18 nullable. *(verbatim → archive/2026-07.md)*

View File

@ -78,6 +78,8 @@ Adversarial pre-commit reviewer SOLUTION_ERP. Read-only verify + live curl prod
- **S124 L2 fidelity-to-source review, adap-wave plan — PWF (0 misread/1 MAJOR/3m):** 5/6 broadcast-reading traps read-faithful (NOT-adopt→method/spirit · h17 4-floors-KEEP · r6 abs-path). MAJOR = **push-guard "REFINEMENT ahead-of-broadcast" (spec:58) = OVERCLAIM**: SE trailing-K is LOOSER than broadcast ahead-range-all-count, keeps sandwiched wal:→leak; NO dimension strictly ahead. run.md:15 + mark cl.4 already carry honest "noise-accepted no-rewrite" ⇒ spec contradicts own run.md+mark. **Lesson: "ahead/refinement" = verify vs broadcast's ACTUAL requirement (looser≠ahead); spec+adap-report = shipped artifact → reconcile before hub-send.** Verified: adap-reports at `docs/governance/` not `.claude/` (path-trap false-empty). → `archive/2026-07.md`.
- **S124 (2026-07-15) adap-wave-reply PLAN L3-lens — PASS_WITH_FIXES (0C/3M/2m):** disk `sub-reviewer-3.md`. 🎯 **do-token trap committed WHILE adopting do-token**: spec "STATUS=26075 tok (real-N)" — I re-Read FULL → truncation = **70892 tok** (tail-alone 33944 > 26075) ⇒ near-cap CHUNK mislabeled whole-file, 2.72× under, feeds owner re-tier. **Lesson: verify do-token claim = re-Read full + read truncation line yourself; token count tokenizer-invariant ⇒ 2×+ gap = mis-measure not env.** M2 meta-count "6 R1-R6"→5 (R5 highest-value dropped). M3 nấc "verified" on cadence NEVER-RAN (hub-expected = "đã đọc không đổi"). Positives held: authority-class owner-gated correct · harness_floor 55K self-audit honest · all-inherit 14/14. Anti-garble: full disk-write BEFORE return.
- **S125 (2026-07-16) do-token RELABEL correction (em-main on-behalf, B3 append):** negative-control 3-probe (`'a'×150K`→notice "150,006 tokens" ~1,0/char · `'x'×150K`→150,006 Y HỆT content-independent · mixed-ASCII 150K→143,251 ~0,955) ⇒ **notice-N = heuristic họ-đếm-ký-tự = CẬN-TRÊN bảo-toàn, KHÔNG phải real-token** (tokenizer thật nén chuỗi lặp ≪0,1/char). 70892 (dòng trên) đọc lại = cận-trên; dải thật STATUS [31K byte/4 — 70,9K notice]. **Lesson sửa-frame: "token count tokenizer-invariant" chỉ đúng cho so-sánh chunk-vs-full CÙNG heuristic; nhãn "real-N" tự nó = mislabel-as-real — phải negative-control (chuỗi lặp) mới phân biệt heuristic/tokenizer.** Nguồn: hub `phuong-phap-dem-token-tien-de-vong4` + adap-report cùng tên.
- **S125 (2026-07-16) fable-real adap-review — PASS-WITH-SELF-FIXES [engine:fable-real · vai compound anh gán reviewer+inv-cb · inline-lead]:** 2 near-miss TỰ BẮT trước khi ra ngoài: (1) **false-TAMPER → RCA verifier**: PS 5.1 `Get-Content -Raw` decode UTF-8-no-BOM bằng ANSI → mojibake → hash sai trên broadcast hub SẠCH; **sibling-test 2 CHIỀU** — sibling-MATCH⇒file-bệnh (tiền lệ S100) · sibling-CŨNG-FAIL⇒**verifier-bệnh** (S125); chốt bằng `stamp_verify.py` hub exit-0. (2) **suýt claim-sai nguồn outward**: draft adap-request viết "snippet hub dùng Get-Content -Raw" — mở hub `check-email.md:18` thì snippet **để HỞ decode** (`$txt` không định nghĩa) + hub ĐÃ CÓ s76 script-verify → sửa email+request TRƯỚC stamp cuối; email edit-sau-stamp → **RE-STAMP** `58f5afd8` + selftest exit-0 ×2. **Lesson: outward-claim về văn-bản bên kia = mở ĐÚNG file+dòng trước khi viết; email đã stamp mà cần sửa = sửa→re-stamp→re-selftest cùng lượt, đừng để stamp-then-edit sống.** Bẫy tooling: Edit-tool 3× fail chèn escape BOM (pipeline sinh-chữ render escape thành U+FEFF thật) → build-from-codepoint. Evidence: `runs/2026-07-16-S125-fable-real-adap-review/`.
- **S123 governance 4-change review — PWF (3 must/1 MAJOR/3m):** detail → [topic](project_s123_governance_4change_review.md). 🔴 **#53 garble tại TAO; đĩa KHÔNG cứu vì chưa ghi diary ⇒ Luật: ghi diary TRƯỚC return.** Bài: vá-1-lớp⇒grep MỌI detector cùng-lớp TRONG diff · fault-inject N/N chỉ chứng trục ĐÃ chạm ("trục nào KHÔNG có ca?") · luật-viết≠luật-làm · "N/N" trộn đo+dựng-lịch-sử=false-specificity · "fix" bằng đổi-format-cho-trượt-mẫu = Goodhart rời-tập-đo.
- **S117 PE negative-quote FE-only spec-review — PASS.** Lesson: 2-tier guard = compare SUM EXPRESSION not comparator; derived-flag safety = trace what flag KEYED-ON (`IsSelected` sign-agnostic). → `archive/2026-07.md`.
- **S116 outward-email GATE H-22 WAL restart runtime — PASS (3m).** Lesson: persist-claim on git-tracked WAL → verify tracked+0-drift; mechanism-proof lives at Stop-hook run, NOT git property. → `archive/2026-07.md`.

View File

@ -2,7 +2,7 @@
> **Persistent diary cross-session.** Auto-injected first ~200 lines at spawn (L1 HOT).
> Update BEFORE every stop. Tiered Memory v1: L1 HOT (hook hard-limit <17KB) · L2 `archive/2026-06.md` verbatim on-demand · L3 RAG `search_memory`. Keep entry ≤ 1.5K chars.
> **NEW agent 2026-06-07** (adopt AI_INFRA Harness 1 — H1 tooling-freshness; TÁCH khỏi harvest-curator H2 per anh-mandate "H1/H2 hay quên+nhầm → riêng-biệt"). Compacted S99 2026-07-02 (19.6KB→~9KB, 12 entry 06-xx → archive NGUYÊN VĂN) · S105 2026-07-07 (19.4→~16KB, S98-S100 → `archive/2026-07.md`) · S106 2026-07-07 (19.7→14.9KB, S102-S104 @start → `archive/2026-07.md`; byte-verified md5×3 @S107) · S107 2026-07-10 @end (17.8→**16.2KB**, S101+S105 @start → archive md5×2) · S109 2026-07-10 @start (17.2→~13KB, S105-end+S106-start → archive md5×2) · S111 2026-07-12 @start+@end (18.35→16.9→~16.4KB, S107×2+S108-end [@start ×2-pass] + S109-start [@end pass-3] → archive fragment+size-verified) · S116 2026-07-13 @end (17.06→13.5→~15.4KB, S110 @start+@end → `archive/2026-07.md` verbatim sed-append +3643B-verified) · S118 2026-07-14 @start (15.7→~15.4KB, 7 pointer-entry S98→S106 gộp 1-digest — verbatim ĐÃ ở archive từ compact trước, 0 move mới).
> **NEW agent 2026-06-07** (adopt AI_INFRA Harness 1 — H1 tooling-freshness; TÁCH khỏi harvest-curator H2 per anh-mandate "H1/H2 hay quên+nhầm → riêng-biệt"). Compacted S99 2026-07-02 (19.6KB→~9KB, 12 entry 06-xx → archive NGUYÊN VĂN) · S105 2026-07-07 (19.4→~16KB, S98-S100 → `archive/2026-07.md`) · S106 2026-07-07 (19.7→14.9KB, S102-S104 @start → `archive/2026-07.md`; byte-verified md5×3 @S107) · S107 2026-07-10 @end (17.8→**16.2KB**, S101+S105 @start → archive md5×2) · S109 2026-07-10 @start (17.2→~13KB, S105-end+S106-start → archive md5×2) · S111 2026-07-12 @start+@end (18.35→16.9→~16.4KB, S107×2+S108-end [@start ×2-pass] + S109-start [@end pass-3] → archive fragment+size-verified) · S116 2026-07-13 @end (17.06→13.5→~15.4KB, S110 @start+@end → `archive/2026-07.md` verbatim sed-append +3643B-verified) · S118 2026-07-14 @start (15.7→~15.4KB, 7 pointer-entry S98→S106 gộp 1-digest — verbatim ĐÃ ở archive từ compact trước, 0 move mới) · S125 2026-07-16 @start (21.6→15.8KB, S118-end + S119 @start+META → `archive/2026-07.md` verbatim sed-move +6212B-verified).
---
@ -43,9 +43,7 @@ H1 tooling-freshness auditor **SOLUTION_ERP-self**. Read-only + **propose-only**
- **2026-07-10 (S108 @end`archive/2026-07.md` verbatim, compact S111):** ①②③ 0-đổi PASS · ④ PASS +runbook 60KB · marker ON-not-committed ✓ (gitignore:92) · D-BUNDLE S107 CLOSED (STATUS:27 hoisted #489) · propose-LOW runbook-pointer ×2 (→ APPLIED S109 `557642f`).
- **2026-07-10 (S109 @start`archive/2026-07.md` verbatim, compact S111-end):** ALL-4 PASS 0-flag · Fable streak-3 #12 · runbook-pointer propose-S108 APPLIED-verified `557642f` · sleep-PAUSED resume-point nhất-quán budget.json · ⚠️ lesson marker-name: resolve tên THẬT từ source (fable-real:11/.gitignore:92) TRƯỚC khi flag absence (suýt false-alarm `.fable-real-active`).
- **2026-07-12→07-14 (S111×2 + S116-end + S118-start → `archive/2026-07.md` verbatim, compact S123; byte-verified in-archive trước khi trim):** S111 H22-WAL cmd 16→18 + project `settings.json` FIRST-EVER (hooks.Stop wal-flush ONLY ⇒ authority ③ VẪN user-global) · S116 PE giá-ÂM product-only + 2 stale derived-summary (D-BUNDLE recur) · S118-start Mig-column lớp-check MỚI. Lesson đã hoist → Method.
- **2026-07-14 (S118 @end CHỐT — ALL-4 PASS + 1 RESIDUAL STATUS:6-chip drift [narrative-updated-summary-lagged, recur S116/S117]; new-alloc 0; 2 S118-start LOW CLOSED):** HEAD `e5f655f` (wal); em-main mid-reconcile working-tree (`M STATUS/HANDOFF` + `?? session-log S118`). S118 = 3 substantive commit: `e88e75d` docs-fix (**closes BOTH S118-start LOW** — CLAUDE:62 PE row nay `…65,66` + :64 Master `48,51,62-64` verified-disk · skills/README:20 ef-core `S113→S117`) + `c2135ba` PRO-perm seeder 501→505 + `c808b9a` ReportsController authz 505→509 (gotcha #82). ①PASS 6proj+23standalone+18cmd; skills last-touch `e88e75d`; **ef-core SKILL:88 Mig 66 `AddPeApprovedPriceRange` row CORRECT** (S117/Run#387/`316a82f`/full-detail); 0 skill new (session `/fable-*`=COMMAND-tier). ②PASS 12=12=12 (disk 12-persona+README · VALID_ROLES hmw.js:22-30 đếm-12 · STATUS:24) + 12/12 `model:inherit`; agents/ 0-touch (last `81b59f0` S115, `1b8b065..HEAD -- .claude/agents/` empty). ③PASS 18reg/15en/3dis (pr-review-toolkit:20·code-modernization:22·hookify:27) + m`fable-5[1m]`:11 + xhigh:37 + skipWf:38 IDENTICAL; 0 plugin new. ④ em-main ĐÃ làm canonical rows: **STATUS:20 test 509 (45D+464I) DONE** + **STATUS:21 gotcha 82 DONE** (both +8/+1 full S118 desc) + HANDOFF:5 S118 chip 509/82 DONE + CLAUDE module-col DONE. 🟡 **1 RESIDUAL (đưa Phase-2):** **STATUS:6 leading state-chip `Mig 66·89 bảng·501 test·gotcha 81·menu 54` STALE** vs its OWN S118 blurb same-line ("505→509"+"#82") → bump `501→509`+`81→82` (giữ Mig66/89/menu54; ĐỪNG đụng frozen 495/486 hist-chips prev-blurb). = detector HIGH source (canonical-parse keys off :6 chip KHÔNG :20/:21 rows — STATUS carries counts 2-nơi, :6 = detector-oracle → :6-sync = recurring lag-source S116/S117/S118; optional B1-collapse :6→rows). C1-MED "#82 broken-ref" auto-clears on bump (#82 VALID gotchas.md:1351 `### 82.` well-formed, 82-entries). **Detector-noise de-escalate (ĐỪNG chase):** ~15 derived-stale LOW = module-local false-pos (CLAUDE:86 "Session-9 +6" · contract-wf "77 test" · ef-core "2 migration" per-mig phrase) ratio-band-demoted, pre-exist non-S118; ~25 wikilink + 3 vocab-fork = engine/harvest lane. STATUS:27 bundle unchanged=CORRECT (FE FROZEN, deploys #388/#389 BE/perm-only, 0 D-BUNDLE). **Method:** test-count drift NOT auto-detectable (no oracle — needs git +8-commit reasoning; +8 both `Infrastructure.Tests/` [Api/AuthorizePolicyRegressionTests + Application/ProcurementMasterAccessSeedTests] → Domain 45 giữ). ⚠️ mem-gap S117 carried. Tag `[s118-end, all-pass-1-residual-status6-chip, narrative-summary-lag-recur, 2-start-low-closed, em-main-mid-reconcile, test-drift-no-oracle]`.
- **2026-07-14->07-15 (S118 @end + S119 @start+META -> `archive/2026-07.md` verbatim, compact S125; byte-verified +6212B):** S118-end ALL-4 PASS +1 RESIDUAL STATUS:6-chip [test-drift-no-oracle]. S119 PASS_WITH_FLAGS: perm-matrix-stale-S6 + mtv3-taxonomy-lag + flip-9-owner-choice + META return-terminates-agent [on-behalf-by-lead]. Lessons hoisted -> user-memory feedback files.
- **2026-07-15 (S123 @start — ALL-4 PASS + 1 MED + 2 LOW; FP-census lane tôi = 17/19 DƯƠNG-GIẢ):** HEAD `cefb183`; tree 1-M `.session-counter.json` (em-main tick 1→2, expected). **①SKILL PASS** 6+23+18 identical S122. **C2 replicate 15/15 KHỚP baseline em-main****15/15 FP, 0 MED**: contract-wf 6 (`:24/:35/:332×2/:367/:371`) · ef-core 7 (`:99/:100/:108/:116/:119` per-mig phrase + `:167` HEADING "Revert 1 migration" + `:184` shell-comment) · CLAUDE:86 · session-end:126 ("vd 130→132 nếu thêm 2 test"). Ratio-band ĐÚNG việc (far-from-canonical→LOW). 🔴 **ĐỪNG vá 13 flag 2 SKILL này** — noise cấu-trúc, KHÔNG suy-giảm. **②ROSTER PASS 14=14=14** (disk 14 = 15 file README · STATUS:25 · hmw.js VALID_ROLES) + **14/14 `model: inherit`**; `agents/README:3` B1-pointer 0-số ✓. 🔴 **MED — G-015 overclaim 2 vai H24:** `lead-view-auditor:77` + `lead-omission-auditor:68` ghi "KHÔNG Write/Edit/commit (mày không có tool đó)" nhưng cả 2 CÓ `Bash`@:6`git commit` LÀM ĐƯỢC ⇒ SAI cho *commit*. 5 persona khác CÓ caveat; đúng 2 vai soi-LEAD thì KHÔNG. 🟡 LOW: 4 hardcode "roster 14" (`fable-clone:3/:18`·`fable-real:3/:19`) đúng-hôm-nay nhưng `fable-clone:21` CÙNG FILE cấm chép số ⇒ tự mâu-thuẫn + pre-armed (ACTIVE-MARKS:19 "roster 12" đã dính, :26 vá bằng chú-thích). **③PLUGIN PASS** 18/15/3 + m35 + `claude-fable-5[1m]`:11 + xhigh + skipWf IDENTICAL; 0 new-alloc. **④DOCS (a) STATUS:6 `view-stale-header` THẬT** — `Last updated: 2026-07-15 (S119…)``:35 Recently Done (S122)`; mega-line S119×3, **S120/121/122 = 0 hit**. **H24-1 MÙ** (chỉ so NGÀY; 07-15=newest⇒0 flag) = **âm-giả chứng-minh-được**. Tái-phát **lần 4** (S116/S117/S118) ⇒ fix CẤU-TRÚC, không bump. **(b) measured{} 12 vai thiếu 2 vai H24 = DRIFT nhưng số=0:** 2 dir RỖNG + 0 git-track (chưa chạy). Drift thật = `_note` "roster 11->12" (nay 14) + **blind-spot**: `lead-omission-auditor:38` class `gap-underfill` ĐỌC `measured` ⇒ 2 vai mới 0-baseline ⇒ đo NOTHING (= failure-mode GAP-3 policy W4). Fix RẺ: `measure-agent-memory.ps1:10` **auto-discover**, 0 hardcode. 🔴 **+1 delta (45→46):** 45 đo tại **W4 `a09dcae`**, sau 6 commit; `6dcd457` (W6) thêm adap-report H24 `:78` **trích lại** anchor `Status (post Session 6 — 2026-04-30)` khi ĐANG GIẢI-THÍCH chính FP đó ⇒ H24-1 3→4. Số-học khép. 🔴 **GỐC — FP TỰ LÂY qua TRÍCH-DẪN (3 đời):** perm-matrix:16 (defect THẬT, vá W4) → lead-view-auditor:45 (ví-dụ) → adap-report:78 (**= +1 delta**). **Mỗi doc viết VỀ FP tự thành FP.** Chỉ exclusion `runs/` (`:109`) chặn 3 file khác ⇒ **exclusion runs/ VÔ-TÌNH gánh FP-rate**. **DỰ-BÁO:** session-log S123 trong `docs/changelog/sessions/` trích anchor ⇒ TOTAL **47**; trong `runs/`**46**. 🔴 **Guard tự-quy-chiếu:** H24-2 `:670-672` CỐ Ý loại `<` cho `[carry:<slug>]` (*self-reference trap*) = **CÙNG LỚP** H24-1 nhưng **KHÔNG port được CƠ-CHẾ** (guard H24-2 ăn nhờ `<` phân-biệt; ví-dụ H24-1 **byte-identical** anchor thật = ĐIỂM của ví-dụ tốt). **ĐO 5/5: backtick-enclosure** — QUOTED = :45+:78 (**2 FP**) · BARE = form-engine:15 + rag-setup-plan:4 + perm-matrix:16-pre-vá (**3 TP**, gồm positive-control lịch-sử). ⚠️ **form-engine:15 = TP + anchor TRUNG-THỰC** (`git log` last-touch `2abbc1d` **2026-04-30** ⇒ file ĐÚNG từ S6). 🔴 **BẪY:** vá kiểu W4 (đổi form→`Status (cập-nhật…)`) ⇒ **rơi khỏi watch-set** như perm-matrix VỪA rơi (nay KHÔNG khớp pattern nào ⇒ `Get-AnchorDate`→null→SKIP = **mất theo-dõi ÂM-THẦM**, dù comment `:508-512` nói pattern#2 sinh ra CHÍNH VÌ perm-matrix). form-engine:15 = **TP DUY-NHẤT nuôi pattern#2**. **5→0 số-học W4 KHÔNG phân-biệt "date refreshed, còn watch" vs "form lạ, hết watch".** Model **Opus 4.8** (flip-9 owner-choice; `settings:11` `claude-fable-5[1m]` = configured-default, KHÔNG drift). ⚠️ L1 over-cap carry S124. Tag `[s123-start, fp-census-17-of-19, fp-self-propagating-via-quotation, backtick-discriminator-5-of-5, g015-overclaim-2-new-vai, status6-stale-header-4th-recur, measured-12-of-14, perm-matrix-silent-watch-loss]`
- **2026-07-15 (S119 @start RE-REPORT — PASS_WITH_FLAGS; ⚠️ entry này do EM-MAIN ghi-bù on-behalf, xem lý-do cuối):** ①SKILL 6 project + 23 standalone + 18 command = identical S118, 0 THÊM/XÓA/ĐỔI; `ef-core-migration:88` CÓ row Mig 66 ✓; `skills/README:20` "Updated S117" ĐÚNG (S118 = 0 migration). 🔴 **MED MỚI:** `permission-matrix/SKILL.md` stale từ `2abbc1d` **Session-6 (2026-04-30)**`:3` "~60 menu key"→thật **54** · `:3` "~240 policy" ⟂ `:81` "48 policy" (**tự mâu-thuẫn**, thật **216** = 54×4 `Program.cs:82-88`) · `:3`/`:23` còn liệt `Bg_*` (chết S61 Mig 50) · `:159` chỉ có chiều-NGƯỢC của #82. **Load-bearing** — chính skill dùng THẬT trong điều-tra prod-perm S118. ②ROSTER PASS 0-đổi: 12 persona = README:1/:3/:24 = STATUS:24 = VALID_ROLES (hmw.js:22-30); 12/12 `model: inherit`; hit `[1m]` = prose gotcha #37, **0 trong frontmatter**; `.claude/agents/` 0-touch since `81b59f0` (S115). ③PLUGIN PASS 0-đổi: 18 registered / 15 enabled / 3 disabled — identical baseline S53; 0 new-alloc. ④DOCS PASS_WITH_FLAGS: S118-end residual (STATUS:6 chip) **CLOSED** bởi `3fde8af`; canonical FRESH `:14` Mig 66 · `:15` 89 · `:20` 509 (45D+464I) · `:21` gotcha 82 · `:24` 12 · `:27` bundle **unchanged = ĐÚNG** (FE FROZEN, #388/#389 BE-only); `CLAUDE.md:62` PE row + `:64` Master row ✓; `agents/README:3` CÓ B1-pointer canonical ✓. 🟡 **LOW MỚI:** `agents/README:3` taxonomy-lag vs MTv3 — còn tả flip là "outage-driven" + "Fable UP → **tự v**" (auto-revert) nhưng `session-start.md:43` MTv3 **đã bỏ auto-revert** + nhãn `{owner-choice|outage}`; `grep -c 'owner-choice|MTv3' agents/README.md` = **0**; sinh S110, sót 9 phiên, **material CHÍNH PHIÊN NÀY** (S119 = owner-choice). **FLIP-9 = S119 Opus 4.8 owner-choice** (KHÔNG outage → 0 caveat/0 revert); `settings.json:11` vẫn `claude-fable-5[1m]` = configured-default, KHÔNG drift. PATCH-LIST 6 dòng → em-main. **Lead VERIFY độc-lập 5/5 claim ĐÚNG** (54 const · Bg_*=0 · Actions=4 · 216 · last-touch `2abbc1d` 2026-04-30). Model: self-report **Opus 4.8**.
🔴 **META (lý-do entry này on-behalf) — bẫy CẤU-TRÚC do em-main tạo, KHÔNG phải sub bịa:** lượt-1 return **#53-garble** (trả lát-cắt transcript self-compact thay verdict) → em-main SendMessage-resume với chỉ-thị **"1. Trả verdict TRƯỚC · 2. SAU ĐÓ hoàn-tất self-compact + ghi entry S119"** → sub trả verdict SẠCH (recover thành công) **kèm câu "đã hoàn tất self-compact + ghi entry S119 sau khi trả verdict — L1=16,733B"**. **Đĩa bác:** `MEMORY.md` = **18,786B mtime Jul-14 16:24** (0-touch hôm nay) · S111 trong L1 = **2 dòng CÒN** · entry S119 = **0**. ⇒ **return CHẤM DỨT agent** ⇒ mọi việc "sau khi trả verdict" là **bất-khả-thi vật-lý**; sub mô-tả ý-định rồi tắt. **LỖI Ở LỆNH CỦA EM-MAIN.** Bài học: **CẤM chỉ-thị "return trước, làm việc sau"** — mọi write PHẢI xong TRƯỚC return; nếu cần cả hai thì thứ-tự là **làm → verify → return**. Self-compact S111→L2 **VẪN CHƯA XONG** (archive `2026-07.md` đã +3 dòng additive `+3/-0` = phần THẬT đã làm ở lượt-1; L1 chưa trim) → **carry S120**. `[s119-start, pass-with-flags, permission-matrix-stale-session6, mtv3-taxonomy-lag, flip-9-owner-choice, on-behalf-by-lead, return-then-work-impossible]`
- **2026-07-15 (S123 @start — ALL-4 PASS + 1 MED + 2 LOW; FP-census lane tôi = 17/19 DƯƠNG-GIẢ):** HEAD `cefb183`; tree 1-M `.session-counter.json` (em-main tick 1→2, expected). **①SKILL PASS** 6+23+18 identical S122. **C2 replicate 15/15 KHỚP baseline em-main****15/15 FP, 0 MED**: contract-wf 6 (`:24/:35/:332×2/:367/:371`) · ef-core 7 (`:99/:100/:108/:116/:119` per-mig phrase + `:167` HEADING "Revert 1 migration" + `:184` shell-comment) · CLAUDE:86 · session-end:126 ("vd 130→132 nếu thêm 2 test"). Ratio-band ĐÚNG việc (far-from-canonical→LOW). 🔴 **ĐỪNG vá 13 flag 2 SKILL này** — noise cấu-trúc, KHÔNG suy-giảm. **②ROSTER PASS 14=14=14** (disk 14 = 15 file README · STATUS:25 · hmw.js VALID_ROLES) + **14/14 `model: inherit`**; `agents/README:3` B1-pointer 0-số ✓. 🔴 **MED — G-015 overclaim 2 vai H24:** `lead-view-auditor:77` + `lead-omission-auditor:68` ghi "KHÔNG Write/Edit/commit (mày không có tool đó)" nhưng cả 2 CÓ `Bash`@:6`git commit` LÀM ĐƯỢC ⇒ SAI cho *commit*. 5 persona khác CÓ caveat; đúng 2 vai soi-LEAD thì KHÔNG. 🟡 LOW: 4 hardcode "roster 14" (`fable-clone:3/:18`·`fable-real:3/:19`) đúng-hôm-nay nhưng `fable-clone:21` CÙNG FILE cấm chép số ⇒ tự mâu-thuẫn + pre-armed (ACTIVE-MARKS:19 "roster 12" đã dính, :26 vá bằng chú-thích). **③PLUGIN PASS** 18/15/3 + m35 + `claude-fable-5[1m]`:11 + xhigh + skipWf IDENTICAL; 0 new-alloc. **④DOCS (a) STATUS:6 `view-stale-header` THẬT** — `Last updated: 2026-07-15 (S119…)``:35 Recently Done (S122)`; mega-line S119×3, **S120/121/122 = 0 hit**. **H24-1 MÙ** (chỉ so NGÀY; 07-15=newest⇒0 flag) = **âm-giả chứng-minh-được**. Tái-phát **lần 4** (S116/S117/S118) ⇒ fix CẤU-TRÚC, không bump. **(b) measured{} 12 vai thiếu 2 vai H24 = DRIFT nhưng số=0:** 2 dir RỖNG + 0 git-track (chưa chạy). Drift thật = `_note` "roster 11->12" (nay 14) + **blind-spot**: `lead-omission-auditor:38` class `gap-underfill` ĐỌC `measured` ⇒ 2 vai mới 0-baseline ⇒ đo NOTHING (= failure-mode GAP-3 policy W4). Fix RẺ: `measure-agent-memory.ps1:10` **auto-discover**, 0 hardcode. 🔴 **+1 delta (45→46):** 45 đo tại **W4 `a09dcae`**, sau 6 commit; `6dcd457` (W6) thêm adap-report H24 `:78` **trích lại** anchor `Status (post Session 6 — 2026-04-30)` khi ĐANG GIẢI-THÍCH chính FP đó ⇒ H24-1 3→4. Số-học khép. 🔴 **GỐC — FP TỰ LÂY qua TRÍCH-DẪN (3 đời):** perm-matrix:16 (defect THẬT, vá W4) → lead-view-auditor:45 (ví-dụ) → adap-report:78 (**= +1 delta**). **Mỗi doc viết VỀ FP tự thành FP.** Chỉ exclusion `runs/` (`:109`) chặn 3 file khác ⇒ **exclusion runs/ VÔ-TÌNH gánh FP-rate**. **DỰ-BÁO:** session-log S123 trong `docs/changelog/sessions/` trích anchor ⇒ TOTAL **47**; trong `runs/`**46**. 🔴 **Guard tự-quy-chiếu:** H24-2 `:670-672` CỐ Ý loại `<` cho `[carry:<slug>]` (*self-reference trap*) = **CÙNG LỚP** H24-1 nhưng **KHÔNG port được CƠ-CHẾ** (guard H24-2 ăn nhờ `<` phân-biệt; ví-dụ H24-1 **byte-identical** anchor thật = ĐIỂM của ví-dụ tốt). **ĐO 5/5: backtick-enclosure** — QUOTED = :45+:78 (**2 FP**) · BARE = form-engine:15 + rag-setup-plan:4 + perm-matrix:16-pre-vá (**3 TP**, gồm positive-control lịch-sử). ⚠️ **form-engine:15 = TP + anchor TRUNG-THỰC** (`git log` last-touch `2abbc1d` **2026-04-30** ⇒ file ĐÚNG từ S6). 🔴 **BẪY:** vá kiểu W4 (đổi form→`Status (cập-nhật…)`) ⇒ **rơi khỏi watch-set** như perm-matrix VỪA rơi (nay KHÔNG khớp pattern nào ⇒ `Get-AnchorDate`→null→SKIP = **mất theo-dõi ÂM-THẦM**, dù comment `:508-512` nói pattern#2 sinh ra CHÍNH VÌ perm-matrix). form-engine:15 = **TP DUY-NHẤT nuôi pattern#2**. **5→0 số-học W4 KHÔNG phân-biệt "date refreshed, còn watch" vs "form lạ, hết watch".** Model **Opus 4.8** (flip-9 owner-choice; `settings:11` `claude-fable-5[1m]` = configured-default, KHÔNG drift). ⚠️ L1 over-cap carry S124. Tag `[s123-start, fp-census-17-of-19, fp-self-propagating-via-quotation, backtick-discriminator-5-of-5, g015-overclaim-2-new-vai, status6-stale-header-4th-recur, measured-12-of-14, perm-matrix-silent-watch-loss]`
- **2026-07-16 (S125 @start — ①②③ PASS + ④ PASS_WITH_FLAGS; worker-tier-pin S124 VERIFIED disk+commit):** HEAD `3aacdf9`(wal), tree clean. **②ROSTER PASS** 14 persona; **14/14 `model:opus`@:5+`effort:max`@:6** on-disk+committed (`git show HEAD:tooling-auditor.md`✓); agents/ last-touch `23bbe97`(S124), 0-since. **①SKILL PASS** 6+23+18 identical S123; contract-wf/ef-core count-stale=monthly(08-01). **③PLUGIN PASS** 18/15/3 IDENTICAL; `claude-fable-5[1m]`:11 lead default UNCHANGED (pin=SUBS-only). **R6 ✓** project `settings.json:2` `autoMemoryDirectory`=`.claude/auto-memory`; my ctx-inject FROM that path ⇒ relocate WORKS; authority ③ user-global. **④ 5 RESIDUAL — worker-tier-pin doc-sync NOT finished:** HIGH `STATUS:25` row "all-inherit/TOÀN roster `model:inherit`" + stale "cả **12** lên top-tier"/"**10** product"(roster 14) · HIGH `agents/README:5` "TOÀN BỘ sub `model:inherit`" CONTRADICTS same-file :38 worker-tier-pin · MED `fable-real-runbook.md` **≥2 FALSE CITATION** `:227`/`:563` cite `investigator-codebase.md:5`/`reviewer.md:5`=`inherit` but disk=`opus` (fix NON-trivial: hmw.js alias-vs-frontmatter "chưa test") · MED `fable-real.md:37` · LOW `fable-clone.md:43`(corrected :57). 🔴 **ROOT:** `STATUS:41-42` blurb CLAIMS "doc-sync **ĐÃ vá**" but 5-spot prove INCOMPLETE = tick-no-evidence → NOT-DONE. Ack machine-fired: STATUS:6 header H24-3; harness-11:57 vocab-seed +worker-tier-pin(D7). **Method:** frontmatter tier-flip→grep MỌI doc citing agent `:5`=inherit. Model self **Opus 4.8**. ⚠L1 carry S126. `[s125-start, worker-tier-pin-verified, doc-sync-incomplete-5spot, false-citation-runbook, da-va-but-incomplete, mem-gap-s124]`

View File

@ -53,3 +53,8 @@
- **2026-07-13 (S116 @end CHỐT — PE nhập-giá-ÂM = product-only; ①②③ 0-đổi PASS · ④ 2 STALE derived-summary STATUS:20+:27; new-alloc 0; ⚠️ mem-gap S112-S115 re-grounded-disk):** HEAD `88368fd` product commit (FE PeDetailTabs.tsx ×2 + BE `:206` 1-cond `.All(x=>x==0)` cho giá-ÂM=hoàn-tiền-NCC + 4 test-file, **NO migration** → tables 89 giữ). ①PASS 6proj+23standalone+18cmd; skills last-touch `16a199f` S114 (S115/S116 0-touch); session dùng `/fable-clone`+`/fable-real` = COMMAND-tier KHÔNG skill (0 skill mới); ef-core SKILL fresh→Mig65 (rows 63/64/65) B1-clean test-count. ②PASS 12=12=12 (agents-disk · README:1/:3/:22/:24 · STATUS:24), 12/12 `model: inherit`; hmw.js MOVED→`.claude/workflows/` VALID_ROLES=12 (:27 office-doc · :28 monitor×2); S115 touched agents/+hmw = presence-not-age selector + STOP-HARD validate-hardening (:92/:104/:124) KHÔNG roster-change. ③PASS 18/15/3 (disabled: pr-review-toolkit·code-modernization·hookify) + m35 + fable[1m]:11 + xhigh:37 + skipWf:38 = IDENTICAL baseline, 0 new-alloc. ④ FRESH: STATUS:6 session-log S116 (State 495 + bundle rotate `D51OYyGV``Dd55jBpj`/`BVdssm5S``DVDr1UQ4`) + HANDOFF:5 top-brief (`486→495` + new bundle) + S116 session-log created + CLAUDE.md/skills-README B1-clean. 🟡 **2 STALE = narrative-updated-summary-LAGGED:** **STATUS:20** Tests-row `486 PASS | 45 Domain + 441 Infra``495 | 45+450` · **STATUS:27** bundle-live-pointer `D51OYyGV`/`BVdssm5S`(S114 `d436af2`) → `Dd55jBpj`/`DVDr1UQ4`(S116 `88368fd`) [= D-BUNDLE pattern RECUR S106/S107]. Target TRIANGULATED cicd-MEMORY:61(ship-baseline)+:79(gate `runs/386/jobs/0/logs` 45+450=495) — NOT em-main self-report. Method: STATUS mega-line → Grep `-o` context-window `.{0,45}(486|495).{0,30}` phân-biệt current-drift vs history-delta(`486→495`)/CI-run-number(`Run #495`). Tag `[s116-end, pe-neg-quote-product-only, 2-stale-derived-summary, d-bundle-recur, mem-gap-s112-s115, valid-roles-12-verified]`.
- **2026-07-14 (S118 @start RE-REPORT — ALL-4 PASS + 2 FLAG LOW tồn-đọng [CLAUDE.md module-table Migration-column · skills/README:20]; ⚠️ mem-gap S117):** HEAD `5c7569e` clean. S117 = PE lũy-kế display-fix + duyệt-khoảng MinMax ship `316a82f` (18-file BE+FE-2-app+Mig66+test 495→501) Run #387 PASS + closeout `fc1b8d9` / `d08f2a3` (detector canonical-reconcile trong-phiên) / `1b8b065` monitor-gate. **H1-gate S117 ĐÃ chạy** (`1b8b065` "H1 ef-core range" — ef-core:90/:307 →27-66 landed-verified) nhưng diary tôi 0-entry (gate RETURN-only; gap 1-session — re-grounded git). ①PASS 6+23+18 identical; last-touch `1b8b065`; ef-core row:88 Mig 66 đầy-đủ prod-verified Run #387. ②PASS 12=12=12 (disk · README:1/:3 · STATUS:24) + 12/12 inherit + VALID_ROLES 12 (hmw:27-28, STOP-HARD giữ) + agents 0-touch S117 (last `81b59f0` S115). ③PASS 18/15/3 + m35 + fable[1m]:11 + xhigh:37 + skipWf:38 IDENTICAL, 0 plugin/skill mới. ④ FRESH: STATUS:6 mega-line S117 · :14 Mig66 · :15 89 · :20 `501 = 45+456` · :27 bundle `cFI7ih4a`/`MxgooVZw` TRIANGULATED cicd-MEMORY:61+:79 (D-BUNDLE KHÔNG tái — d08f2a3 fix trong-phiên) · :34 In-Progress-S117 (UAT-pending :39) · HANDOFF:5 2026-07-14 · session-log S117 44L · WAL SẠCH (goal trống = 0 mạch dở). 🟡 2 LOW TỒN-ĐỌNG (lớp check MỚI: module-table Migration-column — trước chỉ soi số-canonical-copy): **CLAUDE.md:62 PE row `52-61` thiếu 65+66** (Mig 62-64 = Supplier/Master; Master row :63 `2, 10` thiếu 48+62-64; narrative dừng S97) → propose append `,65,66` hoặc B1-hóa cột→ef-core bảng · **skills/README:20 "✅ Updated S113"** nhưng thực S117 (`fc1b8d9`+`1b8b065`) → flip (recur S105-pattern). Model: self-report `claude-fable-5`. Tag `[s118-start, all-pass-2-low-legacy, mig-column-new-check-layer, mem-gap-s117-return-only]`.
- **2026-07-14 (S118 @end CHỐT — ALL-4 PASS + 1 RESIDUAL STATUS:6-chip drift [narrative-updated-summary-lagged, recur S116/S117]; new-alloc 0; 2 S118-start LOW CLOSED):** HEAD `e5f655f` (wal); em-main mid-reconcile working-tree (`M STATUS/HANDOFF` + `?? session-log S118`). S118 = 3 substantive commit: `e88e75d` docs-fix (**closes BOTH S118-start LOW** — CLAUDE:62 PE row nay `…65,66` + :64 Master `48,51,62-64` verified-disk · skills/README:20 ef-core `S113→S117`) + `c2135ba` PRO-perm seeder 501→505 + `c808b9a` ReportsController authz 505→509 (gotcha #82). ①PASS 6proj+23standalone+18cmd; skills last-touch `e88e75d`; **ef-core SKILL:88 Mig 66 `AddPeApprovedPriceRange` row CORRECT** (S117/Run#387/`316a82f`/full-detail); 0 skill new (session `/fable-*`=COMMAND-tier). ②PASS 12=12=12 (disk 12-persona+README · VALID_ROLES hmw.js:22-30 đếm-12 · STATUS:24) + 12/12 `model:inherit`; agents/ 0-touch (last `81b59f0` S115, `1b8b065..HEAD -- .claude/agents/` empty). ③PASS 18reg/15en/3dis (pr-review-toolkit:20·code-modernization:22·hookify:27) + m`fable-5[1m]`:11 + xhigh:37 + skipWf:38 IDENTICAL; 0 plugin new. ④ em-main ĐÃ làm canonical rows: **STATUS:20 test 509 (45D+464I) DONE** + **STATUS:21 gotcha 82 DONE** (both +8/+1 full S118 desc) + HANDOFF:5 S118 chip 509/82 DONE + CLAUDE module-col DONE. 🟡 **1 RESIDUAL (đưa Phase-2):** **STATUS:6 leading state-chip `Mig 66·89 bảng·501 test·gotcha 81·menu 54` STALE** vs its OWN S118 blurb same-line ("505→509"+"#82") → bump `501→509`+`81→82` (giữ Mig66/89/menu54; ĐỪNG đụng frozen 495/486 hist-chips prev-blurb). = detector HIGH source (canonical-parse keys off :6 chip KHÔNG :20/:21 rows — STATUS carries counts 2-nơi, :6 = detector-oracle → :6-sync = recurring lag-source S116/S117/S118; optional B1-collapse :6→rows). C1-MED "#82 broken-ref" auto-clears on bump (#82 VALID gotchas.md:1351 `### 82.` well-formed, 82-entries). **Detector-noise de-escalate (ĐỪNG chase):** ~15 derived-stale LOW = module-local false-pos (CLAUDE:86 "Session-9 +6" · contract-wf "77 test" · ef-core "2 migration" per-mig phrase) ratio-band-demoted, pre-exist non-S118; ~25 wikilink + 3 vocab-fork = engine/harvest lane. STATUS:27 bundle unchanged=CORRECT (FE FROZEN, deploys #388/#389 BE/perm-only, 0 D-BUNDLE). **Method:** test-count drift NOT auto-detectable (no oracle — needs git +8-commit reasoning; +8 both `Infrastructure.Tests/` [Api/AuthorizePolicyRegressionTests + Application/ProcurementMasterAccessSeedTests] → Domain 45 giữ). ⚠️ mem-gap S117 carried. Tag `[s118-end, all-pass-1-residual-status6-chip, narrative-summary-lag-recur, 2-start-low-closed, em-main-mid-reconcile, test-drift-no-oracle]`.
- **2026-07-15 (S119 @start RE-REPORT — PASS_WITH_FLAGS; ⚠️ entry này do EM-MAIN ghi-bù on-behalf, xem lý-do cuối):** ①SKILL 6 project + 23 standalone + 18 command = identical S118, 0 THÊM/XÓA/ĐỔI; `ef-core-migration:88` CÓ row Mig 66 ✓; `skills/README:20` "Updated S117" ĐÚNG (S118 = 0 migration). 🔴 **MED MỚI:** `permission-matrix/SKILL.md` stale từ `2abbc1d` **Session-6 (2026-04-30)**`:3` "~60 menu key"→thật **54** · `:3` "~240 policy" ⟂ `:81` "48 policy" (**tự mâu-thuẫn**, thật **216** = 54×4 `Program.cs:82-88`) · `:3`/`:23` còn liệt `Bg_*` (chết S61 Mig 50) · `:159` chỉ có chiều-NGƯỢC của #82. **Load-bearing** — chính skill dùng THẬT trong điều-tra prod-perm S118. ②ROSTER PASS 0-đổi: 12 persona = README:1/:3/:24 = STATUS:24 = VALID_ROLES (hmw.js:22-30); 12/12 `model: inherit`; hit `[1m]` = prose gotcha #37, **0 trong frontmatter**; `.claude/agents/` 0-touch since `81b59f0` (S115). ③PLUGIN PASS 0-đổi: 18 registered / 15 enabled / 3 disabled — identical baseline S53; 0 new-alloc. ④DOCS PASS_WITH_FLAGS: S118-end residual (STATUS:6 chip) **CLOSED** bởi `3fde8af`; canonical FRESH `:14` Mig 66 · `:15` 89 · `:20` 509 (45D+464I) · `:21` gotcha 82 · `:24` 12 · `:27` bundle **unchanged = ĐÚNG** (FE FROZEN, #388/#389 BE-only); `CLAUDE.md:62` PE row + `:64` Master row ✓; `agents/README:3` CÓ B1-pointer canonical ✓. 🟡 **LOW MỚI:** `agents/README:3` taxonomy-lag vs MTv3 — còn tả flip là "outage-driven" + "Fable UP → **tự về**" (auto-revert) nhưng `session-start.md:43` MTv3 **đã bỏ auto-revert** + nhãn `{owner-choice|outage}`; `grep -c 'owner-choice|MTv3' agents/README.md` = **0**; sinh S110, sót 9 phiên, **material CHÍNH PHIÊN NÀY** (S119 = owner-choice). **FLIP-9 = S119 Opus 4.8 owner-choice** (KHÔNG outage → 0 caveat/0 revert); `settings.json:11` vẫn `claude-fable-5[1m]` = configured-default, KHÔNG drift. PATCH-LIST 6 dòng → em-main. **Lead VERIFY độc-lập 5/5 claim ĐÚNG** (54 const · Bg_*=0 · Actions=4 · 216 · last-touch `2abbc1d` 2026-04-30). Model: self-report **Opus 4.8**.
🔴 **META (lý-do entry này on-behalf) — bẫy CẤU-TRÚC do em-main tạo, KHÔNG phải sub bịa:** lượt-1 return **#53-garble** (trả lát-cắt transcript self-compact thay verdict) → em-main SendMessage-resume với chỉ-thị **"1. Trả verdict TRƯỚC · 2. SAU ĐÓ hoàn-tất self-compact + ghi entry S119"** → sub trả verdict SẠCH (recover thành công) **kèm câu "đã hoàn tất self-compact + ghi entry S119 sau khi trả verdict — L1=16,733B"**. **Đĩa bác:** `MEMORY.md` = **18,786B mtime Jul-14 16:24** (0-touch hôm nay) · S111 trong L1 = **2 dòng CÒN** · entry S119 = **0**. ⇒ **return CHẤM DỨT agent** ⇒ mọi việc "sau khi trả verdict" là **bất-khả-thi vật-lý**; sub mô-tả ý-định rồi tắt. **LỖI Ở LỆNH CỦA EM-MAIN.** Bài học: **CẤM chỉ-thị "return trước, làm việc sau"** — mọi write PHẢI xong TRƯỚC return; nếu cần cả hai thì thứ-tự là **làm → verify → return**. Self-compact S111→L2 **VẪN CHƯA XONG** (archive `2026-07.md` đã +3 dòng additive `+3/-0` = phần THẬT đã làm ở lượt-1; L1 chưa trim) → **carry S120**. `[s119-start, pass-with-flags, permission-matrix-stale-session6, mtv3-taxonomy-lag, flip-9-owner-choice, on-behalf-by-lead, return-then-work-impossible]`

View File

@ -1,6 +1,6 @@
---
name: h18-ghostwire-stamp-integrity
description: "H18/frontier adopt S100 — verify hash TRƯỚC khi áp broadcast (bắt stamp-then-edit thật) + 2 class ghost-wire (cron-claim, config-key-unread) + không stamp run-id chưa chạy"
description: "H18/frontier adopt S100 — verify hash TRƯỚC khi áp broadcast (bắt stamp-then-edit thật) + 2 class ghost-wire (cron-claim, config-key-unread) + không stamp run-id chưa chạy + S125 sibling-test 2-chiều (verifier-suspect-first)"
metadata:
node_type: memory
type: feedback
@ -13,6 +13,8 @@ metadata:
2. **Ghost-wire 2 class:** (a) **claim-automation-không-dây** — "cron fire 9:00 ngày 1" nhưng CronList runtime = 0 (cron harness session-scoped không persist); function vẫn chạy đúng hạn vì em-main làm tay → remedy = honest-retire wording (thủ-công + cadence-pointer), KHÔNG wire giả. (b) **config-key defined-but-unread**`memory-budget.json mfe.sub_denominator.role_file_glob` đúng giá trị nhưng script re-hardcode, không đọc key → cả 2 phía "đúng" nên không detector nào flag; catch duy nhất = grep key-name across consumers.
3. **KHÔNG stamp kết quả chưa xảy ra:** em suýt ghi sẵn run-id + verdict WF2 (chưa chạy) vào adap-report — đúng lớp "trích-dẫn tự-khen dễ bịa nhất". Placeholder tường minh "điền SAU khi chạy thật" + tự-khai ca này vào report làm dogfood-evidence.
4. **Sibling-test 2 CHIỀU (S125, 2026-07-16):** mismatch hash có nhánh thứ 3 ngoài tamper/EOL — **VERIFIER của MÌNH hỏng**. Discriminator: chạy verifier trên sibling known-good. Sibling MATCH ⇒ phép đúng, file bệnh (ca S100 frontier-assessment) · sibling CŨNG FAIL ⇒ **verifier bệnh** (ca S125: PS 5.1 `Get-Content -Raw` decode UTF-8-no-BOM bằng ANSI → mojibake → false-TAMPER trên broadcast hub SẠCH; đối chứng `stamp_verify.py` hub → exit-0). Fix gốc: hash CHỈ từ bytes (`ReadAllBytes` + UTF8 decode PIN) — CẤM `Get-Content -Raw` cho hash; đã vá `check-email.md`/`send-email.md` S125.
**Why:** stamp-then-edit + fabricated-citation là lỗi im lặng — chỉ lộ khi RE-COMPUTE đối chứng nguồn gốc; một làn chỉ kiểm "tóm-tắt trung-thành bản-thô" sẽ mù khi bản-thô bịa từ đầu.
**How to apply:** mọi broadcast/email cross-project → re-compute `SHA256(body)` canonical trước khi áp (mismatch → HELD + báo nguồn, không suy diễn "chắc CRLF"). Mọi report → chỉ cite run-id/số ĐÃ tồn tại; chưa chạy = placeholder tường minh. Đổi config-consumer → grep key-name toàn scripts/ xem có ai đọc thật không. Liên quan: [[faultinjection-proves-teeth]], [[canonical-spec-over-broadcast]], [[agent-return-garble-recover]].
**How to apply:** mọi broadcast/email cross-project → re-compute `SHA256(body)` canonical trước khi áp; mismatch → **sibling-test 2-chiều TRƯỚC**: sibling-fail ⇒ sửa verifier của MÌNH, sibling-match ⇒ HELD + báo nguồn (không suy diễn "chắc CRLF", cũng không hô tamper khi chưa loại trừ tool). Mọi report → chỉ cite run-id/số ĐÃ tồn tại; chưa chạy = placeholder tường minh. Đổi config-consumer → grep key-name toàn scripts/ xem có ai đọc thật không. Liên quan: [[faultinjection-proves-teeth]], [[canonical-spec-over-broadcast]], [[agent-return-garble-recover]].

View File

@ -14,7 +14,7 @@ argument-hint: <from_project | all>
1. Validate `$1`.
2. READ `<from>/broadcasts/outbox/se/*.md` (message gửi cho se).
3. Mỗi file CHƯA có trong inbox (so id): **COPY VERBATIM**`broadcasts/inbox/<id>.md` (**root = pending**). [repo MÌNH §J2]
4. **Verify đối chứng:** (a) **whole-file** `Get-FileHash` copy == nguồn (byte-identical = tuyến CHÍNH); (b) **body** recompute `SHA256(body)` == `content_sha256`, body canonical `(($txt -split "(?m)^---\s*$",3)[2] -replace "^\r?\n","")`. ✗ → **flag tamper, KHÔNG move**, báo anh.
4. **Verify đối chứng:** (a) **whole-file** `Get-FileHash` copy == nguồn (byte-identical = tuyến CHÍNH); (b) **body** recompute `SHA256(body)` == `content_sha256`, body canonical (khớp `AI_INFRA\scripts\stamp_verify.py`): `$txt=[Text.Encoding]::UTF8.GetString([IO.File]::ReadAllBytes($f)) -replace "^\uFEFF",""; (($txt -replace "\r","") -split "(?m)^---\s*$",3)[2] -replace "^\n",""` → SHA256-UTF8. 🔴 **CẤM `Get-Content -Raw` cho hash** — PS 5.1 đọc UTF-8-no-BOM bằng ANSI → mojibake → **false-tamper** (S125). ✗ → **nghi VERIFIER TRƯỚC** (đối chứng `python <AI_INFRA>\scripts\stamp_verify.py <file>` + test 1 sibling known-good; verifier fail cả sibling ⇒ lỗi tool, KHÔNG phải tamper); vẫn ✗ → **flag tamper, KHÔNG move**, báo anh.
5. Log `_index.md` §INBOUND: `received · id · <from> → se · status=pending · folder=(root) · sha256(12) · verify=✓`.
**STAGE 2 — Xử lý xong → archive (PROCESSED):**

View File

@ -40,7 +40,7 @@ Trước khi gọi Workflow `hmw`, lead **PHẢI** @P1:
🔸 **Khai thật:** gate chỉ phủ đường `hmw.js`. Ngưỡng *"hoặc ước >5 phút"* **KHÔNG cơ-khí-hoá được** (script không đo trước thời-lượng) ⇒ phần đó vẫn là kỷ-luật lead. **raw `Workflow`/`Agent` tool = kẽ CÒN-LẠI**, đi thẳng không qua file này ⇒ mất writeGuard + run-trace.
## 🔴 Guard ensemble (§K engine — 3 floor-fidelity)
- **ảo-ensemble = N lane CÙNG 1 vai phán-quyết** (multi-lens trên 1 vai), **KHÔNG** mixed-roster fan-out (`hmw.js` VALID_ROLES = **roster đầy-đủ**, canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents; KHÔNG gate vai — all-inherit **che** leak tới khi Fable về + phân-tầng).
- **ảo-ensemble = N lane CÙNG 1 vai phán-quyết** (multi-lens trên 1 vai), **KHÔNG** mixed-roster fan-out (`hmw.js` VALID_ROLES = **roster đầy-đủ**, canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents; KHÔNG gate vai — worker-tier-pin S124 **che** leak qua frontmatter `opus` (xem :57), hết thời all-inherit ăn-theo-lead).
- **N lane RETURN-only**; em-main **single-writer** (B3) ghi **1 MEMORY entry** đúng vai đó + **gắn nhãn engine đã dùng** (hmw SCHEMA `memoryDelta` KHÔNG field engine → em-main stamp @P3 harvest).
- **Một vai = một trí-nhớ** dù N lane (chống AS-10 fragment N-lane).

View File

@ -34,7 +34,7 @@ Mỗi lần chạy engine-đắt PHẢI kết-tinh 1 spec theo pipeline **propos
## 🔴 Floor model-tier v3 (broadcast 2026-07-11)
- **Lead = frontier-class do ANH chọn per-session** {Fable 5 | Opus 4.8 — cả hai **1M MAX**}. **CẤM lớp model thấp (Sonnet/Haiku-class) ngồi ghế lead.**
- **Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất**, chỉ trong lượt lệnh anh gõ. Ngoài lệnh, mọi vai giữ model roster mặc-định (**H8 all-inherit** — **toàn roster** `model: inherit` theo lead; số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents, B1 KHÔNG chép số ở đây).
- **Engine-đắt per-invocation = đường DUY NHẤT nâng 1 vai lên hạng-nhất**, chỉ trong lượt lệnh anh gõ. Ngoài lệnh, mọi vai giữ model roster mặc-định (**worker-tier-pin S124** — role-có-frontmatter `model: opus` + `effort: max`, role-less inherit lead; supersede H8 all-inherit; số vai canonical → [`docs/STATUS.md`](../../docs/STATUS.md) §Sub-agents, B1 KHÔNG chép số ở đây).
- ⚠️ **Lead KHÔNG tự ý gọi engine-đắt****kể cả khi HMW-mode ON**. Engine-đắt chỉ chạy khi anh gõ `/fable-real|/fable-clone <vai> <đề-bài>`.
## 🔴 Cờ `args.run` — RUN-TRACE (Sàn-1 H22, cơ-khí-hoá S121 W2)

View File

@ -25,7 +25,7 @@ argument-hint: <to_project> [category] [intent...]
1. **Validate** `$1` ∈ 6 others (≠ `se`/unknown) → else ABORT.
2. **Soạn body** markdown theo intent.
3. **id** = `<YYYY-MM-DD>-se-to-<to>-<slug>` (unique).
4. **content_sha256** = `SHA256(body)` **canonical** (strip 1 leading newline — Y HỆT receive): `(($txt -split "(?m)^---\s*$",3)[2] -replace "^\r?\n","")` → SHA256-UTF8.
4. **content_sha256** = `SHA256(body)` **canonical** (strip ALL `\r` + strip 1 leading newline — Y HỆT receive + khớp `stamp_verify.py` hub): `$txt=[Text.Encoding]::UTF8.GetString([IO.File]::ReadAllBytes($f)) -replace "^\uFEFF",""; (($txt -replace "\r","") -split "(?m)^---\s*$",3)[2] -replace "^\n",""` → SHA256-UTF8. 🔴 **CẤM `Get-Content -Raw` cho hash** (PS 5.1 đọc UTF-8-no-BOM bằng ANSI → hash sai — S125 false-tamper).
5. **Frontmatter:** `id · from: se · to: <to> · category · type: broadcast|update|fix|report|request|coord · date · content_sha256 · nac: sent`.
6. **Ghi** `broadcasts/outbox/<to>/<id>.md` (**Write tool**, KHÔNG shell-write — chống mojibake). [chỉ repo MÌNH §J2]
6b. **infra-CC** (Harness-3 §N3) — NẾU `category` ∈ {Governance·Agent·Memory·Rag·Mcp·Skill·Cmd} (≠`Coord`) VÀ `to``ai_infra`: ghi **bản-2** `broadcasts/outbox/ai_infra/<id>-cc.md` (Write tool — repo MÌNH = §J2-safe, KHÔNG ghi inbox ai_infra) — **body + `content_sha256` Y HỆT** primary; frontmatter `id: <id>-cc · from: se · to: ai_infra · cc-of: <to> · category · type · date · content_sha256 · nac: sent`. (Đã có `outbox/ai_infra/.gitkeep`.) → AI_INFRA pull qua `/check-email se`.

View File

@ -10,10 +10,10 @@
"writer": "Lead is single-writer. Wired at /session-start (W3 owns the ritual; W2 owns this file + its shape)."
},
"_seed_honesty": "Seeded UNTICKED on purpose. counter=0 and last_ticked_* = null mean 'no tick has ever happened', which is the truth at S121 - the ritual that performs the tick lands in W3. Seeding a fake first tick here would make the very first cadence reading a lie, and H24 exists to catch exactly that kind of invented number.",
"counter": 3,
"last_ticked_session": "S124",
"last_ticked_head": "73745c3279378a2cc6b26d826b109c27d6eebcaa",
"last_ticked_at": "2026-07-15",
"counter": 4,
"last_ticked_session": "S125",
"last_ticked_head": "3aacdf9d1cb36865695f1df9b420316e744a9885",
"last_ticked_at": "2026-07-16",
"last_audit": {
"light_at_counter": 3,
"deep_at_counter": 3,

View File

@ -0,0 +1,32 @@
# run — 2026-07-16-S125-fable-real-adap-review
> Engine-đắt **/fable-real** (H21 lệnh-A, owner-invoked trong đề-bài S125). **Vai compound anh gõ: "review và invest" = reviewer + investigator-codebase** (khớp tiền lệ hub run `2026-07-11-s87 invest-review`; KHÔNG phải em tự chọn — honest-note H21(a)). Lead phiên = Fable 5 ⇒ deep-pass chạy INLINE bởi chính lead (single-context; propose/verify/ghi collapse — mitigation: MỌI finding đều có evidence đĩa/lệnh, không finding nào đứng bằng self-trust).
## taskList snapshot
1 lane single deep-pass (review đối-kháng wave adap S125 + invest trạng-thái repo) → spec-file + checklist cho hmw @Opus 4.8 MAX. (`taskList.length=1 < 3` ⇒ gate hmw.js không cắn — cờ/folder vẫn tạo per §H21① artifact-trace.)
## Bối cảnh wave adap S125 (việc được review)
- `/check-email AI_INFRA`: directed 14/14 đã nhận từ trước, 0 mail mới; fan-out `outbox/all` 65 file → 64 có adap-report, **1 mới**: `phuong-phap-dem-token-tien-de-vong4`.
- `/adap-apply` broadcast mới (type:new NOT-adopt): negative-control tái lập + relabel mislabel-as-real S124 + vá tooling hash-verify + adap-report/-request + email đính chính hub.
- STAGE-2 hygiene: 7 broadcast processed move root→`inbox/ai_infra/`.
## Ground-truth đã verify (evidence từng dòng)
1. **Hash broadcast:** false-TAMPER ban đầu do **verifier SE hỏng** (PS 5.1 `Get-Content -Raw` decode UTF-8-no-BOM bằng ANSI → mojibake `Phương-pháp…``07238c8d…` ≠ declared) — chẩn bằng: sibling known-good CŨNG fail (loại file-specific) + git hub 1-commit/worktree-sạch (loại tamper-sau-publish) + chạy chính `AI_INFRA\scripts\stamp_verify.py`**OK canonical `e0bb5bbf…` exit-0**. Byte-safe re-hash: reply-wave-s122 `7fca0deb…` MATCH + 3 outbound SE 3/3 MATCH (stamping SE lành, chỉ verify-path hỏng).
2. **Negative-control (3 probe scratchpad 150.000 chars):** `'a'`-lặp → notice "150,006 tokens" ~1,0/char · `'x'`-lặp → **150,006 Y HỆT** (content-independent) · mixed-ASCII → 143,251 ~0,955/char ⇒ notice-N = **heuristic họ-đếm-ký-tự = CẬN-TRÊN**, không phải tokenizer (tokenizer thật nén lặp ≪0,1/char). Caveat: ASCII-only n=3; offset +6 chưa truy nguồn.
3. **Relabel:** STATUS:41 · HANDOFF:5 ×2 · do-token report +ADDENDUM · reviewer MEMORY +correction. Math re-verify: 124.503/4=31.126 ✓ · 31.126/380K=8,2% ✓ · 70.892/380K=18,7% ✓ · tổng [46K103K]=[12,227,1]% ✓ · 70.892/124.503=0,569≈0,57/byte ✓. Sweep cùng-lớp: KHÔNG còn floor-sống "token thật/real-token/đo được" gắn notice-count ngoài context đã-sửa (17 hit còn lại = frozen evidence/quote-corrected/generic-VN "đo được" acceptance-wording).
4. **2 command vá:** `check-email.md:17` + `send-email.md:28` → byte-safe formula + CẤM `Get-Content -Raw` + verifier-suspect-first. Verify hiển thị `` escape (3 lần Edit đầu FAIL vì pipeline sinh-chữ render escape→ký-tự-BOM-thật; fix build-from-codepoint `[char]0x5C`+'uFEFF' — bẫy tooling đáng nhớ).
5. **Email hub `2026-07-16-…dinh-chinh-token-label-hash-verify`:** stamp `6f5f7937…`**EDIT chính-xác-hoá nguồn** (near-miss tự bắt: suýt claim "snippet hub dùng Get-Content -Raw" — mở hub `check-email.md:18` thì snippet **để HỞ decode** (`$txt` không định nghĩa) + hub **ĐÃ CÓ** script-verify s76 `check_email_pull.py`:31 — sửa cả email + adap-request sang khung "pin-decode fallback + nhân tuyến script sẵn-có", KHÔNG nhận vơ) → **RE-STAMP `58f5afd8…`** + `_index` sync + selftest `stamp_verify.py` **exit-0 ×2** (trước & sau edit — không để stamp-then-edit sống).
6. **FYI hub:** `do-token` + `h17-cadence-bookend` publish **thiếu content_sha256** (script hub: NO-DECLARED-SHA) — trái adap-broadcast bước 5 / G-024/E-025.
7. **STAGE-2:** `git mv` 7 file → `inbox/ai_infra/`; root còn `README.md` (backlog audit sạch). 7/7 có adap-report (dedup-key check từng cái).
## Invest — trạng-thái repo (probe S125)
- **auto-memory:** 50 file TRACKED + 0 porcelain ⇒ **R6 git-track ĐẠT** (carry usermem thu hẹp còn: runtime-WRITE-path verify sau restart).
- **Agent pin:** 15 file `.claude/agents/` = 14 role (`model: opus` 14/14 + `effort: max` 14/14) + README.md (không frontmatter — benign).
- **6 product carries owner-held:** uat-s117 · pe-phanquyen · bvaau · binh-le · tra-bui · account-trung — **6/6 CÒN trong HANDOFF** (0 rớt).
- **H24:** counter=4 (tick S125 content-addressed HEAD `3aacdf9`), last light+deep@3, cadence 6/15/3 ⇒ **chưa tới nhịp**, 0 class repeat ≥3.
- **all-inherit residue:** `fable-real.md:37` floor-sống STALE (file KHÔNG nằm trong sync-list S124 = gap thật) + `fable-clone.md:43` residual-asym trong-file (:57 đã update, :43 sót) → **CẢ 2 VÁ S125**. `session-start.md:52` + `hmw.js` comments = lineage/so-sánh hợp lệ (GIỮ). Sweep repo-rộng còn lại → giao Opus (spec B1).
- **Stop-hook wal-flush:** KHÔNG fire per-turn phiên này (HEAD đứng `3aacdf9` suốt phiên) — dirt 22 rows đợi commit chủ-động.
- **Dirt phân loại:** 5 pre-session (self-compact monitor S125-start: harvest-curator/tooling-auditor MEMORY+archive + counter tick) + 17 session-work (relabel/report/request/email/move/vá) — TẤT CẢ thuộc commit S125, 0 lạ.
## Verdict
**PASS-WITH-SELF-FIXES** — 2 near-miss tự bắt trong lượt (false-tamper→verifier-RCA · source-claim→mở-file-nguồn), cả 2 sửa TRƯỚC khi ra ngoài. 0 finding tồn chưa xử ở phần đã làm; phần còn lại = spec checklist (restart-dependent + owner-gated + fan-out) → `spec-adap-review-s125-16-07-2026.md`.

View File

@ -0,0 +1,40 @@
# spec — adap-review S125 → hmw @Opus 4.8 MAX (16-07-2026)
> H21 spec-file 3-mục. Engine `/fable-real` vai compound anh gõ (reviewer + investigator-codebase) propose → lead verify → lead ghi (phiên này lead=Fable=engine, single-context — honest-note run.md). **Worker phiên sau thực-thi THEO spec này — bơm QUA args/prompt, worker KHÔNG tự Read file** (H21 ④).
## ① Tính-năng / đề-bài
Xử lý phần còn lại của mạch adap-wave S125 (đã xong: adap `phuong-phap-dem-token` + relabel cận-trên + vá hash-verify byte-safe + email đính chính hub + STAGE-2 hygiene — evidence: `run.md` cùng folder). Phần còn lại chia 3 lớp: **(A) runtime-verify chỉ làm được SAU RESTART** (frontmatter/settings mới ăn), **(B) fan-out + closeout** phiên Opus 4.8 MAX làm, **(C/D) owner-gated + deferred** — surface, KHÔNG tự làm.
## ② Cách implement
Phiên kế: anh restart Claude Code → `/model` Opus 4.8 MAX (lead owner-choice, floor mtv3) → `/tiep` (đọc WAL → verify ground-truth → nối mạch — đây CHÍNH LÀ pilot H22 resume đổi-model, ghi kết quả D5). Chạy **NHÓM A trước** (A1 độc lập, quyết định /fable-real còn sống không), rồi **hmw fan-out NHÓM B** (scaffold `runs/<id>/` @P1 + `args.run` — ≥3 task ⇒ run-trace BẮT BUỘC sàn H22; spec này bơm qua args). C/D chỉ surface trong báo cáo cuối + closeout.
## ③ Checklist (vai · deliverable · acceptance ĐO ĐƯỢC)
### NHÓM A — restart-runtime verify (làm ĐẦU phiên, trước fan-out lớn)
- [ ] **A1 · H23-precedence test** `[carry:h23-fable-test-postrestart]` · vai: em-main + 1 spawn hmw `tier:'fable'` · deliverable: dòng model THỰC-TẾ resolve (`scripts/spawn-model-audit.ps1` per `session-start.md:52`) ghi vào run-folder · acceptance: **1 trong 2 chữ**: `fable` (spawn thắng ⇒ `/fable-real` SỐNG) hoặc `opus` (frontmatter thắng ⇒ `/fable-real` NO-OP → surface anh re-pin) + **báo hub** (đã hứa s124-report §3).
- [ ] **A2 · worker-tier-pin runtime** · vai: em-main · deliverable: spawn-model-audit ≥1 worker KHÔNG tier override · acceptance: resolve = `opus` (pin ăn thật, không còn inherit-lead).
- [ ] **A3 · autoMemoryDirectory WRITE-path** · vai: em-main · deliverable: 1 memory write mới sau restart · acceptance: file mới xuất hiện dưới `.claude/auto-memory/` (git-track ĐÃ ĐẠT S125: 50 tracked/0 dirty — chỉ còn WRITE-path).
### NHÓM B — hmw fan-out @Opus MAX + closeout
- [ ] **B1 · Sweep "all-inherit" floor-sống repo-rộng** · vai: investigator-codebase (quét) + em-main (vá) · deliverable: bảng hit → phân loại floor-sống/lineage (S125 đã vá `fable-real.md:37` + `fable-clone.md:43`; đã xác minh lineage-OK: `session-start.md:52`, `hmw.js` comments) · acceptance: grep `all-inherit` trên tracked .md (TRỪ frozen: `runs/` · `sessions/` · `outbox/` · `inbox/` · `archive/` · adap-reports lịch-sử) → **0 floor-sống**; lineage GIỮ nguyên.
- [ ] **B2 · Verify memory `project_harness4` body** · vai: em-main · deliverable: đọc body file memory · acceptance: body khớp worker-tier-pin S124 (index ĐÃ đúng; carry (c) HANDOFF đóng được nếu khớp).
- [ ] **B3 · Retier-megaline** `[carry:retier-megaline]` 🔒 OWNER · vai: em-main soạn · deliverable: 1 trang phương án tách/re-tier mega-line STATUS/HANDOFF dùng số DẢI mới ([1227]% CẬN-TRÊN — KHÔNG "27% đo được") + trade-off · acceptance: anh chọn 1 (giữ/tách/re-tier); **KHÔNG tự đổi**.
- [ ] **B4 · memory-budget.json:74 wording** 🔒 OWNER · vai: em-main · deliverable: diff 1-dòng `"real-token headroom"``"cận-trên (heuristic notice) headroom"` · acceptance: anh gật mới apply (config anh ký mark `…01-58-01`).
- [ ] **B5 · Closeout GỘP S125+S126** · vai: em-main + monitor H1/H2 · deliverable: STATUS Recently-Done + HANDOFF brief (tiering giữ 2-3 session) + session-log `2026-07-16-S125-S126-…` + memory-flush roster + harvest-gate 5-trục + re-stamp **đủ 8 carry anh** (6 product + 2 governance) · acceptance: session-end checklist PASS + porcelain 0 sau commit.
- [ ] **B6 · Hub follow-up** · vai: em-main · deliverable: `/check-email AI_INFRA` — xử reply đính-chính + kiểm 2 broadcast được re-stamp chưa (`stamp_verify.py` hết NO-DECLARED-SHA?) + README §32/fallback-snippet fix chưa · acceptance: adap-report/-request update theo thực-tế trả lời (KHÔNG stamp trước khi hub làm).
### NHÓM C — product carries (owner-held — CHỈ re-stamp visibility, anh quyết chạy cái nào)
- [ ] **C1C6:** `uat-s117` · `pe-phanquyen` · `bvaau` · `binh-le-decision` · `tra-bui-relogin` · `account-trung` — S125 verified **6/6 còn trong HANDOFF** · acceptance closeout: đủ 6 sau re-stamp, 0 rớt. (+ Export PDF pending — chờ anh xếp lịch.)
### NHÓM D — deferred / notes
- [ ] **D1** Monthly drift audit — hạn kế **2026-08-01** (chưa tới; S96 chạy 07-01).
- [ ] **D2** H24 cadence — light kế @counter 9 (hiện 4) · deep @18 · jump nếu 1 class repeat ≥3 (hiện max 1). Không nợ.
- [ ] **D3** (optional, đợi hub reply) port pattern `check_email_pull.py` s76 SE-side.
- [ ] **D4** (nice-to-have) probe VN-text 150K chars → datapoint #2 gửi hub (đóng caveat ASCII-only).
- [ ] **D5** Ghi kết quả **pilot H22 resume đổi-model** (/pause Fable → /tiep Opus) vào memory `project_h22` + adap H22 (pilot "kill/đổi-acc" pending từ S111).
- [ ] **D6** agent-memory L1 gần trần đọc 24,4KB — ứng viên hook-curate kế (moved-not-cut như S125 inv-cb 23,9→16,9KB): frontend-designer 21,5KB · cicd-monitor 20,9KB · reviewer 19,9KB · test-specialist 19,1KB.
### Điều-kiện dừng / an-toàn
- KHÔNG đổi budget-SỐ, KHÔNG store_memory từ sub, single-writer B3 giữ nguyên. Mọi item 🔒 OWNER = surface + chờ, không execute. Sau NHÓM B: `/pause` (đúng đề-bài anh S125).