[CLAUDE] Memory: sleep-compress L2 5-agent (cicd/tooling/inv-cb/harvest/reviewer) — 2026-07.gist.md additive ×5 (183KB→69KB gist, verbatim FROZEN nguyên vẹn) + last_sleep_at 2026-07-18; Fidelity-gate reviewer 4-PASS+1-FAIL→re-distill inv-cb (+CUM 11 :28/:31) + coverage-diff per-file dong-kin PASS + G-009 0-hit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-18 11:56:20 +07:00
parent 601edb53ad
commit aa88d01689
6 changed files with 234 additions and 1 deletions

View File

@ -0,0 +1,38 @@
---
distill-gen: 1
period: 2026-07 (run #484#508, S97→S133-era; 20 run-records)
source-verbatim: archive/2026-07.md (20 run-records #484#508)
pointer-style: substring (Ctrl-F) back-resolve vào archive/2026-07.md; mỗi cụm kết → substring:"<unique>"
fields-per-line: VIỆC · KẾT-LUẬN(+commit/Run#/sqlcmd) · BÀI-HỌC · BẤT-NGỜ · [confidence]
---
# Gist 2026-07 — cicd-monitor (distilled S140 sleep-compress)
## TỔNG-HỢP (5 ý — mọi số/mốc truy được về CỤM dưới)
1. **Ship-proof đã VƯỢT hash-delta.** #69 chứng 0-fe-src có thể rotate HOẶC frozen (cả 2 benign) ⟹ tín-hiệu ship THẬT = LM-in-window + real-size (1.64/1.55MB vs SPA-trap 919b) + byte-verify-marker-grep; hash-rotation chỉ là chỉ-báo-phụ (CỤM 1/3/5).
2. **Mỗi loại GO có checklist riêng, đều quy về "verify ở lớp source-of-truth".** whole-session-GO · full-stack-schema-add · data-fix-backfill · cardinality-change · authz-2-layer — verify col-DB qua sqlcmd KHÔNG tin DTO (`endedByLevelFinalize`=None nhưng đúng), AddColumn-count/sys.tables-invariant, invariant-violations=0, DB-policy-row Admin-only, marker=0-trong-OLD (CỤM 1/2/3/4).
3. **Gate-count là fingerprint kiểm-thử.** Domain frozen 45 xuyên kỳ; Infra tăng theo feature 413→432→441→450→456→464 (tổng 458→477→486→495→501→509); 0-src-diff ⟹ count-EXACT-frozen — lệch count = có src thật (CỤM 2/3/4/5).
4. **#41 trigger-filter là baseline DI-ĐỘNG.** non-.md trong `.claude` trigger CI; AS-6 baseline-shift từ #495 (paths-ignore 7-entry) giết trigger-pattern cũ ⟹ phân-loại trigger re-derive per-glob, không hardcode (CỤM 5).
5. **cicd-lane 2 tật kinh-niên cần backstop.** #53 garble-return + tự-dán "CLEAN-return" sai ⟹ verdict corroborate bằng disk/prod (curl+sqlcmd) + poll-til-success TRƯỚC re-snapshot; tin substance-đĩa, không tin lane-self-report (CỤM 4/6).
## CỤM 1 [cao] — Mig 61 data-fix backfill `EndedByLevelFinalize` + whole-session-GO S96/S97
**VIỆC:** #484 `fb2dfa9` DATA-FIX Mig 61 `20260701142752_BackfillEndedByLevelFinalizeFromChangelog` (fix Mig 60 soi NHẦM bảng Approvals→Changelogs) + whole-session review 11-commit-day #478#484. **KẾT-LUẬN:** GO CLEAN. Backfill VERIFIED-PROD sqlcmd: A/005=1 · A/008=1 (fix ăn) · A/010=0 (control no-over-reach); `endsBeforeCeo` FLIP LIVE A/005 `3da9b890`→True · A/010 `31faef0d`→False; Mig-history top; HEAD `5c914e4` docs-only. **BÀI-HỌC:** DATA-FIX verify ở LỚP col-DB qua sqlcmd, KHÔNG tin DTO (`endedByLevelFinalize` không expose nhưng derived phản-ánh đúng); control-row bắt-buộc. **BẤT-NGỜ:** unconditional FE-rebuild rotate hash KỂ CẢ data-fix (admin `CeTA7Z82``mEGqlNWc`, CSS frozen) — #69 CONFIRMED: rotation = deploy-artifact NOT ship-signal. [cao] → substring:"BackfillEndedByLevelFinalizeFromChangelog"
## CỤM 2 [cao] — Supplier full-stack expand + import saga (Mig 62/63/64)
**VIỆC:** #488 `778fc98` Mig 62 `ExpandSupplierFields` (9→27 field) · #496 `e100ef0` Mig 63 `AddSupplierImportSourceFields` · #383 `5fa11b5` Mig 64 `AddSupplierPublishState`. **KẾT-LUẬN:** 3/3 GO APPLIED-PROD. Mig 62 AddColumn×18 VERIFIED sys.columns (Suppliers 35 cols, sys.tables=89 UNCHANGED); GET /api/suppliers 200 = 22 items DTO 18 new keys. Mig 64 IsPublic backfill 37/37. Gate #496=458 (45D+413I) · #383=477 (45D+432I). FE REAL-SHIP byte-verify `officeAddress`/`legalRepresentative` (#488) · `Tải file mẫu`/`Đã công bố`/`Nháp (ẩn)` (#383); endpoint `/suppliers/import/template`+`?published=true` WIRED 401. **BÀI-HỌC:** FULL-STACK-SCHEMA-ADD checklist = CI-success + Mig-top==HEAD + AddColumn-count-EXACT + sys.tables-invariant + target-rows-outcome-EXACT + DTO-new-keys + bundle-marker-grep + dll/w3wp-in-window. **BẤT-NGỜ:** UN-CRAM DATA-OUTCOME EXACT — 4 NCC (TRUONGGIANG/TANPHU/TGN/DONGDUONG) Note=NULL sau guarded `Sql()`, LinkGuq populated đúng-chọn-lọc; guard chạy phải verify TỪNG hàng, không chỉ count. [cao] → substring:"UN-CRAM DATA-OUTCOME EXACT" (phụ: "AddSupplierImportSourceFields", "AddSupplierPublishState")
## CỤM 3 [cao] — PE feature migs: multi-NCC (Mig 65) + Min-Max range (Mig 66) + giá-ÂM guard
**VIỆC:** #384 `d436af2` Mig 65 multi-NCC per-hạng-mục (winner-truth `IsWinner``Quote.IsSelected`; endpoint select-winner body `{supplierIds}``{detailId,supplierIds}`) · #386 `88368fd` giá-ÂM + submit-guard (`PurchaseEvaluationWorkflowService.cs:206` `selectedThanhTien.Sum()<=0``.All(x==0)`) · #387 `316a82f` Mig 66 `20260714035636_AddPeApprovedPriceRange`. **KẾT-LUẬN:** 3/3 GO. Mig 65 `BackfillPeQuoteIsSelectedAndWinnerInvariant` invariant-violations=0 (33 sup/23 winners), data-only sys.tables=89 frozen. Mig 66 COL_LENGTH(ApprovedPriceMaxAmount)=9 + history-top. Gate #384=486 · #386=495 · #387=501 (Domain frozen 45). byte-verify #77: `Đã nhập giá chào thầu`/`hoàn tiền NCC`/`phát sinh giảm` (#386) · `cả Min và Max`/`duyệt theo khoảng`/`ProMinMax`/`MinMax` en-dash (#387) · `trúng thầu theo từng hạng mục` (#384); select-winner WIRED 401≠404. **BÀI-HỌC:** cardinality single→multi = grep MỌI consumer + invariant-check post-backfill; marker NEW-code phải =0 trong OLD-bundle → =1 post. **BẤT-NGỜ:** (1) FALSE-discriminator `PRO Min` =1 tồn OLD (label `ProMin` pre-existing) — chọn chuỗi vắng-hẳn-OLD; (2) pre-deploy frozen-bundle TRAP: grep-sớm khi CI running → false-FAIL, poll-til-success TRƯỚC re-snapshot; (3) js-rotate+css-frozen = fingerprint FE-logic-no-style. [cao] → substring:"BackfillPeQuoteIsSelectedAndWinnerInvariant" (phụ: "AddPeApprovedPriceRange", "selectedThanhTien.Sum")
## CỤM 4 [cao] — S118 SECURITY-AUTHZ Reports.Read gate + #53 garble recovery
**VIỆC:** #389 `c808b9a` gate ReportsController → `[Authorize(Policy="Reports.Read")]` trên dashboard+contracts/export (my-dashboard kept-open); +4 reflection `AuthorizePolicyRegressionTests.cs`. **KẾT-LUẬN:** GO 5m34s, gate log = 509 (45D+464I). DB Reports.Read→Admin-ONLY (sqlcmd: 1 role CanRead=1; Procurement CanRead=0 → non-admin 403 by-construction). dll restart-in-window; smoke no-token 401×3; NO-FE (bundle S117 frozen), NO-Mig. **BÀI-HỌC:** authz verify 2-layer = attr-test reflection + DB-policy-row → 403 by-construction, không cần curl-prove password. **BẤT-NGỜ:** cicd-lane return GARBLED #53 (trả memory-curation slice thay verdict) → em-main-solo curl+sqlcmd recover; nhãn "CLEAN-return" cũ SAI (harvest-curator S118 bắt) — không tin lane-self-assessment. [cao] → substring:"c808b9a" (phụ: "403 by-construction")
## CỤM 5 [vừa] — Governance-only PASS streak #486→#495 + #69 TWO-MODE + #41 filter + AS-6 shift
**VIỆC:** 10 run 0-src-change (#486 `5ee32c0` · #487 `f0874dd` · #489 `21387cd` +office-document · #490 `d74f67f` · #491 `69957fd` · #492 `f5a5c3e` · #493 `6ee60cd` · #494 `ac3f122` · #385 `81b59f0` · run508 `e9124fc`); inflection **#495 `8aa3869` H22-WAL-adopt 30-file** (deploy.yml TỰ-ĐỔI +2 paths-ignore trong chính commit). **KẾT-LUẬN:** tất cả GO, gate frozen theo kỳ, Mig frozen (61→62→65→66), smoke 200 ship-proof. #69 TWO-MODE CONFIRMED: 0-fe-src rotate (#489 `ChSNAJBK``BVyH-FY7`) HOẶC frozen (#490#494 streak ×6) — cả 2 benign; ship-proof = LM-in-window + real-size, hash chỉ-báo-phụ. #41 filter 2-chiều verified: non-.md trong `.claude` (hmw.js/.ps1/memory-budget.json) TRIGGER; .md-only = 0-run. AS-6 BASELINE SHIFT từ #495: paths-ignore 7-entry → agent-memory/**+runs/** hết trigger (pattern #490/#492 DEAD). deploy.yml workflow-self-change = run parse+chạy-trọn = PASS. **BÀI-HỌC:** governance-PASS checklist = CI-success + Mig-top-frozen + sys.tables-89 + smoke-200 + bundle-frozen-or-benign-rotate; #41 trigger là baseline DI-ĐỘNG — không hardcode. **BẤT-NGỜ:** spot-check missed-run detector = LM-prod-NEWER-than-last-verified-window (bắt #494); deploy.yml self-modifying vẫn hợp-lệ. [vừa] → substring:"#69 TWO-MODE CONFIRMED" (phụ: "AS-6 BASELINE SHIFT")
## CỤM 6 [vừa] — Tooling/poll/smoke methodology (cross-entry)
**VIỆC:** đúc lesson tool-level rải khắp run-record. **KẾT-LUẬN:** cách-đo, không phải run-verdict. **BÀI-HỌC:** (1) w3wp `$_.StartTime` mangled qua nested ssh→PS → base64-EncodedCommand; (2) busy-wait favicon-spin ~10s/iter QUÁ CHẬM → 250×/iter≈50s; python `time.sleep` foreground CHẠY được (chỉ bash sleep builtin bị block); (3) poll.py break-cond phải `status==success|completed`, KHÔNG chờ `conclusion` populated (`conclusion=None` = tasks-endpoint quirk, trust success — từng over-spin 6 iter); (4) smoke: bare `/health`=404 UNMAPPED (thật = `/health/live`+`/ready`); jq thiếu → python json; cp1252 capture → `curl -o` + open(utf-8); Windows-python không thấy `/tmp`; (5) sqlcmd integrated-auth `-E -h -1 -W`. **BẤT-NGỜ:** SPA-trap fake-hash 919b text/html = control chứng bundle thật; 411 IIS Length-Required pre-auth ≠ 404 = SignalR wired (#25). [vừa] → substring:"base64-EncodedCommand" (phụ: "favicon-spin")
## COVERAGE-TOKENS (per-file đóng-kín — nguồn: archive/2026-07.md của cicd-monitor)
**Gotchas:** #25 · #41 · #53 · #69 · #77. **Mig:** 60 (soi-nhầm) · 61 · 62 `ExpandSupplierFields` · 63 · 64 · 65 · 66. **SHA chính:** `5c914e4` `fb2dfa9` `f0874dd` `5ee32c0` `21387cd` `778fc98` `ac3f122` `6ee60cd` `f5a5c3e` `69957fd` `d74f67f` `d436af2` `5fa11b5` `e100ef0` `8aa3869` `88368fd` `81b59f0` `316a82f` `c808b9a` `e9124fc`; phụ: `162f0b9` `debe82f` `38262d8` `1eea51b` `f1af05c` `8304d08` `525a01a` `513aa09`. **file:line:** `PurchaseEvaluationWorkflowService.cs:206` · `ReportsController.cs` · `AuthorizePolicyRegressionTests.cs`. **Guards:** `Sum()<=0``All(x==0)` · `IsWinner⟺Any(IsSelected)`=0 · `Reports.Read` · body `{detailId,supplierIds}`. **Root-causes:** Mig 60 soi-nhầm-Approvals→Changelogs · unconditional-FE-rebuild #69. **Data-facts:** A/005=1 · A/008=1 · A/010=0 · `3da9b890` · `31faef0d` · gate-chain 440/458/477/486/495/501/505/509 (Domain 45) · sys.tables 88/89 · AddColumn×18/35 cols · 22 items 18 keys · IsPublic 37/37 · invariant=0 (33/23) · COL_LENGTH=9 · token-len 468. **Drop `thấp`:** 0 cụm (không có cụm thấp — bundle-hash-chain ephemeral giữ ở verbatim, không enumerate trong gist).

View File

@ -0,0 +1,51 @@
---
distill-gen: 1
period: 2026-07 (S98→S119, 26 entry / 7 logical self-compact block)
source-verbatim: archive/2026-07.md (26 entry, 42.875B, gen-0 — FROZEN additive; gist này = file MỚI, KHÔNG replace)
pointer-style: substring (Ctrl-F) back-resolve vào archive/2026-07.md; mỗi cụm kết → substring:"<unique>" (10/10 GATHER-verified + em-main spot-check 8/8)
fields-per-line: VIỆC · KẾT-LUẬN(+commit/md5) · BÀI-HỌC · BẤT-NGỜ · [confidence]
structural-note: 2 block-md5 (`640f80e452b42badb12bc2a3c57cf9f7` S110→S111 · `0c782c7cebc8f1d8b16f65b8e1474820` S113) header ABSENT trong verbatim — provenance sống ở MEMORY.md L1 (em-main verify chéo @S140: cả 2 present L1); giữ tại đây kẻo mất khi L1 curate.
---
# Gist 2026-07 — harvest-curator (distilled S140 sleep-compress)
## TỔNG-HỢP (5 ý — số/mốc truy về CỤM dưới)
1. **Kỳ = S98→S119, 26 entry, 7 self-compact block. Cadence GIỮ SẠCH xuyên suốt** — 13 @start ALL-CLEAN + 10 @end GATE PASS 5/5-trục, orphan 0 MỌI phiên. Mẫu-số orphan 14→26 do roster+run-folder MỌC, KHÔNG do miss. Giá trị nằm ở CATCH, không ở cadence. → CỤM 10.
2. **CATCH lớn nhất = S102 tự-bắt miss của chính gate S101:** `f229b07` cut-not-moved 5 verbatim reviewer + dead-satellite pointer → đẻ luật "L1 net-shrink + claim Detail→archive PHẢI grep moved-not-cut TRƯỚC PASS"; lan thành discipline byte/md5 (S105/S107/S108/S110/S119). → CỤM 1.
3. **3 lớp "record thiếu" phân biệt rõ:** (a) delta mồ-côi = sub chạy 0-ai-append (S98 db-agent ×2 · S99 cicd#485-by-construction) → CỤM 2; (b) self-record blind-spot = gate-agent quên ghi CHÍNH MÌNH (S104/S105) → CỤM 2; (c) coverage-gap = shipped-work thiếu spawn-record dù knowledge-NOT-lost (S113/S116) → MEDIUM propose-only KHÔNG escalate → CỤM 3.
4. **Governance-chốt AS-10 (S101):** N-lane sub tự-ghi agent-memory = LEGIT harvest ≠ residual-violation KHI content-verified khớp verdict (keep-if-correct, khác S95-default-revert); "return-only" = convention KHÔNG mechanism (fire-6/catch-6/0-escape). → CỤM 4.
5. **Method-catalog chống false-alarm dày** (#3/#4/#5/#6/#9/#10 + ref-table-frozen/`--stat`-truncate/maxdepth/roster-13v12): mọi tool-output sinh artifact GIẢ → cross-check nguồn-2 TRƯỚC phán; #5 filter-nuốt-bullet tái ≥4× dù đã biết. → CỤM 5.
## CỤM 1 [cao] — Cut-not-moved CATCH + moved-not-cut discipline (byte/md5)
**VIỆC:** verify L1→archive compaction integrity; đối tượng lớn = S102 audit lại gate S101 của chính mình. **KẾT-LUẬN:** S102 CATCH ×2 miss của S101: `f229b07` XÓA 5 verbatim reviewer (digest claim "Detail→archive" nhưng grep 0/0/0 + mtime 06-20 = cut-not-moved; verbatim chỉ còn `git show 5ee32c0:`) → recover `reviewer/archive/2026-07.md`; + dead-satellite `project_s100_h18_wf2_synthesis.md` (git log --all RỖNG). Discipline lan: S105 byte-level 19380→16305B (md5 MATCH · cmp IDENTICAL 1580B) · S107 md5 3/3 (`1760f27a`/`a6c8c75f`/`e12e5377`) · S108 md5 4/4 (`25633942`/`d8539bb2`) · S110 `git cat-file -s`==disk (6141/6544B) · S119 append-BEFORE-trim. **BÀI-HỌC:** L1 net-shrink + claim archive ⇒ grep moved-not-cut TRƯỚC PASS; anchor substring phải entry-unique (grep head-1 bắt sibling → false-DIFF); append-BEFORE-trim an toàn hơn cut-then-die. **BẤT-NGỜ:** gate-agent tự-miss CHÍNH MÌNH — next-session mới bắt; đối chứng cicd nén IN-PLACE = pattern sạch. [cao] → substring:"show 5ee32c0"
## CỤM 2 [cao] — Delta mồ-côi propose-APPEND + self-record blind-spot
**VIỆC:** quét spawn-record mồ-côi → propose em-main B3. **KẾT-LUẬN:** S98 3 delta (database-agent MISS ×2 — file đóng-băng-từ-S57bis, nặng nhất · reviewer addendum · impl-fe hook) → đóng `4263d63`/`8a249c5`/`c112be9`. S99 cicd #485 `8a249c5` orphan-by-construction (mtime SAU commit-cuối, precedent S58); fidelity ARITHMETIC push-range 23-file=22.md+1. S104/S105: verdict H2-S104 CHỈ ở session-log (`9f9a78e` thiếu harvest-curator) → retro-append. **BÀI-HỌC:** spawn-record CHÍNH MÌNH không ai append = self-record blind-spot → gate-agent tự đóng record mình; entry tag date+wf-id làm grep "S###" false-miss (method #4). **BẤT-NGỜ:** orphan-by-construction HỢP-LỆ (delta SAU commit) ⇒ KHÔNG revert, propose commit bundle sau. [cao] → substring:"database-agent MISS"
## CỤM 3 [cao] — Coverage-gap: shipped-but-no-spawn-record + idempotent-close
**VIỆC:** coverage-trục = mọi sub shipped-work phải có spawn-record 4-field. **KẾT-LUẬN:** S113 2 GAP (impl-be THIẾU Supplier-BE shipped Run #496 · test-spec 0 narrative ~950 LOC) · S116 Lane2 mirror-completeness không record riêng — knowledge NOT-lost (run.md+reviewer+cicd+SHA) → propose-only; CẢ 2 CLOSED idempotent @S113-end/S114. **BÀI-HỌC:** knowledge-NOT-lost ⇒ MEDIUM propose-only KHÔNG escalate; gap = spawn-record nhà-mình thiếu ≠ mất knowledge. **BẤT-NGỜ:** bất-đối-xứng harvest — inv-cb ĐƯỢC consolidate nhưng peer role không. [cao] → substring:"THIẾU Supplier-BE"
## CỤM 4 [cao] — AS-10 Fidelity keep-if-correct (governance call)
**VIỆC:** quyết N-lane sub tự-ghi agent-memory = LEGIT hay violation. **KẾT-LUẬN:** S101 AS-10 = LEGIT harvest — verify ĐỘC-LẬP content khớp lane-verdict (hunk `@@-48,5+48,5` landed-verbatim, 0-fabrication) + containment intact → KEEP per keep-if-correct (KHÁC S95-default-revert vì writes CLEAN). S102 KEPT entries VERIFIED intact. Cross-link H19 GAP-3: return-only = convention KHÔNG mechanism (fire 6/catch 6/0-escape). **BÀI-HỌC:** quyết bằng Fidelity-gate (content-khớp-verdict) KHÔNG tự phán "bịa". **BẤT-NGỜ:** CÙNG hành-vi có thể LEGIT hoặc VIOLATION tùy content-verified — KHÔNG phán từ hành-vi. [cao] → substring:"keep-if-correct"
## CỤM 5 [cao] — Self-trap method-catalog (chống false-alarm/false-miss)
**VIỆC:** đúc method audit corruption/count/compaction khỏi tin tool-output mù. **KẾT-LUẬN + BÀI-HỌC:** #3 porcelain-clean ⟹ 0-mồ-côi by-construction · #4 grep "S###" false-miss khi tag date/wf-id · #5 filter `grep -v "^[+-][+-]"` NUỐT dòng `+- **` → false-empty-diff (tái ≥4×, mỗi lần caught) · #6 tail-c cắt UTF-8 multibyte in FFFD GIẢ → corruption thật = grep literal U+FFFD · #9 self-quote FFFD baseline dao động 0→1→0 theo entry rời/vào L1 · #10 session-drift-tag mislabel (S116 DOUBLE → normalize). NEW: prompt-cấp reference-table = frozen budget-snapshot (`_note` DATE) → cross-check DATE trước phán size-drift · `--stat` truncate path-dài → `--name-only` · maxdepth-1 FALSE-flag → maxdepth-2 · roster `ls`=13 = 12-folder + budget-file. Mọi tool-output (grep-filter · tail-c · --stat · ls-count · prompt-table) sinh artifact GIẢ ⇒ cross-check nguồn-2 TRƯỚC phán. **BẤT-NGỜ:** #5 tái ≥4× DÙ đã biết; FFFD literal vào L1 tự-gây false-alarm phiên sau. [cao] → substring:"frozen budget-snapshot"
## CỤM 6 [vừa] — Fidelity STRONG commit-exact (0-fab → KHÔNG escalate)
**VIỆC:** fidelity-trục = spawn-record claim khớp commit file-list. **KẾT-LUẬN:** S113 `5fa11b5` MỌI claim khớp file-list → 0-fab. S116 `88368fd` 7-file EXACT (BE `Sum()<=0``.All(x==0)` verbatim in-diff, +9 [Fact]=gate 495). S117 `316a82f` EXACT. S119 `c808b9a` EXACT 3-file (+4 test đếm-TỪ-DIFF). S114 garble ×2 CẢ HAI captured đúng nhà. **BÀI-HỌC:** đếm-TỪ-DIFF KHÔNG file-total (`fd80e66→d713d80` 19=total≠4-delta); file-list match từng-claim ⇒ Fidelity STRONG KHÔNG escalate. **BẤT-NGỜ:** garble-lane vẫn 0-claim-bịa (cross-verify khớp) — garble ≠ mất-substance. [vừa] → substring:"file-list xác nhận MỌI claim"
## CỤM 7 [vừa] — cicd session-drift tag + garble-as-clean habitual
**VIỆC:** theo dõi cicd self-tag drift + garble-mislabel. **KẾT-LUẬN:** S98 cicd self-tag "S98"→S97 ×4 dòng (drift lần 4, patch replace_all TRƯỚC S98-thật ghi). S106 KHÔNG spawn S105 (grep=0 = ĐÚNG, resolved false-alarm). S118 2-garble: #389 tự-dán "CLEAN-return" SAI + #388 garble unrecorded → cicd = habitual mislabel-garble-as-clean (S117#387 cùng nhãn sai). **BÀI-HỌC:** cicd tự-dán "CLEAN" KHÔNG tin → cross-check session-log; grep=0 phân biệt not-spawned vs miss. **BẤT-NGỜ:** garble tự-nhận CLEAN = under-report chính garble mình — habitual dai. [vừa] → substring:"habitual mislabel-garble-as-clean"
## CỤM 8 [vừa] — Sleep-resume + transcript-lost re-run DEDUP
**VIỆC:** recover khi return transcript-lost + sleep-premise re-verify từ đĩa. **KẾT-LUẬN:** S109 sleep disk==resume-point (16/16 scope-file + gist-scan 11-hit toàn tiền-PAUSED = 0-gist-MỚI); lượt-A cicd transcript-lost 0-dấu-disk → HANDOFF encode re-run 0-mất-data. S110 entry gốc return không tới em-main → re-spawn re-verify KHỚP 100% + gist byte-exact cat-file==disk → RE-RUN amend DEDUP KHÔNG double-append. **BÀI-HỌC:** transcript-lost → re-verify từ ĐĨA rồi amend DEDUP; sleep-premise verify NỘI-DUNG từ đĩa KHÔNG tên-file 1:1. **BẤT-NGỜ:** return MẤT mà việc KHÔNG mất — disk-truth đủ. [vừa] → substring:"luot-a-transcript-lost"
## CỤM 9 [vừa] — Run-trace pattern evolution (embedded-synth + mode-A ephemeral)
**VIỆC:** orphan-run scan theo pattern tiến hóa. **KẾT-LUẬN:** S113 pattern synthesis EMBEDDED-in-run.md (`## synthesis` populated ≠ separate file); maxdepth-1 FALSE-flag 5 → maxdepth-2 dual-accept. S118 embedded NON-heading `✅ PIPELINE COMPLETE` (regex `^## synthesis` MISS → verify body). mode-A ephemeral: HMW default 0-run-folder by-design (0-folder-July, `wf_2f85b3f6`); orphan-count 0/14→0/26; 2×S117 fable-real spec-only no-run.md = by-design ≠ orphan. **BÀI-HỌC:** orphan-scan maxdepth-2 + verify body; VẮNG folder ≠ orphan. **BẤT-NGỜ:** synthesis 3 dạng (subfolder/embed-heading/embed-non-heading) → detector nhận CẢ 3. [vừa] → substring:"EMBEDDED-in-run.md"
## CỤM 10 [thấp — GIỮ: nền cadence + chore-watch] — Routine cadence + self-compact housekeeping
**VIỆC:** @start ALL-CLEAN + @end GATE 5/5 + self-compact S98→S119. **KẾT-LUẬN:** 13 @start ALL-CLEAN; 10 @end GATE PASS 5/5 + orphan (15/15 · 0/16 · 0/21 · 0/24 · 0 July-run-folder). Self-compact EXECUTED hook-directed: S99 (S50-S66→2026-06.md 17072B/14-entry) · S109 (S98→S101→2026-07.md MỚI) · S111 (S102→S106) · S114 (S107→S109) · S117 (impl-fe 2026-H1.md). Chore dai: impl-be 23955B 93.6%-cap đứng-im từ 06-25 · fe-designer 21.5K idle · SELF quanh 17.1K-target. **BÀI-HỌC:** cadence-clean là NỀN, giá trị ở CATCH; impl-be near-cap idle = WATCH không action. **BẤT-NGỜ:** mẫu-số orphan tăng 14→26 KHÔNG do miss (mẫu-số có ngày-đo). [thấp] → substring:"0 July-run-folder"
## COVERAGE-TOKENS (per-file đóng-kín — nguồn: archive/2026-07.md của harvest-curator; +2 md5 L1-provenance)
**SHA:** `4263d63` `8a249c5`(#485) `c112be9` `310b9fc..8a249c5`(23f) `525a01a` `f229b07` `e350660` `@@-48,5+48,5` `3e2c18b` `git show 5ee32c0:` `project_s100_h18_wf2_synthesis.md` `778fc98` `9f9a78e` `95f5555` `54a2c72` `wf_5ac2cdb0` `41f8061` `1760f27a`/`a6c8c75f`/`e12e5377` `86a34d5`(od 3323B) `21387cd` `1eea51b` `ChSNAJBK`/`Bn2w1znH` `69957fd` `5d13b48` `25633942`/`d8539bb2` `c7a9e745` `wf_2f85b3f6` `557642f` `a9c3f1d` `72a85bf` `f5a5c3e` `debe82f` `38262d8` `6ee60cd` `191532e` `wf_0c3b307f` `318a271` `8aa3869` `12071c5`/`67be443` `wf_5ba3daf6` `0d912ad` `8fa2fcc` `58f1c5f→8304d08` `ccdcbe7` `5fa11b5` `a3e9e14` `88368fd` `0edbc58` `3e16dba5` `e5f655f` `316a82f` `011ee8cf`/`617b0aa0` `fc1b8d9` `ab2657ee`/`abbbb86d` `1b8b065` `5c7569e` `6de7db6` `3fde8af` `c808b9a` `c2135ba` `fd80e66→d713d80`. **BLOCK-MD5:** `e2b906336b4cdad3034329cffc09525a`(S98→S101) · `3163566688e277f628daf349c1230142`(S102→S106) · `75b69b41534cb67cdf349b6e1164d47f`(S107→S109) · `3d7033e0253c3dfaeba7aad1a1067efe`(S114/S116/S117) · `9f7a11dcd057a27d03b06843bbdf2274`(S118/S119) · ⚠L1-only: `640f80e452b42badb12bc2a3c57cf9f7`(S110→S111) + `0c782c7cebc8f1d8b16f65b8e1474820`(S113). **Gotcha:** #53 (garble ×N; structural garble-pressure>17.1K) · #80 · #82 · #377(cicd archive quoted) · #385/#386(S58 precedent). **CI-Run:** #485 #486 #488 #489 #491 #492 #493 #496 #383/id497 #386 #387 #388(PARTIAL carry-fwd) #389. **Method:** #3 #4 #5(tái≥4×) #6 #9 #10 + ref-table-frozen · `--stat``--name-only` · maxdepth-1→2 · roster-ls-13=12+file. **Guard/root-cause:** Mig60-wrong-table→61 · `Sum()<=0``All(x==0)` · Reports.Read · dedup-MST · `details[].quotes``suppliers[]` · math.abs-no-global-mod. **Mig:** 62 63 64 66. **Surprise:** gate-tự-miss(S101→S102) · orphan-by-construction-hợp-lệ · LEGIT-or-VIOLATION-tùy-content · garble-0-claim-bịa · mẫu-số-14→26 · FFFD-tự-false-alarm · cicd-CLEAN=under-report · synthesis-3-dạng · 2-md5-header-absent · engine-label-first · od-12th-seed · #53×2/phiên-watch. **Entry-coverage 26/26:** S98·S99·S100·S101(×2) | S102·S104·S105(×2)·S106 | S107(×2)·S108·S109(×2) | S110(×2)·S111(×2)·S113(×2) | S114·S116·S117 | S118(×2)·S119. **Drop `thấp`:** 0 (CỤM 10 giữ — mang chuỗi orphan-count + self-compact provenance).

View File

@ -0,0 +1,53 @@
---
distill-gen: 1
period: 2026-07 (S93→S129-era, 10 nhóm entry)
source-verbatim: archive/2026-07.md (10 nhóm entry, 30.966B, gen-0)
pointer-style: substring (Ctrl-F) back-resolve vào archive/2026-07.md; mỗi cụm kết → substring:"<unique>" (12 anchor chính máy-verify =1 @S140)
fields-per-line: VIỆC · KẾT-LUẬN(+file:line/commit) · BÀI-HỌC · BẤT-NGỜ · [confidence]
---
# Gist 2026-07 — investigator-codebase (distilled S140 sleep-compress)
## TỔNG-HỢP (5 ý — mọi số/mốc truy được về CỤM dưới)
1. **Kỳ 07 = PE-feature-heavy (5/10 CỤM).** Invariant kiến-trúc xuyên mọi feature PE mới (âm/multi-winner/range): `winnerQuoteTotal = SUM(Quote.ThanhTien WHERE IsSelected)` DERIVED, KHÔNG mutate `PeWorkItemBudgets` (budget chỉ role-gated PRO/CCM ghi). → CỤM 3/4/5.
2. **Supplier Excel-import 30-field land TRỌN** qua Mig62→64→65 (S104→S114): entity-lean-9-prop → +18-nullable → IsPublic-fail-closed → multi-NCC; prod NCC 20→37; enum thiếu "Cả hai" genuinely-needed. → CỤM 6.
3. **Bài học meta cho harvest (S122):** orphan-authority đo TÊN-FILE ⇒ 8 dương-giả/25 run = 32% (thật mất 0/7) ⇒ nền chuyển folder-scan-by-content. → CỤM 7.
4. **Harness invests (H16→H22) hầu hết PASS/SOUND** nhưng runtime-value thấp dưới all-inherit+Fable (VACUOUS-MET); catch đáng giữ = ghost-wire config-key-defined-but-unread + ledger true-orphan 0/15 lifetime + regex-heuristic-miss. → CỤM 1.
5. **#53 return-garble dai dẳng** (cicd 5/6; structural root = MEMORY LIVE 17.5KB vượt self-target ~17.1K → curate-at-return); recover = diary-trước + SendMessage-resume + em-main-scribe. → CỤM 2.
## CỤM 1 [vừa] — Harness governance adoption invests (H16/H18/H19/H21/H22 + model-tier)
**VIỆC:** ground-truth 5 broadcast harness-adopt + landing-map recon. **KẾT-LUẬN:** đa số PASS/SOUND. H19 mapping: reviewer=final-gate `reviewer.md:268-276`, inv-cb=ground-truth-lane `investigator-codebase.md:23-26`; model-tier 12-pt SE-meets-all (11/11 inherit, 0 `[1m]`). H18 measurer 3/3 GLOB-LIVE 0-hardcode; ledger true-orphan-catch 0/15 lifetime. H22 WAL READY_WITH_NUANCES — settings chưa tồn tại → hook CREATE-mới STAGED; engine:402 no-OS-hook = MÔ-TẢ không phải LUẬT. H16 MFE denom dedup-AS-xref=29, codified `mfe-eval.ps1`. **BÀI-HỌC:** (1) phân MÔ-TẢ vs LUẬT trước khi đòi carve-out; (2) ghost-wire 2 class: cron-monthly CronList=0 + config-key defined-but-unread (`memory-budget.json:54-55` script re-hardcode TRÙNG → 0 flag; catch = grep key-name); (3) regex-self-check 0-hit nhưng "lead LUÔN top-model" bắt 5 ACTIVE = regex-heuristic-miss. **BẤT-NGỜ:** VACUOUS-MET — dưới all-inherit+Fable, H19 §4 thêm 0 runtime-delta; value = toggle depth + Fable-outage multi-Opus>single-Opus. [vừa] → substring:"VACUOUS-MET nuance TRUE" · "config-key defined-but-unread" · "READY_WITH_NUANCES" · "regex-heuristic-miss class" · "dedup-by-AS-cross-reference"
## CỤM 2 [vừa] — Session-end verify-lane + feedback-audit
**VIỆC:** verify-lane V2 post-flush detector-count (S98) + capture-readiness pre-close (S97). **KẾT-LUẬN:** detector 28→25 (derived-stale 11→8); 8 còn = 100% FP-class count-token soft-net, 0 genuine drift vs canonical 61/89/440/79. Capture CLEAN: #77/#78/#79 present `gotchas.md:1301/1317/1325`; #53-garble ×6 (cicd 5/6); Mig60 wrong-table (query Approvals `:29-31` LIKE) → Mig61 fix Changelogs, đủ 3-file-rule. **BÀI-HỌC:** grep exact-phrase MISS biến-thể ("Fable RESTORED" vs "Fable-restore"); count-token FP nhận diện = so canonical-anchor. **BẤT-NGỜ:** #53 cicd = STRUCTURAL root — MEMORY self-target ~17.5KB → curate-at-return → thinking-step=message-cuối=return-value; fix = archive-cicd-sớm KHÔNG phải instruction. [vừa] → substring:"count-token soft-net" · "cicd MEMORY LIVE=17.5KB"
## CỤM 3 [cao] — PE negative-quote (âm=khoản-trừ, FE-only blocker)
**VIỆC:** lens Budget-consumers + edge/precedent/test cho nhập báo-giá ÂM (hội tụ S116). **KẾT-LUẬN:** FE-ONLY blocker — BE/DB nhận âm sẵn. Quote KHÔNG mutate `PeWorkItemBudgets` (chỉ UpdatePeBudgetPro/Ccm role-gated `PeWorkItemBudgetFeatures.cs:105-107/175-177`). 5 consumer đọc SUM(WHERE IsSelected): winnerQuoteTotal `PeFeatures.cs:1188-1191` no-clamp · CCM-threshold `PeWorkflowService.cs:884-893` · giaTri CreateContract per-winner (CÓ THỂ ÂM, BYPASS `GiaTri>=0` `ContractFeatures.cs:46` manual-path-only) · block-B `:904-947` · submit-guard `:196-209` `Sum()<=0` = GUARD DUY NHẤT REJECT (net>0 OK). NO quote-validator (grep⌀) · NO DB CHECK (grep⌀; decimal(18,2) config:131). FE chặn: `parseVnd PeDetailTabs.tsx:51` strip minus · `formatVndInput:52` n>0 · gate `:2226`. **BÀI-HỌC:** quote sống `details[].quotes` KHÔNG `suppliers[].quotes`; precedent OMIT-validator = ExpectedRemainingAmount `PeFeatures.cs:348` + LeaveBalance; sign-aware `VndInlineEdit:1003` tái dùng. **BẤT-NGỜ:** giaTri-âm BYPASS validator (manual-path-only); #81 orthogonal (bool≠sign → no phantom). [cao] → substring:"GUARD DUY NHẤT REJECT" · "details[].quotes" · "NO DB CHECK" · "budget-not-mutated-by-quote"
## CỤM 4 [cao] — PE winner/quote cardinality (multi-winner per-hạng-mục)
**VIỆC:** truy 3 trục cardinality winner + multi-winner per-hạng-mục (S114) + BE-consumer-audit + PE-recon (S69→S76). **KẾT-LUẬN:** 3 trục — `SelectedSupplierId` single legacy · Mig58 `IsWinner` WHOLE-SUPPLIER liên-danh · `Quote.IsSelected` per hạng-mục×NCC (S114 LIVE qua Mig65 re-key = CARDINALITY-CHANGE #2, latent-hook Mig12 nay bật). 5 money-consumers keyed off IsSelected (winnerQuoteTotal/submit-guard/ccm-threshold/giaTri/block-B), ~6 test-file. Budget-gate = PURE ROLE no-phase (`canEditPro/Ccm :800-801`); V2-routing IGNORES roles (=ApproverUserId) 100% LINEAR; submission-count-lock NEXISTS. **BÀI-HỌC:** đổi cardinality = grep MỌI money-consumer (sửa write-site sót read-site → vỡ feature). Open: N-win 1 hạng-mục split khối-lượng hay full-price (schema thiếu per-winner volume). **BẤT-NGỜ:** re-key = cardinality-change thứ-2 (Mig12 latent 12-Mig cũ nay bật). [cao] → substring:"CARDINALITY-CHANGE #2" · "5 money consumers keyed off IsSelected" · "100% LINEAR"
## CỤM 5 [cao] — PE finalize mechanism + lũy-kế RCA + approved-price-range
**VIỆC:** 3 cơ chế finalize + display-lie #78 + ApprovedPrice-range (S117) + lũy-kế RCA + FROZEN-Mig59 patchwork (S87→S89). **KẾT-LUẬN:** ApprovedPrice WRITE = 1-site `ApplyApprovedPriceOnFinalize` (`PurchaseEvaluationWorkflowService.cs:951-966`, allow-list `:950`) gọi 3 nhánh DaDuyet (:858/:896/:928); skipToFinal `:820` chỉ dời pointer. HĐ-gen KHÔNG đọc ApprovedPrice (GiaTri=SUM IsSelected `CreateContractFromEvaluationFeatures.cs:88-100`) → range 0-impact. Lũy-kế RCA: A/018 KHÔNG DaDuyet (không tick opt-in, default UNCHECKED `PeWorkflowPanel.tsx:57`) → advance CEO; filter `Phase==DaDuyet` `PeFeatures.cs:906` ĐÚNG. 3 cơ chế chồng: AllowApproverFinalize (Mig58) ≠ finalizeByCcmDelegation (Mig53/54) ≠ skipToFinal (Mig31). **BÀI-HỌC:** KHÔNG nới filter lũy-kế; fix = pointer-aware endsBeforeCeo. FROZEN AREA-4: LATENT #73-class HoSoLink absolute-set `PurchaseEvaluationFeatures.cs:280` + PeHeaderForm PUT OMITS → 2-PUT mutually-destructive, no preserve-test. **BẤT-NGỜ:** DISPLAY-LIE nửa-còn-lại #78 — non-DaDuyet endsBeforeCeo=config TRUE bất chấp pointer (detail `:1152-1154` · list `:647-651`) → chip "Kết thúc·CCM" khi phiếu ở inbox CEO. [cao] → substring:"ApplyApprovedPriceOnFinalize" · "DISPLAY-LIE nửa-còn-lại" · "coexist AUTO-first"
## CỤM 6 [cao] — Supplier Excel-import 30-field (Mig62→65)
**VIỆC:** audit GAP Excel-30-col → schema-invest → import v1/v2 → multi-NCC (S104→S114, WF `wf_5ac2cdb0`). **KẾT-LUẬN:** entity CỰC LEAN 9 domain-prop (`Supplier.cs:5-16`); GAP 30 = 6✅/7⚠/17❌; seed crams NĐD/bank vào Note (proof thiếu home; UNGATED :128 vs demo GATED :117 #75). Land: Mig62 +18 nullable (27/27 bijective SHIPPED S112) → Mig64 IsPublic fail-closed → Mig65 multi-NCC; ClosedXML 0.105.0; dedup Code CI-collation normalize-TRƯỚC-store; 3 SELECTION-consumers ALL hit `GET /suppliers` (SuppliersPage:83/PeDetailTabs:2222/ContractCreatePage:321); write-guard backstop `ContractFeatures.cs:64`+`PurchaseEvaluationSupplierFeatures.cs:49`; ExpectedHeaderTokens 30-token baked `SupplierExcelImportService.cs:35-68`. Prod 20→37 NCC. **BÀI-HỌC:** reuse-existing-cols > parallel-table; blind-set `UpdateSupplierCommand.cs:49-57` = latent#73; DISPLAY-joins by SupplierId MUST NOT filter (chỉ SELECTION filter IsPublic); NAS-precedent = HoSoLink Mig52. **BẤT-NGỜ:** enum `SupplierType.cs:3-10` thiếu "Cả hai" genuinely-needed; import authz-mismatch BE Roles vs FE open. [cao] → substring:"Entity CỰC LEAN 9 domain-prop" · "ClosedXML 0.105.0" · "27/27 bijective" · "Prod 37 NCC" · "30-token baked" · "3 SELECTION consumers ALL hit"
## CỤM 7 [cao] — S122 retro-harvest: false-orphan-by-naming (meta)
**VIỆC:** đọc 7 run-folder "orphan" + đối chiếu git run ĐỊNH-làm vs THẬT-land (`wf_5ce007c4-980`, 7/7 done, 1 RỖNG schema-fail). **KẾT-LUẬN:** 0/7 việc mất — 7/7 ĐÃ XONG, chỉ ghi synthesis SAI CHỖ. 6/6 lane neo SHA thật 0-garble: `a829d0d` · `e100ef0`+Mig63 · `5fa11b5`+Mig64 · `d436af2`+Mig65 · `88368fd` (S116 KHÔNG phải S113). Orphan-authority đo TÊN FILE ⇒ 8 dương-giả/25 = 32%. `8fa2fcc` khoe "[H2 gate]" mà `--stat` KHÔNG chạm folder. **BÀI-HỌC:** (a) đo ordinal migration bằng sorted-listing KHÔNG tin nhãn doc; (b) phân hash-lệch vs invariant-vỡ (`git diff --no-index` exit=0 = 2 app identical dù SHA evolve `3e16dba5``617b0aa0`); (c) truy owner-decision VÀO CODE. **BẤT-NGỜ:** tiền-đề trong memoryPack CÓ THỂ SAI (lead bơm "S113" sai, thật S116) — lane tự truy git không bị dắt; lane RỖNG ≠ mất (per-turn≠per-task). [cao] → substring:"orphan-authority đo TÊN FILE" · "1 RỖNG schema-fail" · "đo ordinal migration bằng sorted-listing" · "tiền-đề trong memoryPack CÓ THỂ SAI"
## CỤM 8 [thấp — GIỮ vì mang #66] — Office/HRM recon (S65→S69)
**VIỆC:** recon Office/HRM. **KẾT-LUẬN:** 21 `Off_*` keys; 10 office pages SHA-mirror (exc 2 admin-only); golive-flip = remove `RevokeTemporarilyHiddenModulesAsync` `DbInitializer.cs:2040`; Dept FLAT pre-Mig51; NamGroup PURO = UI-skin. **BÀI-HỌC:** golive-flip là 1-điểm. **BẤT-NGỜ:** gotcha #66`index.css h1-4{color}` OUTSIDE @layer → TW-v4 unlayered wins → heading MUST `text-white!`. [thấp] → substring:"RevokeTemporarilyHiddenModulesAsync"
## CỤM 9 [vừa] — S105 BVAAU cross-repo auth RCA
**VIỆC:** RCA auth BVAAU. **KẾT-LUẬN:** Q1 root = FE Home MÙ session (bundle relative `/api` trên site TĨNH `web.config` loại `^/api/` → 404 → anonymous); fix API_BASE-absolute `51c69fb` LIVE. Q2 CRM-gate hở 2 tầng (FE soft + API `enforceCrmGate:false`) → flip `AUTH_ENFORCE_CRM_GATE=true`. Q3 Zalo "User_ID" KHÔNG UI. **BÀI-HỌC:** class "hub+site-tĩnh relative-/api chết im prod"; #53-garble-7 → SendMessage-resume recover. **BẤT-NGỜ:** gate hở 2 tầng ĐỘC-LẬP — vá 1 tầng không đủ. [vừa] → substring:"chết im prod"
## CỤM 11 [vừa — BỔ SUNG theo Fidelity-gate S140] — Governance recon 06-20 + S71 run-trace recon
**VIỆC:** 2 recon-cluster nền governance (verbatim :28 + :31 — gate bắt sót ở draft đầu). **KẾT-LUẬN:** (a) landing-map 06-20: `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 §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; EVAL `golden-set-solution_erp.jsonl` 14q recall@5≥0.7 weekly-manual. (c) S71: H8 all-inherit FULLY adopted 2 layer (12/12 frontmatter + hmw.js resolveModel); **run-trace "TRACKED" = 2-level** (`git check-ignore` eligible vs `git ls-files` committed — model chỉ hoạt động post `git add`); G-015 containment shift (H2 "mọi tracked=vi-phạm" → H10 "tracked NGOÀI run-folder+code-disjoint=vi-phạm"); path-trap: bare `runs/` từ repo-root = 0 → thật `.claude/workflows/runs/` (22 tracked). **BÀI-HỌC:** engine canonical + ledger AS-class + age≠proxy là NỀN đọc trước mọi adopt; TRACKED phải hỏi "level nào". **BẤT-NGỜ:** anti-downgrade generic rule grep 0 (H8 PARTIAL ở tầng luật). [vừa] → substring:"run-trace \"TRACKED\" = 2-level" · "G-015 containment shift" · "keep_floor=5" · "golden-set-solution_erp.jsonl"
## CỤM 10 [vừa] — S129 adap errata EOL 3-lane
**VIỆC:** adap 2 errata EOL sweep 3-lane (`wf_3fccd7d1`). **KẾT-LUẬN:** SE 0 defect-site (counter `agent-frontmatter-eol-check.ps1` byte-level pre-satisfy); filter erratum thiếu docx/xlsx = 13 dương-giả trên SE (tailor-per-class); drift thật duy nhất `mfe-eval.ps1:204` Set-Content UTF8 = BOM+CRLF; nấc thật = 4 gated + 3 discipline (đừng kê "7/7" phẳng). **BÀI-HỌC:** `git log -- <file>|tail -1` = FIRST-touch KHÔNG phải policy-landing (`08c7036` vs `92de58f`); #53 WRITE-lane 2/3 → journal cứu trọn. **BẤT-NGỜ:** story "40 = +1 agent mới" BỊA — số scoped=39, delta = skills/README ngoài glob (meta-count class). [vừa] → substring:"byte-level pre-satisfy"
## COVERAGE-TOKENS (per-file đóng-kín — nguồn: archive/2026-07.md của investigator-codebase)
**Gotcha:** #53(×6, cicd 5/6 + S105-7 + S110 + S129 2/3) · #57 · #66 · #70 · #73-class (HoSoLink 2-PUT · blind-set UpdateSupplierCommand) · #75 · #77/#78/#79 (`gotchas.md:1301/1317/1325`) · #78 DISPLAY-LIE · #81 orthogonal. **SHA:** `a829d0d` `e100ef0` `5fa11b5` `d436af2` `88368fd` `8fa2fcc` `3e16dba5``617b0aa0` `51c69fb` `08c7036` `92de58f` · bundle `mEGqlNWc`/`Dnrp4PU1`(#484) `CeTA7Z82`(#483). **Mig:** 12(latent→LIVE) 15 31 47 52 53/54 58/59 60→61(wrong-table) 62(+18) 63 64 65(re-key) 66(ordinal 65/66). **Guard:** submit-guard `Sum()<=0` `:196-209/:206` · CCM-threshold `:884-893` · GiaTri>=0 manual-only `ContractFeatures.cs:46` · ApprovedPrice allow-list `:950` · NO-quote-validator⌀ · NO-DB-CHECK⌀ · write-guard `ContractFeatures.cs:64`+`PurchaseEvaluationSupplierFeatures.cs:49` · Code UNIQUE-filtered `SupplierConfiguration.cs:24` · 30-token baked `:35-68` · Smart-Friend `reviewer.md:268-276` · byte-counter eol-check. **Root-cause:** Mig60-wrong-table · lũy-kế-A/018-non-DaDuyet-default-UNCHECKED `PeWorkflowPanel.tsx:57` · BVAAU-relative-api-static-site · cicd-#53-structural-17.5KB · ghost-wire-config-key `memory-budget.json:54-55` · cron-CronList=0. **Key anchors:** `PeFeatures.cs:1188-1191/:904-947/:906/:800-801/:348` · `PeWorkflowService.cs:196-209/:884-893` · `PurchaseEvaluationWorkflowService.cs:951-966/:950/:858/:896/:928/:820` · `PurchaseEvaluationFeatures.cs:280/:1152-1154/:647-651` · `PeWorkflowPanel.tsx:57` · `PeDetailTabs.tsx:51/:52/:2226/:2222` · `CreateContractFromEvaluationFeatures.cs:88-100` · `Supplier.cs:5-16` · `SupplierType.cs:3-10` · `SupplierExcelImportService.cs:35-68` · `UpdateSupplierCommand.cs:49-57` · `DbInitializer.cs:2768-2787/:128/:117/:2040` · `investigator-codebase.md:23-26` · `hmw.js:38/:97` · `mfe-eval.ps1:204` · `engine:402`. **WF-ID:** wf_50a817ce-a69 · wf_4c63e1bd · wf_5ce007c4-980 · wf_3fccd7d1 · wf_5ac2cdb0. **Facts:** prod 20→37 NCC · canonical 61/89/440/79 (S98-era) · MFE denom=29 · ledger 0/15 lifetime · 8 dương-giả/25=32% · 13 dương-giả EOL · scoped=39. **+CỤM 11 tokens:** `harness-11-engine.md` D5-D10 · `error-ledger` AS-1..13 · `keep_floor=5` · `golden-set-solution_erp.jsonl` 14q · G-015 · TRACKED-2-level · path-trap 22-tracked · `PeSuggestedPriceFeatures.cs:153-199` (AREA-2 anchor — gate bổ). **Drop `thấp`:** 0 cụm — nhưng khai lịch-sử trung thực: draft đầu SÓT 2 recon-cluster (:28/:31), Fidelity-gate S140 bắt (FAIL) → CỤM 11 bổ đủ; "0 drop" chỉ đúng từ bản này.

View File

@ -1,7 +1,7 @@
{ {
"_note": "Harness-9 (S70, 2026-06-17) memory budget. Caps SEEDED BY MEASUREMENT (scripts/measure-agent-memory.ps1), NOT imagined headroom. Budget-audit @session-start (session-start.md §2.1.2): if curate-to-fit is dropping important markers, BUMP the relevant cap rather than cut markers. Re-measure with the script; never hand-edit measured_bytes.", "_note": "Harness-9 (S70, 2026-06-17) memory budget. Caps SEEDED BY MEASUREMENT (scripts/measure-agent-memory.ps1), NOT imagined headroom. Budget-audit @session-start (session-start.md §2.1.2): if curate-to-fit is dropping important markers, BUMP the relevant cap rather than cut markers. Re-measure with the script; never hand-edit measured_bytes.",
"seeded_date": "2026-06-18 (S71 re-measure after G1 curate — reviewer 36.7KB + investigator 29.8KB over-cap from S71 same-role race, curated L1->L2 back under auto-inject cap)", "seeded_date": "2026-06-18 (S71 re-measure after G1 curate — reviewer 36.7KB + investigator 29.8KB over-cap from S71 same-role race, curated L1->L2 back under auto-inject cap)",
"last_sleep_at": "2026-07-10", "last_sleep_at": "2026-07-18",
"_last_sleep_at_note": "Harness-10b sleep-recovery (S72): timestamp lan cuoi chay /sleep-recovery-memory-l2. null = chua tung. session-start §2.1.2 + session-end §L.b(c) doc field nay -> INFORM goi-y nen L2 neu null hoac today-last_sleep_at>=7 ngay. Lead=single-writer (chi command sleep set field nay).", "_last_sleep_at_note": "Harness-10b sleep-recovery (S72): timestamp lan cuoi chay /sleep-recovery-memory-l2. null = chua tung. session-start §2.1.2 + session-end §L.b(c) doc field nay -> INFORM goi-y nen L2 neu null hoac today-last_sleep_at>=7 ngay. Lead=single-writer (chi command sleep set field nay).",
"tiers": { "tiers": {
"l1_hot": { "l1_hot": {

View File

@ -0,0 +1,50 @@
---
distill-gen: 1
period: 2026-07 (45 review-record, S65→S133-era)
source-verbatim: archive/2026-07.md (45 record, 39.791B, gen-0 — snapshot tại GATHER S140; 2 entry S139/S134b được reviewer tự-curate moved-not-cut từ L1 vào verbatim NGAY SAU đó [batch S140-curate, +7 dòng] = NGOÀI scope gist này, sống ở verbatim)
pointer-style: substring (Ctrl-F) back-resolve vào archive/2026-07.md; mỗi cụm kết → substring:"<unique>" (40 anchor GATHER-verified count==1-line [mega-line: 1-line⇔1-entry] + em-main spot-check 8/8)
fields-per-line: VIỆC · KẾT-LUẬN(+file:line/commit) · BÀI-HỌC · BẤT-NGỜ · [confidence]
---
# Gist 2026-07 — reviewer (distilled S140 sleep-compress)
## TỔNG-HỢP (5 ý — số/mốc truy về CỤM dưới)
1. **Kỳ = 45 review-record → 9 CỤM.** Verdict-phổ: 2 FAIL (S108 fable-real first-run 1C+4M · S88 fabrication-by-merge) · ~14 PWC/PWF/GO-WITH-FIXES · ~17 PASS-clean. Teeth chứng qua fault-inject `-RepoRoot` 4/4 + independent-recompute + re-run 2-CHIỀU.
2. **PE = mảng domain lớn nhất (11 record S65→S133, CỤM 2a).** Pattern lặp: fail-closed guard TOP-of-method · FE/BE byte-mirror bit-exact · single→multi consumer-sweep · menu-hide≠API-lock. Mig covered 54/56/59/60(+61)/63/67.
3. **Reviewer-craft đúc (CỤM 1+4):** fidelity-gate 3-lớp (verbatim + pointer-arithmetic count==1 + ground-truth-code) · byte-conservation moved-not-cut (sha256 line-level + arithmetic full-accounting) · Windows byte-verify KHÔNG-MSYS · verify-command-as-CODE · negative-control cho token-count.
4. **#53 return-garble dai** (S101/S123/S124/S128/S129) → luật "ghi diary TRƯỚC return" tự-rút từ S123 (CỤM 8); scribe từ journal khi garble.
5. **Anti-pattern governance-review tái diễn:** mirror-a-toggle drops-reader · exact-token-sweep misses-paraphrased · cumulative-count-not-outward · fencepost/hero-ratio overclaim · Goodhart-rời-tập-đo · direction-of-error quyết mức lỗi.
## CỤM 1 [cao] — Memory-curate fidelity + byte-conservation verify (S98 3-lane · S88)
**VIỆC:** gate 3-lane curate S98 (gist impl-fe 10rec→6cụm · cicd L1 moved-not-cut · mega-line re-tier) + L2 distill test-spec S88. **KẾT-LUẬN:** S98 3-lane PASS (1 minor gist + 3 minor cicd + 0-mismatch); S88 FAIL 1 fabrication-by-merge (gist gán "Mig 45" cho cluster 2-episode, thật Master=Mig 47). Evidence: 34/34 substring count==1 · sha256 line-level backup==archive + byte-arithmetic 19917→17059 EXACT (43091451=2858) · mega-line arithmetic full-accounting ×2 file (STATUS 9412/11090 · HANDOFF 6147/7775). **BÀI-HỌC:** fidelity-gate 3 lớp cho MỌI chỗ gist DIỄN-GIẢI vượt verbatim; QUALITY-gate SAU presence-gate (token-PRESENCE mù cross-episode mis-attribution); Windows byte-verify CẤM MSYS grep/sed/awk (TEXT-MODE strip `\r`) → .NET ReadAllBytes/wc -c/od -c; commonPrefix lấn 1-char → IndexOf(blurb) FULL line. **BẤT-NGỜ:** honest-empty "không" > bịa filler; verbatim TỰ mâu-thuẫn (S52-vs-S53) → gist FLAG discrepancy KHÔNG resolve-bịa. [cao] → substring:"anti-S88-fabrication-by-merge" · "token-split artifact" · "commonPrefix lấn 1-char" · "fabricates false specificity"
## CỤM 2a [cao] — PE financial-invariant close-reviews (11 record)
**VIỆC:** chuỗi review PE cross-stack (EndsBeforeCeo Mig60/61 · badge/checkbox UAT · giá-đề-xuất Mig59 · budget Mig56 · Mig54 finalize · multi-winner · negative-quote · budget-freeze Mig67). **KẾT-LUẬN:** đa số PASS 0-issue; S133 PWF (0must/2should CÙNG root #81 indirect-writer WorkflowService:308 + DbInitializer:1323); S89-bis 4/4-confirm + 1 NEW joint-winner DEAD-END. Guard: S72* fail-closed throw BEFORE Phase=DaDuyet + server-recompute no-trust-client · S86 byte-mirror NotFound→Forbidden + canEditCcm bit-exact · S97-bis EndedByLevelFinalize set DUY-NHẤT service:873 (5 nhánh) + repro peFinButWentCeo · S91 codegen flushes ONLY seq-row · S117 UpsertQuote writes-0-budget-field · SHA256 FE 2-app IDENTICAL b7abbc2f/bcf812fd. **BÀI-HỌC:** terminal/finalize-lock gác FROM-state; single→multi = grep MỌI consumer (dừng ở detail-display = bug); "mọi nhánh set X" phải grep CẢ assignment-qua-BIẾN (#81 indirect); FE badge/gate mirror BE bit-for-bit; echo-all-siblings convention rots khi thêm field mới; backfill LIKE-VN-wildcard = false-pos-risk. **BẤT-NGỜ:** S76 spec "KHÔNG migration" FALSE (đọc changed-set thật, đừng tin scope-framing); S89-bis nút FE `some(isWinner)` nhưng BE hard-block. [cao] → substring:"peFinButWentCeo" · "opt-out→opt-in" · "UpdatePeSuggestedPriceCcm" · "server-recompute amount no-trust-client" · "flushes ONLY seq-row" · "joint-winner DEAD-END" · "echo-all-siblings convention rots" · "winnerQuoteTotal<CeoApprovalThreshold" · "DbInitializer:1323"
## CỤM 2b [vừa] — Authz / prod-security reviews (S92 · S69 · S65)
**VIỆC:** review authz (hide 5 menu-group admin-only · Office golive public-grant · HRM Hồ-sơ upgrade-path). **KẾT-LUẬN:** 3/3 PASS. S92 A-E upheld + CatalogManager Danh-mục stripped (intended, flag em-main); S69 re-skin proof grep api-call+queryKey byte-equal + granted-root NOT inherit-root; S65 upgrade-path MUST MUTATE row. **BÀI-HỌC:** menu-hide API-lock (2 tầng độc lập); upgrade-path MUTATE row (`if(!row.CanRead)`) KHÔNG skip-existing khi prior-revoke pre-set false (S58-class); public-grant KHÔNG cascade sibling. **BẤT-NGỜ:** S69 accent thiếu -800 stop = silent no-class Tailwind v4. [vừa] substring:"CatalogManager Danh-mục access stripped" · "granted root NOT inherit-root" · "upgrade-path MUST MUTATE row"
## CỤM 3 [cao] — Harness governance adopt-reviews (H10/15/16/18/19)
**VIỆC:** review adopt/re-run harness (H18 detector-teeth `wf_955643c3-f7d` · H19 `wf_5f308fd8-744` + fable-clone toggle · H16 MFE `wf_13e3d35a` · H15-v2 · H10). **KẾT-LUẬN:** PASS/PWC. H18 fault-inject 4/4 `-RepoRoot` proved FLAGS injected-stale + caught 1 CONCERN em-main missed (workflows/README:51 stale); H19 12/12 honest + hysteresis 0.85/5/2; fable-clone 3 Lane-A CONFIRMED + marker write-only dead; H16 denom-29 re-derived + BLOCKING vocab-fork memory-fidelity H6.7H16. **BÀI-HỌC:** exact-token sweep misses paraphrased widen concept-phrase khi retire artifact; mirror-a-toggle copies WRITER, silently drops READER (persist cần CẢ write + read-on-session-start); hexSHA disambiguation = recompute BOTH strip/no-strip; leading-verb-trap DEFEATED; index-vs-file sha = đọc frontmatter self-declared TRƯỚC flag. **BẤT-NGỜ:** marker `fable-real-mode.on` = WRITE-ONLY dead artifact. [cao] substring:"exact-token sweep misses paraphrased labels" · "hexSHA disambiguation" · "mirror-a-toggle copies the WRITER side" · "leading-verb-trap DEFEATED"
## CỤM 4 [cao] — fable-real single-pass adversarial + D-review lanes
**VIỆC:** single-deep-pass Fable + 2-lane D-review adap 16-07 (spec-execute · errata-EOL `wf_8a0249f6`). **KẾT-LUẬN:** S108 FAIL 1C (email "đã sửa comment" khi hmw.js:31-32 chưa sửa) + 4M; S125 PASS-WITH-SELF-FIXES (re-stamp 58f5afd8); S127 GO-ADAP bác claim hub (rag.json:26 override ACTIVE); S128 GO-COMMIT + GO-WITH-FIXES; S129 GO-WITH-FIXES ×2 (P1 writer-only NỬA-VÁ, reader mfe-eval.ps1:193 thiếu -Encoding UTF8, BOM `ef bb bf`). **BÀI-HỌC:** verify-command trong spec = CODE chạy thử (2/4 sai thật); encoding-bệnh CMDLET không shell (`Get-Content -Raw` ANSI-decode UTF8-no-BOM mojibake); sibling-test 2-CHIỀU (sibling-MATCHfile-bệnh · sibling-CŨNG-FAILverifier-bệnh); direction-of-error quyết mức lỗi (lệch CONSERVATIVE=minor); `Get-FileHash` so `_index` = SAI-LOẠI-HASH (bodywhole-file); doc assemble-từ-N-worker grep stale-claim theo CLASS; consumer-sweep S87 áp CẢ ĐỀ-XUẤT-VÁ. **BẤT-NGỜ:** S108 đoạn drift-note (viết ĐỂ cảnh báo drift) chỗ DUY NHẤT tả sai canonical. [cao] substring:"assemble-từ-N-worker" · "stamp_verify.py" · "rag.json:26 override ACTIVE" · "SAI-LOẠI-HASH" · "mfe-eval.ps1:193"
## CỤM 5 [vừa] — Supplier Excel-import S112 close-reviews (5-lane)
**VIỆC:** close-review PRE-deploy Supplier-import (Mig62/63) + PE sign-off, FINAL 2-feature. **KẾT-LUẬN:** GO-WITH-ADJUSTMENTS FINAL GO 0-must. Independent MAJOR: Import button reuse Suppliers.Create guard nhưng endpoint=Admin/CatalogManager non-functional cho fe-user drafter. NFC/NFD: test literal-NFC KHÔNG chứng file Excel thật NormalizeHeader FormC:306/313. EDGE-5 gác ĐỈNH SVC:66 (bỏ sót admin-override SVC:290 fix TOP). Evidence: 24 clamp-consts=EF-len byte-exact · 30 tokens==test byte-identical · Mig63 additive-nullable prod-safe · tests 458. **BÀI-HỌC:** reuse sibling menu-guard cho Admin-scoped action = under-restrict derive từ ENDPOINT authz; self-flip token-test = internal-consistency KHÔNG external-acceptance; terminal-lock ĐỈNH method KHÔNG rải per-branch; Case-9 self-adjusting PASS real==expected diff byte 2 mảng TAY. **BẤT-NGỜ:** A1 bỏ auto-terminal = UAT behavior-change by-design; CEO-skip decision mở đường skip MỚI. [vừa] substring:"24 clamp-consts=EF-len byte-exact" · "KHÔNG rải per-branch" · "internal-consistency KHÔNG external-file-acceptance" · "Case-9 self-adjusting"
## CỤM 6 [vừa] — Outward email-hub gates (H22/H23/H24 closure-cadence)
**VIỆC:** gate outward email SEai_infra ×4. **KẾT-LUẬN:** PASS/PWF, bắt lỗi TRƯỚC stamp. S116 PASS 0-over-claim (6/6 re-run MATCH HEAD 88bd8e6 · A7 246/246 pointers · crystallized 382713B); S126 gate FAIL bắt 3 thật ("Audit 2/2/0" session-cumulative NON-REPRODUCIBLE + "3 việc"=2 + "hub 17/17"=SE-self-obs) stamp 945cf3ad; S131 PWF fencepost "8 nhãn/+4" khi atomic ĐÚNG HẾT; S131b PWF inflate "hàng loạt" + homophone x/s. **BÀI-HỌC:** số AGGREGATE cumulative KHÔNG vào outward (evidence bền = per-lane theo run-id); "đã đo" chỉ pass khi trỏ disk-measure; verbatim-quote owner so TỪNG CHỮ kể cả homophone; hero-ratio re-derive từ raw; persist-claim trên git-tracked = verify tracked+0-drift TRƯỚC. **BẤT-NGỜ:** fencepost đẻ 2×-overclaim mọi số atomic đúng. [vừa] substring:"246/246 pointers 0-fail" · "session-cumulative" · "fencepost = liệt-kê từng nhãn" · "homophone x/s"
## CỤM 7 [vừa] — do-token calibration + adap-wave-reply (S124/S125)
**VIỆC:** review plan adap-wave-reply + L2 fidelity + relabel do-token. **KẾT-LUẬN:** PWF (0C/3M/2m). do-token trap committed WHILE adopting do-token (spec "STATUS=26075 tok" nhưng re-Read truncation=70892, 2.72× under); relabel bằng negative-control 3-probe (`'a'×150K`→"150,006 tokens" content-independent) notice-N = heuristic CẬN-TRÊN KHÔNG real-token; push-guard "ahead-of-broadcast" OVERCLAIM (trailing-K looserahead). **BÀI-HỌC:** verify do-token = re-Read full + đọc dòng truncation; nhãn "real-N" tự = mislabel negative-control phân biệt heuristic/tokenizer; "ahead" verify vs ACTUAL requirement; meta-count self-blindspot (R5 highest-value dropped); nấc "verified" trên cadence NEVER-RAN sai. **BẤT-NGỜ:** do-token bẫy CHÍNH lúc ĐANG adopt do-token; notice-N content-independent. [vừa] substring:"committed WHILE adopting do-token" · "REFINEMENT ahead-of-broadcast" · "negative-control 3-probe"
## CỤM 8 [cao] — Governance-code review (Goodhart/citation/acceptance-grep)
**VIỆC:** review governance-code (S123 backtick-guard+H24-3+retire-dạng-3 · S115 presence-not-age D1/D2/D3). **KẾT-LUẬN:** PWF. S123 3must/1MAJOR/3m + #53 garble TẠI TAO (đĩa KHÔNG cứu chưa ghi diary); S115 0C/2M/5m (M1 acceptance-grep 1/3 doc-line=false-PASS; M2 skip-element bolted-on contiguous-cut = correctness-inversion). **BÀI-HỌC:** ghi diary TRƯỚC return (chống #53); vá-1-lớp grep MỌI matcher cùng-lớp TRONG diff; đổi-format-cho-trượt-mẫu = Goodhart rời-tập-đo; acceptance-grep bare-token + human-classify (verify TỪNG regex-alt vs TỪNG target-line); node --check HAS teeth; `parallel()` unverifiable-from-source nhưng robust-under-BOTH-truth-values = endorse-with-caveat. **BẤT-NGỜ:** acceptance-grep KHÔNG detect miss của CHÍNH deliverable mình. [cao] substring:"Goodhart rời-tập-đo" · "detect its OWN deliverable's miss" · "node --check HAS teeth"
## CỤM 9 [vừa] — Whole-session + close-review khác (gộp phổ verdict)
**VIỆC:** các record còn lại (whole-session S97/S97-bis · S90 re-key · S91 stability · S116-PE-neg-quote 3-lane · S117-close · S133-freeze). **KẾT-LUẬN:** verdict-phổ toàn kỳ: FAIL ×2 (S108 · S88) · PWC/PWF/GO-WITH-FIXES ~14 · PASS-clean ~17; mọi PASS đều kèm evidence độc lập (re-run/re-grep/sqlcmd), 0 rubber-stamp. **BÀI-HỌC:** re-key/re-derive luôn đi kèm consumer-sweep; UAT-facing fix cần repro-test REDGREEN trước. **BẤT-NGỜ:** phổ 45-record cho thấy tỉ lệ PASS-clean ~38% reviewer "đắt" nhất chỗ bắt 2 FAIL + ~14 có-fix, không phải đóng dấu. [vừa] substring:"re-key SelectedSupplierId" · "useIsFetching gate"
## COVERAGE-TOKENS (per-file đóng-kín — nguồn: archive/2026-07.md của reviewer)
**Gotcha:** #50(bẫy `"gotcha #50"≠"gotcha#50"`) · #53(S101-LaneC/S123/S124/S128/S129) · #69 · #70 · #73 · #81(S117 · indirect-assignment S133). **Mig:** 54 56 59 60+61(wrong-tablefix) 62/63(`778fc98`) 67. **SHA/hash/wf:** `f229b07` `5ee32c0` `e350660` `b7abbc2f` `bcf812fd` `DxUomy4C`/`DkyQ0xCd`/`l_kwCZIF` `wf_31ea3985-92c` `wf_955643c3-f7d` `wf_5f308fd8-744` `6909299a`/`ee00d253`/`a7ff304b`/`eed277f7` `5f511fe5→5f8b8504` `wf_13e3d35a` `88bd8e6` `382713B` `wf_8a0249f6` `ef bb bf` `c0ac7486447e` `181a6d19`/`f29247cf` `bf93abd` `945cf3ad` `58f5afd8` `wf_f9c0b939-181` `e46863c8` `778fc98`. **file:line:** backup-L73/74==archive-L7/8 · STATUS 9412/11090 · HANDOFF 6147/7775 · PE-service 671/873/911/943/1049 · projections :1153/:647/:767 · workflows/README:51 · budget.json:35-37 · hmw.js:31-32 · PurchaseEvaluationDetailFeatures.cs:282-366 · ContractFeatures.cs:46 · CreateContractFromEvaluation:88-90 · FE:201/BE:206 · ExpectedHeaderTokens:37-66 · RealFileHeaderTokens:420-451 · NormalizeHeader:306/:313 · SVC:53/:66/:92/:265/:290 · ultra-on:21/README:208 · WorkflowService:308 · DbInitializer:1323 · mfe-eval.ps1:193 · rag.json:26. **Guard:** fail-closed BEFORE Phase=DaDuyet · server-recompute no-trust-client · EDGE-5 TOP-of-method · byte-mirror bit-exact · all-or-nothing gate:137-152 · upgrade-path MUTATE row · UpsertQuote 0-budget-field · backfill LIKE marker · fingerprint-Ordinal + FormC · node --check · archive-gate 12/12 + A7 246/246 · fault-inject `-RepoRoot` 4/4. **Root-cause:** cut-not-moved `f229b07` · fabrication-by-merge · singlemulti-stops-at-display · echo-siblings-rots · #81 via-BIẾN · sibling-guard under-restrict · terminal-rải-per-branch · mirror-a-toggle drops-reader · exact-token misses-paraphrased · fencepost/hero-ratio · session-cumulative · Goodhart-rời-tập-đo · do-token mislabel-chunk-as-whole · heuristic-cận-trênreal · P1 writer-only reader-thiếu-UTF8 · Get-FileHash SAI-LOẠI · Get-Content-Raw ANSI-mojibake · NFC-literalexternal. **Surprise:** honest-empty>bịa · spec-KHÔNG-migration-FALSE · drift-note-chỗ-duy-nhất-sai · marker-WRITE-ONLY-dead · joint-winner-FE-hiện-BE-block · accent-800-silent · A1-UAT-behavior-change · fencepost-2×-dù-atomic-đúng · do-token-bẫy-lúc-adopt · notice-N-content-independent · acceptance-grep-mù-deliverable-mình. **Verdict-phổ:** FAIL ×2 · PWC/PWF/GWF ~14 · PASS ~17. **Drop `thấp`:** 0 cụm.

View File

@ -0,0 +1,41 @@
---
distill-gen: 1
period: 2026-07 (S98→S119, 24 entry @start+@end)
source-verbatim: archive/2026-07.md (24 entry, 46.063B, gen-0)
pointer-style: substring (Ctrl-F) back-resolve vào archive/2026-07.md; mỗi cụm kết → substring:"<unique>" (anchors grep-verified count=1 @GATHER)
fields-per-line: VIỆC · KẾT-LUẬN(+file:line/commit) · BÀI-HỌC · BẤT-NGỜ · [confidence]
---
# Gist 2026-07 — tooling-auditor (distilled S140 sleep-compress)
## TỔNG-HỢP (5 ý — mọi số/mốc truy được về CỤM dưới)
1. **Trục nặng nhất = model inherit-chain probe:** 12 data-point (#3#14) + S119, 9 flip Fable↔Opus / 15 phiên → verdict cứng: self-report model = **runtime-availability probe per-session, point-in-time KHÔNG steady-state**. S119 flip-9 = owner-choice (MTv3, KHÔNG outage → 0 caveat/0 revert) đổi bản chất trục. Chống churn: canonical single-owner flip-chain STATUS, derived = pointer-only (S106-propose → S107-adopt). → CỤM 1.
2. **3 lớp drift thực-sự bắt được (còn lại đa số PASS):** (a) SKILL-lag-sau-Mig (ef-core kẹt 59→61→62→66) + skills/README index-lag ĐỘC LẬP SKILL.md + permission-matrix stale-từ-Session-6 load-bearing → CỤM 2; (b) D-BUNDLE STATUS live-pointer lag — luôn triangulate cicd-MEMORY → CỤM 3; (c) DOCS canonical drift, đỉnh = STATUS:6 state-chip = detector-oracle + test-count no-oracle + module-table Migration-column (lớp check MỚI) → CỤM 4.
3. **Roster + surface tăng thật:** roster 11→12 (+office-document OD1-OD10 verified-runtime cùng-phiên) · VALID_ROLES 10→12 (+2 monitor tự-vào whitelist) · command 14→16→18 (fable-* H19 → /pause+/tiep H22) · settings.json project-level FIRST-EVER (wal-flush hook). New-alloc plugin = 0 mọi phiên (18/15/3 invariant). → CỤM 5/6.
4. **Toolbox method vàng:** post-audit-drift-cùng-ngày · `git log --` last-touch · `git show --stat` re-ground HEAD · brace-glob-void (0-match≠0-file) · marker-name-from-source · same-session-respawn≠data-point · gate-RETURN-only→mem-gap-reground · #53 return-CHẤM-DỨT-agent ⇒ "return trước làm sau" bất-khả-thi. → CỤM 7.
5. **Số/mốc era:** Mig 59/60/61/62/65/66 · 89 bảng (Mig62=18AddCol/0CreateTable count-invariant) · test 440→495→501→505→509 · gotcha 68→79→82 · menu 54 · policy 216=54×4 · bundle #484#495 · plugin 18/15/3 + marketplace 35.
## CỤM 1 [cao] — Model inherit-chain flip-chain (Fable↔Opus per-session probe)
**VIỆC:** trục ② self-report model runtime mỗi phiên vs `settings.json:11` pin. **KẾT-LUẬN:** chuỗi S98-F→S101-O→S102-F→S103-O→S104-O→S105-F→S106-O→S107-F→S108-111-F(streak)→S116-F→S118-F→S119-O owner-choice; dp#3(S99)→#14(S111); flip-4→9. Cadence gộp canonical single-owner STATUS + derived pointer-only (agents/README:3 · session-start:37 · session-end:113) — S106-propose, anh-confirm S107. S119 MTv3 bỏ auto-revert → agents/README:3 taxonomy-lag "outage-driven/tự-về" (LOW, sinh S110 sót 9 phiên). **BÀI-HỌC:** self-report = probe-per-session; G-015 = 1-spawn probe → em-main confirm lead-runtime TRƯỚC APPEND. Flush-mỗi-flip = churn 7/8-phiên → gộp 1-chain. **BẤT-NGỜ:** "Fable VỀ" liên tục bị lật phiên sau (S102→S103, S105→S106) — flip-churn inherent BƯỚC-0.6. [cao] → substring:"inherit-chain self-report = runtime availability probe" · "CANONICAL single-owner flip-chain"
## CỤM 2 [cao] — SKILL drift: ef-core Mig-lag + README index-lag + permission-matrix Session-6
**VIỆC:** trục ① — 6 skill project + 23 standalone. **KẾT-LUẬN:** (a) ef-core kẹt Mig-cũ: S98 stuck-59→disk-61 · S104-D2 header-61 disk-62 (`20260706084342_ExpandSupplierFields.cs`) · S118 row-88 Mig66. (b) skills/README:20 stale ĐỘC LẬP SKILL.md (S105 index-Mig61 sau `af5f9d3` chỉ sửa SKILL; S118 "S113"→S117). (c) S119 permission-matrix stale từ `2abbc1d` Session-6 (2026-04-30): ~60-menu→thật 54 · ~240 vs :81 48 policy TỰ-MÂU-THUẪN→thật 216=54×4 (`Program.cs:82-88`) · còn `Bg_*` chết S61 — load-bearing (dùng thật điều-tra prod-perm S118). **BÀI-HỌC:** README≠SKILL = 2 drift độc-lập (class S50); skill-lag-sau-Mig lặp; skill dùng-thật phải soi kỹ hơn skill-nằm-im. FP đừng chase: ef-core :94/:95/:162/:179 = procedural-history module-local (H18-A ratio-band). **BẤT-NGỜ:** 1 skill TỰ-mâu-thuẫn nội-bộ (240 vs 48 cùng file) sống Session-6→S119 vì "logic vẫn đúng". [cao] → substring:"skill-lag-sau-mig" · "README≠SKILL drift độc-lập" · "chính skill dùng THẬT trong điều-tra prod-perm"
## CỤM 3 [vừa] — D-BUNDLE: STATUS live-pointer bundle-hash lag (recurring)
**VIỆC:** trục ④ chuyên-mục — con-trỏ "Bundle hash live (prod)" vs cicd-MEMORY authoritative. **KẾT-LUẬN:** gốc S98 (#483 `CeTA7Z82`/`CGaAyXen` gắn-nhầm #484; canonical #484 `mEGqlNWc`/`Dnrp4PU1`). Lag lặp: S106 kẹt #484 vs live #488 `ChSNAJBK`/`Bn2w1znH` · S107 #489 `BVyH-FY7`/`EDsZebvn` · S108 CLOSED · S111 frozen ×5 · S116 `Dd55jBpj`/`DVDr1UQ4` · S118 `cFI7ih4a`/`MxgooVZw` unchanged=ĐÚNG (BE-only). **BÀI-HỌC:** triangulate cicd-MEMORY (provenance giàu nhất) — KHÔNG tin STATUS-line đơn-độc; 2-source-trong-cùng-doc cần cross-check; lag-1-run là pattern benign (hoist + prepend giữ history). **BẤT-NGỜ:** data đúng tồn tại in-doc mà con-trỏ chuyên-dụng "live" vẫn thiếu-hoist 1 chain. [vừa] → substring:"bundle-hash-question brief hỏi" · "phải triangulate cicd-MEMORY"
## CỤM 4 [vừa] — DOCS canonical drift: STATUS:6-chip detector-oracle + test-count no-oracle + Mig-column
**VIỆC:** trục ④ tổng. **KẾT-LUẬN:** F3-S99 `session-start.md:44` "gotchas (68)" thật 79 (commands ngoài count-grep monthly). S104-D1-HIGH STATUS Mig61→62 canonical-itself-stale. S118: STATUS:6 leading state-chip = detector-oracle (canonical-parse keys off :6 → :6 lag = nguồn recurring S116/S117/S118; propose B1-collapse). Test-count NO-ORACLE (cần git-reasoning +8-commit). Lớp check MỚI: module-table Migration-column (CLAUDE:62 PE row thiếu 65,66 · :64 Master thiếu 48,62-64). ERD §16+ = known-debt carry. **BÀI-HỌC:** narrative-updated-summary-LAGGED = class lặp; STATUS count 2-nơi → :6 = oracle phải sync; Grep `-o` context-window phân-biệt current-drift vs history-delta. **BẤT-NGỜ:** test-count drift KHÔNG auto-detect được (no oracle) — khác mọi count khác. [vừa] → substring:"leading state-chip" · "narrative-updated-summary-LAGGED" · "module-table Migration-column" · "count-grep monthly"
## CỤM 5 [vừa] — ROSTER 11→12 + VALID_ROLES 10→12 + new-alloc PASS
**VIỆC:** trục ② roster/frontmatter + new-alloc plugin. **KẾT-LUẬN:** S107 roster 11→12 +office-document OD1-OD10 (`21387cd` 14-file), new-alloc 5-skill PASS ×3-chỗ (agent §SKILL + README matrix:165 + VALID_ROLES hmw.js:27 + budget.json:132). S110 VALID_ROLES 10→12 +2 monitor (CHÍNH EM vào whitelist); F1 persona 2-monitor stale "roster 10" (tooling-auditor.md:13/:22 + harvest:13) = blind-spot persona-chính-mình → B1-pointer. **BÀI-HỌC:** verified-runtime CÙNG-PHIÊN được (hot-reload agent-MỚI) nhưng EDIT-agent/command CẦN restart (S27 thu-hẹp); grep-hẹp count-cũ bắt lớp persona-self mà roster-grep bỏ sót. **BẤT-NGỜ:** monitor persona CHÍNH MÌNH khai "roster 10" sau khi roster đã 12 — self-stale. [vừa] → substring:"OD1-OD10" · "CHÍNH EM vào whitelist"
## CỤM 6 [vừa] — COMMAND 14→16→18 + settings.json FIRST-EVER; COMMAND≠Skill-tier
**VIỆC:** trục ① command-count + tooling mới. **KẾT-LUẬN:** S101 command 14→16 (+fable-real/clone H19 — COMMAND KHÔNG phải skill, SlashCommand-tier ≠ skills/<n>/SKILL.md). S108 +fable-real-runbook.md 60.586B. S111 command 16→18 (/pause+/tiep H22) + project `.claude/settings.json` FIRST-EVER = hooks.Stop `wal-flush.ps1` + WAL tracked + hook verified-runtime ×2 (`12071c5`/`67be443`). S108 marker fable-real.on = gitignore:92 KHÔNG committed. **BÀI-HỌC:** đừng conflate command auto-registered thành skill; D10 paths-ignore đổi = AS-6 class → cicd-monitor lane (không phải tooling-auditor). **BẤT-NGỜ:** settings.json project-level lần-đầu — tooling-surface mới ngoài plugin/skill. [vừa] → substring:"là COMMAND KHÔNG phải skill" · "FIRST-EVER = hooks" · "marker-not-committed"
## CỤM 7 [cao] — Method/verify shortcuts & bẫy đo-lường
**VIỆC:** đúc method + trap qua 24 entry. **KẾT-LUẬN + BÀI-HỌC:** (1) post-audit-drift-cùng-ngày = lớp riêng (audit đúng lúc chạy vẫn stale cuối ngày → per-session monitor bù). (2) `git log --` last-touch = shortcut no-change (S100/S103). (3) `git show --stat` mỗi commit — đừng tin brief-baseline HEAD (S106 bắt 2 commit post-closeout sót). (4) brace-glob-void: Grep `{a,b}/**` match 0-FILE → sweep VOID tưởng clean; phân biệt "0-match" vs "0-file-searched". (5) marker-name từ source TRƯỚC khi flag absence (S109 self-caught false-alarm). (6) same-session re-spawn ≠ data-point mới (S110 premise "+1-dòng" SAI). (7) gate RETURN-only → diary 0-entry → mem-gap re-ground-từ-git (S116-S118). (8) #53: return CHẤM DỨT agent → "return trước, làm việc sau" bất-khả-thi vật lý; LỖI Ở LỆNH em-main (S119). Mọi khẳng-định trạng-thái-đĩa phải chạm đĩa; làm→verify→return. **BẤT-NGỜ:** bẫy cấu-trúc do em-main tạo — sub mô tả ý-định "đã ghi entry sau khi trả verdict" nhưng đĩa bác (MEMORY 0-touch). [cao] → substring:"audit đúng lúc chạy vẫn stale cuối ngày" · "0-file-searched" · "return CHẤM DỨT agent" · "brace-glob" · "marker/filename LUÔN lấy từ source" · "Re-spawn lần-2 cùng-phiên" · "post-audit-drift"
## COVERAGE-TOKENS (per-file đóng-kín — nguồn: archive/2026-07.md của tooling-auditor)
**gotcha:** #74 · #76#79 · 68→79 · #82 · #69 · #41/#47 · #37 · #78/#79·#81 (ref CLAUDE-context). **SHA:** `881783c` `8a249c5` `525a01a` `c112be9` `4263d63` `e350660` `f229b07` `5ee32c0` `3e2c18b` `62cff38` `6d217f7` `778fc98` `95f5555` `af5f9d3` `0f16c00` `41f8061` `54a2c72` `86a34d5` `1eea51b` `21387cd` `5d13b48` `69957fd` `557642f` `a9c3f1d` `72a85bf` `f5a5c3e` `38262d8` `162f0b9` `191532e` `318a271` `8aa3869` `12071c5` `67be443` `debe82f` `ac3f122` `88368fd` `d436af2` `5c7569e` `316a82f` `1b8b065` `fc1b8d9` `d08f2a3` `e88e75d` `c2135ba` `c808b9a` `e5f655f` `3fde8af` `81b59f0` `2abbc1d`. **md5:** `1760f27a`/`a6c8c75f`/`e12e5377` · `12612234`. **file:** `20260706084342_ExpandSupplierFields.cs` · `fable-real-runbook.md` 60.586B. **bundle/Run#:** `CeTA7Z82`/`CGaAyXen`(#483 gắn-nhầm) · `mEGqlNWc`/`Dnrp4PU1`(#484) · `ChSNAJBK`/`Bn2w1znH`(#488) · `BVyH-FY7`/`EDsZebvn`(#489) · `D51OYyGV`/`BVdssm5S` · `Dd55jBpj`/`DVDr1UQ4`(S116) · `cFI7ih4a`/`MxgooVZw`(S118) · Run #484-#495 · CI #386-#389. **file:line-set:** giữ nguyên theo verbatim (ef-core SKILL :3-:307 · skills/README :20/:90 · permission-matrix :3/:23/:81/:159 · STATUS :6-:112 · session-start :8-:123 · session-end :48-:143 · agents/README :1-:264 · CLAUDE :21-:131 · hmw.js :9-:35 · settings.json :11-:38 · ACTIVE-MARKS :15-:31 · engine :315-:418 · Program.cs:82-88 · budget.json :4/:132 · gitignore:92). **guard/root-cause:** post-audit-drift-lớp-riêng · README≠SKILL-độc-lập · COMMAND-tier≠Skill-tier · brace-glob-void · marker-name-from-source · same-session-respawn≠data-point · gate-RETURN-only→mem-gap · return-terminates-agent(#53) · triangulate-cicd-MEMORY · STATUS:6-chip=detector-oracle · test-count-no-oracle · git-log-last-touch · git-show-stat-reground · hot-reload-agent-MỚI/EDIT-cần-restart · new-alloc=0(plugin) · ratio-band-FP-module-local · alias-mapped-benign (wave-folder/Dự-trù-PRO/two-tier) · VALID_ROLES-9-product-by-design. **Counts era:** Mig 59-66 · 89 bảng · test 440/495/501/505/509 (D45+I450/456/464) · gotcha 68/79/82 · menu 54 · policy 216=54×4 · roster 11→12 · VALID_ROLES 10→12 · command 14→16→18 · plugin 18/15/3 + m35 + effortLevel:xhigh · skill 6+23. **Drop `thấp`:** 0 cụm (không cụm nào tag thấp).