# sub-opus-lane1-detector — LANE-1 (C-2, C-8, C-19, C-11)

> Run: 2026-08-09-S185-email-adap-pipeline · Lane: 1 (detector) · Agent: Opus 5 MAX
> File chinh: `scripts/governance-detectors.ps1` (4 item CUNG FILE — lam TUAN TU)
> Artifact-first (chong #53): ghi LIEN TUC, ruot nam tren dia. KHONG commit (lead gom cuoi).

## Trang thai

- [x] **C-2** neo-marker Lop-7 — DONE (2 site, fault-inject 3 ca + control byte-level)
- [x] **C-8** liveness 2 luoi carve-out — DONE (detector `C13`, fault-inject 3 ca CO LAP + control)
- [x] **C-19** mirror-drift stamp_verify.py — DONE (detector `C14`, fault-inject 4 ca + boundary + control)
- [x] **C-11** V-5 vi-tu ma-hoa — DONE (detector `C15`, 2 nac, fault-inject 4 ca + control + boundary)

**LANE-1 = 4/4 DONE.** Suite cuoi: `EXIT=0` · **TOTAL FLAGS 49 = baseline 49** · INFORM **18 → 20**
(2 dong moi deu la phat hien THAT cua C15, dem RIENG khong fold vao TOTAL) · non-ASCII byte trong
`.ps1` = **0** (gotcha #30). Chi cham **1 file code**: `scripts/governance-detectors.ps1` (+438 dong).
**KHONG commit** (lead gom cuoi). **KHONG store_memory.**

## 🔴 VOCAB-COLLISION khai NGAY (doc truoc khi doc phan duoi)

Script `governance-detectors.ps1` **da co san** cac section ten `C1 C2 C3 C5 C6 C9 C10 C11 C12`
(`grep -n "^Write-Section" scripts/governance-detectors.ps1`). Do la **namespace KHAC** voi ma
checklist `C-1..C-22` cua run nay. Trung ten nguy hiem nhat: checklist **C-11** (V-5 vi-tu ma-hoa)
vs section co san **`C11 - H24 FLAG-khuon + diary-delta`** — 2 thu KHONG lien quan.
⇒ Trong script toi **KHONG dat ten theo ma checklist**. Detector moi lay so tiep theo cua script
(`C13`, `C14`, `C15`) + ghi chu tro nguoc ve ma checklist trong comment.

## Baseline (do TRUOC moi edit)

```
powershell.exe -ExecutionPolicy Bypass -File scripts/governance-detectors.ps1
```
→ `EXIT=0` · **TOTAL FLAGS: 49** · **INFORM-ONLY: 18** · 193 dong output.
Luu: `%TEMP%\...\scratchpad\baseline-detector.txt` (so sanh `diff` sau moi item).

---

## C-2 — cam thuoc Lop-7 (neo-marker nguoi-go + chot song-chet) ✅ DONE

### Nguon (doc THU GOC + REPORT truoc khi cham)

- **Thu goc:** `D:/Dropbox/CONG_VIEC/AI_INFRA/broadcasts/outbox/all/2026-08-05-Governance-loi-do-luong-phan-1-tai-lap-duoc.md:98-108`
  — *"Lop 7 — Neo vao hinh dang chu do nguoi go"*. **Thuoc** (`:106`) = 2 lop:
  (1) dung neo vao glyph, neo vao cau truc; (2) **quan trong hon** — them **chot song-chet do bang
  NGUON DOC LAP**: *moc neo phai khong cu hon moc moi nhat cua tai lieu qua MOT BAC; lech hon thi
  may phai noi "chua do duoc", tuyet doi khong duoc phat so*. Ca that cua hub: may truot 2 dong moi
  nhat → tut xuong neo vao khoi da bi thay the 2 phien truoc → bao **13 muc qua han**; so that = **0**.
- **Report:** `docs/governance/adap-reports/2026-08-05-Governance-loi-do-luong-phan-1-va-2.md` (report gop;
  Ro C = phan CHUA DO ⇒ dung la viec cua C-2).

### Lam gi (2 site, dung 2 site checklist chi)

**Site B — `'### {0}.'` (:386 cu → nay `:428` sau khi chen)** — detector `C1 - broken gotcha-ref`.
Neo `^### (\d+)\.` la **heading nguoi go**. Nguoi viet doi khuon (`### 87 -`, `#### 87.`) ⇒ 2 gotcha moi
nhat roi KHOI `$gotchaAnchors` **trong im lang**, roi detector van phat dong *"'gotcha #87' has no anchor"*
— la **artefact cua parse chet**, khong phai finding.
- Cam **L7-BOLT**: `$anchorMaxGotcha` (max key parse duoc) vs **nguon doc lap** = `docs/STATUS.md` row
  `Gotchas` (FILE khac + PARSE khac — `Get-StatusValue` regex table-row), gap `> 1` ⇒ in `CHUA DO DUOC`
  + `Write-InformFlag`, **KHONG phat so** tu neo chet.
- **Scope cua suppression** (khai ro trong code): chi giu lai **verdict anchor-existence**. Phep kiem
  *range* (`cites #N > canonical max`) KHONG doc `$gotchaAnchors` ⇒ **van ban binh thuong** — giu lai
  la de khong giau chung-nhan that sau mot loi parse.
- **Chong-Goodhart:** dem va IN so dong bi giu lai (`withheld N anchor-existence line(s)`) ⇒ so dong
  giam duoc ke bang **THANH PHAN**, khong bao gio doc thanh "sach hon".

**Site A — `:814+`** — detector `H24-2 carry-age`. Neo **2 hinh dang nguoi go**: header `**NEXT anh/em`
+ tem `[carry:slug]`. Chi segment carry MOI NHAT giu duoc streak ⇒ neu khoi moi nhat go khac di, neo
**TRUOT XUONG** khoi cu va moi streak duoc cham voi lich su kho **da thay the** — dung ca thu goc.
- Cam **L7-BOLT**: moc `S<N>` cua segment duoc neo vs moc `S<N>` **moi nhat trong CUNG tai lieu doc
  bang duong parse ROI HAN 2 glyph** (`(?<![A-Za-z0-9])S(\d+)(?![\d])` tren raw text). Gap `> 1` ⇒
  `CHUA DO DUOC` + InformFlag + **khong phat streak nao**.
- Nhanh thu 3: `docMaxS=0` hoac `anchorMaxS=0` ⇒ cung `CHUA DO DUOC` (khong do duoc ≠ sach).
- **Vi sao KHONG dung session-counter lam nguon doc lap:** cau hoi cua net nay la *"neo cua toi co o
  DAU tai lieu khong"* = tinh chat cua TAI LIEU. Counter tra loi cau khac (*tai lieu co moi khong*),
  va chon nguong cho cau do la **so cua owner** ⇒ khong tu dat. (vung-owner: KHONG cham.)
- Lop (1) cua thuoc — *"dung neo vao glyph"* — **KHONG lam**: doi khuon heading `gotchas.md` /
  khuon `**NEXT` la **quy uoc cua tai lieu = vung owner** ⇒ khai SKIP-owner cho lop (1), chi cam lop (2).

### Evidence (lenh + ket qua tai-lap duoc)

**(a) Positive control byte-level — cay THAT, sau edit, so voi baseline:**
```
diff baseline-detector.txt after-c2.txt
28a29 >   [ok] L7-bolt: newest anchor 87 vs canonical 87 (gap 0 <= 1) ...
80a82 >   [ok] L7-bolt: carry anchor S185 vs doc newest S185 (gap 0 <= 1) ...
```
⇒ **DUNG 2 dong them, 0 dong doi/mat.** `EXIT=0` · **TOTAL FLAGS 49 = baseline 49** ·
**INFORM 18 = baseline 18** ⇒ *hanh-vi cu giu nguyen tru phan them* (dieu kien lead dat).

**(b) Fault-inject — CAY TAM, KHONG cham repo that.**
Harness: `%TEMP%\...\scratchpad\fi-c2.ps1` (viet thanh `.ps1` rieng, KHONG inline qua bash — bash
nuot `$`/backtick cua chuoi PS, harness hong doc y het script hong, bai hoc S180).
Cay tam = `%TEMP%\...\fi-c2\{control,fault-a,fault-b}\` chua 4 file: `docs/STATUS.md` ·
`docs/gotchas.md` · `docs/HANDOFF.md` · `.claude/agent-memory/memory-budget.json`; chay bang
`-RepoRoot <cay-tam>`.

| ca | inject gi | ket qua |
|---|---|---|
| CONTROL | khong sua gi | `[ok] L7-bolt` **ca 2 site** · TOTAL 1 · INFORM 0 |
| FAULT-A | `### 87.`→`### 87 -` + `### 86.`→`### 86 -` (2 heading moi nhat mat glyph) | `CHUA DO DUOC ... anchor parsed = 85 but canonical = 87 -> 2 steps behind` + InformFlag; site A van `[ok]` (khong lay lan) |
| FAULT-B | trong khoi moi nhat: `[carry:`→`[Carry:` | `CHUA DO DUOC ... carry anchor sits at S170 while doc newest is S185 (15 steps behind)` + `5 key(s) NOT scored`; site B van `[ok]` |

`VERDICT: CONTROL both-ok=True · FAULT-A chua-do-duoc=True · FAULT-B chua-do-duoc=True`

**(c) Chung dong bi GIU LAI la duong-gia, khong phai chung-nhan** (harness `fi-c2b.ps1`):
them `docs/probe-cite.md` = *"see gotcha #86 and gotcha #87 for detail."*
- CONTROL-A2 (heading nguyen) ⇒ **0** dong `has no '### 8x.' anchor` (ref HOP LE).
- FAULT-A2 (heading doi khuon) ⇒ `withheld **2** anchor-existence line(s)` + **0** dong artefact phat ra.
⇒ 2 dong bien mat **dung la 2 duong-gia**, va **so 2 duoc in ra** — khong co "flag-count giam" khong loi giai.

**(d) Chung dong ho phu: FAULT-A day TOTAL 1→2** — do phep cross-check co san
(`canonical-itself-stale: STATUS Gotchas=87 but gotchas.md max anchor is 85`, HIGH) cung ban.
2 nhan chung doc lap cung chi 1 su that ⇒ bolt khong thay the luoi cu.

### Verdict C-2: **DONE**

### Residual khai thang (khong giau)

- 🔶 **Site cung-lop chua va: `H24-1 title-freshness`** (`:555+`). No CHINH LA hinh may trong thu
  (neo vao dong tieu de nguoi go, phat so `81d behind` / `93d behind`, `moc-phai` = MAX anchor toan
  corpus ⇒ 1 doc vendor mang ngay tuong lai la bit mieng vinh vien — banner trong script tu khai).
  **KHONG va trong luot nay** vi chot song-chet cho truc NGAY doi mot **nguong so ngay** = so cua owner,
  khong tu dat. ⇒ de xuat: 1 C-item rieng, hoi anh nguong.
- Lop (1) cua thuoc (bo neo-glyph) = SKIP-owner, xem tren.
- Dung sai cua bolt site A: gap do bang `S<N>` LON NHAT trong segment. Neu khoi moi nhat that su
  khong nhac S nao thi roi vao nhanh `CHUA DO DUOC` thu 3 (khong phai `[ok]` gia) — da co nhanh.

---

## C-8 — liveness-check MAY cho 2 luoi carve-out ✅ DONE

### Nguon (doc THU GOC + REPORT truoc khi cham)

- **Thu goc:** `AI_INFRA/broadcasts/outbox/se/2026-07-17-ai_infra-to-se-reply-adap-wave-carveout-dp2.md:25-36`
  — hub CONFIRM carve-out o3 o nac `PASS-voi-carve-out`, **CAM nang PASS-tran**; dieu-kien giu nac =
  **hai luoi con song CUNG LUC**; *"Mot trong hai tat → carve-out mat lop tu-minh-bach → phai
  danh-gia-lai nac"*.
- **REPORT:** `docs/governance/adap-reports/2026-07-17-ai_infra-to-se-reply-adap-wave-carveout-dp2.md`
  - `§4` cuoi: *"**Skip:** liveness-detector cho carve-out (may tu canh 2 luoi con song) = **follow-up,
    chua build**. Hien viec canh la **thu-cong theo nghi-thuc**."*
  - `§5` honest-caveat: *"🔴 Carve-out dang duoc canh bang NGUOI, khong bang MAY … khong co detector
    nao canh chinh dieu-kien do. Neu mot luoi chet lang, nac se TIEP TUC duoc khai ma khong ai biet —
    dung class `cam-bang-tri-nho`."* ⇒ **C-8 chinh la cai follow-up nay.**
- **Nha CANONICAL cua dieu-kien (dich danh, khong noi chung chung):** `docs/governance/error-ledger.md:48-66`
  khoi *"🪤 Carve-out o3 — dieu-kien SONG"*, `:52-54`:
  - **(a)** `scripts/nhip-no-probe.ps1` — dong-no read-only van IN o **MOI** diem dung
  - **(b)** section `H25-closeout-ritual (GAP-2)` trong `scripts/governance-detectors.ps1` — van duoc **NOI**

### Lam gi

Detector moi **`C13 - carve-out liveness (INFORM-only)`** dat truoc `Summary`
(`scripts/governance-detectors.ps1`). Gate: chi chay khi `error-ledger.md` ton tai (khong co so thi
khong ai dang khai nac ⇒ khong canh gi).

**Luoi (a) do 2 phan** — vi mot guard chet duoc theo 2 duong doc lap:
- **(a1) CO PHAT KHONG** — **CHAY** probe (`-RepoRoot $RepoRoot`), doi output khop `(?m)^NHIP-NO:`.
  Ton-tai KHONG phai liveness: probe `exit 0 ALWAYS` va suy-bien thanh `probe-loi (khong chan)` khi
  co exception ⇒ **kieu chet cua no dung la "trong con song ma cam"**. Chi CHAY moi tach duoc 2 trang thai.
  Gia do TRUOC khi cam: **512 ms** (`Stopwatch` quanh 1 lan goi) — chap nhan vi day la **suite audit,
  KHONG phai diem dung**; predicate "re du" C7 rang buoc `/pause`·`/tiep`, khong rang buoc detector.
- **(a2) CO AI GOI KHONG** — `use ⟂ mention`. Day la **su that da do**, khong phai ly thuyet: lan dem
  truoc ke *"6 cua goi"* co ca `check-email.md`, nhung dia noi 2 hit deu la **NHAC TEN trong van xuoi,
  0 loi goi** ⇒ tap dung = **5**. Vi-tu vi vay doi `-File\s+\S*nhip-no-probe\.ps1` tren dong.
  *(Bai hoc "guard dung ma khong ai goi = chet cam" — may dung + fault-inject co rang van vo nghia
  neu 0 cua goi.)*

**Luoi (b) do bang "co CHAM duoc gi khong"**, khong phai "code co con do khong":
`$script:H25Scored` dem so close-group section H25 **thuc su cham** (tang ngay sau nhanh skip).
`0` ⇒ section chay nhung do **KHONG CAI GI** (nhanh `[skip]`) = chet lang. So do chinh luoi (b) sinh ra,
KHONG suy lai o cho khac (suy lai = de ra dinh nghia thu hai).

**Severity = INFORM** (`Write-InformFlag`): dong in ra co **y het khuon `[DETECTOR] LOW | …`** cua
`Write-Flag` (comment `:65-73` cua script noi ro the) nen fault-inject grep duoc y het mot flag —
"⇒ FLAG" cua acceptance thoa o muc quan sat duoc. **Khong fold vao TOTAL / khong nang severity** vi
hop dong sink dau file ghi ro do la quyet dinh **post-triage, owner-gated**, khong phai quyen cua nguoi
viet luoi. ⇒ khai SKIP-owner cho viec nang nac.

### Evidence (lenh + ket qua)

**(a) Cay THAT sau edit:** `EXIT=0` · **TOTAL 49 = baseline 49** · **INFORM 18 = baseline 18** ⇒ hanh-vi cu nguyen ven.
```
===== C13 - carve-out liveness (INFORM-only) =====
  [ok] grid (a) ALIVE: nhip-no-probe emits NHIP-NO: and is CALLED from 5 stop point(s)
       - pause.md:113, session-end.md:124, session-start.md:273, snapshot.md:69, tiep.md:154
  [ok] grid (b) ALIVE: H25-closeout-ritual scored 3 close-group(s) this run
  C13 carve-out-liveness flags = 0
```
🔸 **5 cua goi** — khop **doc lap** voi con so tren dia (`grep -rn "nhip-no-probe" .claude/commands/*.md`
ra 14 hit, chi 5 hit co `-File`), va khop bai hoc S180 (*tap dung = 5, `check-email` la NHAC TEN*).
Wall-clock suite: **8.6 s** (baseline ~8.1 s) — +0,5 s dung bang gia probe da do.

**(b) Fault-inject CO LAP 4 ca — cay tam, KHONG cham repo that** (`fi-c8.ps1`; cay tam co `git init`
+ 2 commit closeout de luoi (b) cham duoc that):

| ca | cay tam | ket qua |
|---|---|---|
| CONTROL | probe + 1 cua goi that + 2 commit closeout | `[ok]` **ca 2 luoi** · `flags = 0` (**IM**) |
| FAULT-a1 | **xoa** `nhip-no-probe.ps1` | `grid (a) DEAD - … is GONE from disk` · luoi (b) VAN `[ok]` · `flags = 1` |
| FAULT-a2 | probe CO + phat that, nhung `pause.md` chi **NHAC TEN** (0 `-File`) | `grid (a) DEAD-BY-DISCONNECT` · luoi (b) VAN `[ok]` · `flags = 1` |
| FAULT-b | khong `git init` ⇒ H25 vao nhanh skip | `grid (b) DEAD - … scored 0 close-group` · luoi (a) VAN `[ok]` · `flags = 1` |

`VERDICT: CONTROL both-ok=True · FAULT-a1=True · FAULT-a2=True · FAULT-b=True` (4/4)
⇒ **tat 1 nguon ⇒ FLAG DUNG nguon do** (khong keu bua), **ca 2 song ⇒ IM** — dung acceptance.

### Verdict C-8: **DONE**

### Residual khai thang

- **Luoi cung-CLASS chua canh: trio-consent S141** (`error-ledger:66` — cung chiu CHUNG luat: luoi =
  (a) proposal-line in CA khi Light-session + (b) vet-skip `.claude/WAL.md` dang `trio: skipped S<nn>`).
  C-8 chi giao 2 luoi cua o3 ⇒ **KHONG mo rong** trong luot nay; khai de lead quyet (ung vien C-item moi).
- Vi-tu (a2) chi quet `.claude/commands/*.md`. Neu mai kia cua goi nam o hook/script khac thi vi-tu
  se bao DISCONNECT sai. Chap nhan: nha cua "diem dung" hien nay **la** `.claude/commands/` (5/5 cua
  that deu o do); mo rong pham-vi = doi dinh nghia "diem dung" = vung owner.

---

## C-19 (F-7) — watcher mirror-drift `stamp_verify.py` ✅ DONE

### Nguon

- **Thu goc:** `AI_INFRA/broadcasts/outbox/all/2026-07-17-Governance-chuan-hoa-stamp-decode.md`
  (canon §N: `strip \r → split at 2nd '---' → strip ONE leading newline → sha256 utf-8`; `:55` ca ranh-gioi
  "dong trong"; `:89` doi-chung doc lap 5/5).
- **REPORT — chinh la cho khai NO:** `docs/governance/adap-reports/2026-07-17-Governance-chuan-hoa-stamp-decode.md`
  - `:14` — *"Port script … `scripts/stamp_verify.py` **55 dong**, mirror **verbatim** tu `AI_INFRA/scripts/stamp_verify.py`, co header-note …"*
  - `:28` honest-caveat — *"`stamp_verify.py` la ban mirror, khong phai nguon: hub doi §N canon ma SE quen
    re-pull thi 2 ben lech **im lang** — hien **khong co may nao canh drift** giua 2 ban, chi co header-note nhac nguoi."*
- Header-note tu khai trong chinh file (`scripts/stamp_verify.py:6`):
  `# mirror-of AI_INFRA/scripts/stamp_verify.py (ported S141 2026-07-20) - re-pull khi hub doi §N canon. KHONG sua logic local.`

### Lam gi

Detector moi **`C14 - stamp_verify mirror-drift (INFORM-only)`** (dat trong CUNG file
`governance-detectors.ps1`, khong tach file rieng — cung ho voi `C9 - hmw WIDTH mirror-drift` da co,
tai dung khuon san thay vi de ra khuon thu hai).

**🔴 Do do gi — va vi sao KHONG do raw-hash tho** (day la cho de sai nhat cua item nay):
do hom nay 2 file lech **dung 1 dong** = chinh cai note mirror-of (`diff` = 1 dong them;
**2378 B** local vs **2247 B** hub). ⇒ watcher raw-hash se **INFORM MOI LAN CHAY, mai mai**. Mot den
do vinh vien bi doc thanh nhieu trong 1 tuan = **luoi chet theo huong nguoc lai** (dung class C-8 vua va).
Nen verdict lay tren **logic-hash**:
- loai dong `^\s*#.*mirror-of` (chinh file **tu khai** rang chi note duoc phep khac — *"KHONG sua logic local"*),
- chuan hoa `CRLF→LF` (setting EOL cua checkout **khong phai** doi canon — neu khong se de ra duong-gia),
- **VAN in ca raw-sha 2 ben** ⇒ khong co gi bi giau sau phep chuan hoa.

**Hub path DERIVE, KHONG hardcode:** `repo-root → len 2 bac → AI_INFRA`. Path tuyet doi co tien to
may-cu-the se **suy bien im lang** sang nhanh else tren may khac, ma suy-bien-im-lang doc y het "sach"
— dung bai hoc S122 W5 file nay **da tra gia mot lan**. Hub khong voi toi ⇒ in **`CHUA DO DUOC`**,
KHONG `[ok]`, KHONG im.

### Evidence

**Cay THAT:** `EXIT=0` · **TOTAL 49** · **INFORM 18** (= baseline, khong doi).
```
[ok] stamp mirror in sync: logic-sha 027114ef3e83 on both sides
     (raw differs only by the declared mirror-of note: local ee1854fb / hub 027114ef)
```
🔸 doi chung tu no: `raw-sha hub = 027114ef` **trung** `logic-sha 027114ef…` — dung, vi ban hub khong
co dong mirror-of nen raw ≡ logic. Thuoc do tu kiem duoc.

**Fault-inject — cay tam MO PHONG DUNG HINH THU MUC THAT**
(`<tmp>\CONG_VIEC\SOLUTION\SOLUTION_ERP` + `<tmp>\CONG_VIEC\AI_INFRA`) ⇒ chay nay **con chung ca
phep DERIVE hub-path**, khong chi chung phep so. Harness `fi-c19.ps1`:

| ca | inject | ket qua |
|---|---|---|
| CONTROL | khong sua | `[ok] in sync` · `flags = 0` |
| **FAULT-1byte** | `sha256(`→`sha257(` — **1 byte**, size `2378 → 2378 (delta 0)** in ra truoc khi chay | `stamp mirror DRIFT: local logic-sha b2c75ab74c91 != hub 027114ef3e83 (local 56 lines / hub 55)` · `flags = 1` |
| **BOUNDARY** note-only | sua **rieng** dong `# mirror-of …` | **VAN `[ok]`** · `flags = 0` ⇒ chuan hoa **hep dung cho**, khong phai "bo qua moi comment" |
| HUB-ABSENT | xoa ban hub | `CHUA DO DUOC: hub copy not reachable …` + `MEASURED NOTHING … khong phai green`; **0 dong `[ok]`** |
| LOCAL-ABSENT | xoa ban local | `stamp mirror MISSING locally` · `flags = 1` |

`VERDICT: CONTROL=True · FAULT-1byte=True · BOUNDARY=True · HUB-ABSENT=True · LOCAL-ABSENT=True` (5/5)
⇒ acceptance *"sua 1 byte ban local trong cay tam ⇒ FLAG"* **DAT**, kem 1 boundary + 1 positive-control
+ 2 nhanh vang-mat.

### Verdict C-19: **DONE**

### Residual khai thang

- Watcher chi so **1 cap file**. Con vat mirror khac giua 2 kho (neu co) **chua duoc soi** — khong mo
  rong vi chua co danh sach mirror canonical; de xuat lead: neu muon, dung 1 bang khai mirror-set roi
  cho C14 doc bang do (tranh hardcode danh sach thu 2).
- INFORM khong chan — dung nhu checklist yeu cau (*"INFORM 1 dong (khong chan)"*).

---

## C-11 — cam V-5 vi-tu ma-hoa thanh phep dem MAY ✅ DONE

### Nguon + dinh nghia V-5 (phai truy 3 nha moi ra — ghi lai de lan sau khoi truy)

- **Nha DUY NHAT con song cua mon no:** `docs/governance/adap-reports/upgrade-pack-phased-bao-cao-cuoi.md:79`
  muc 9 *"No co moc"* — `V-5 vi-tu ma-hoa **chua cam**`. Day la artifact **DA DONG + DA GUI hub**,
  khong phai hang doi ⇒ dung ly do no roi 3 lan.
- **Dinh nghia (spec da co san, chi thieu cho cam):** `.claude/sessions/session-12/_mind-s-12.md:114`
  — *"lead da viet spec 1 dong grep + **phan biet 2 nac** (`U+FFFD>0` = **mat du lieu** ⟂ **moji-only
  = sua duoc**); chi cho cho cam."*
- **Vi sao can:** `.claude/sessions/session-12/_context-s-12.md:65` — *"V-5 vi-tu ma-hoa chua cam
  (**may W2 mu nac encoding** — ca `sub-w3` chung)"*. May W2 = `artifact-integrity.ps1`, co **4 vi-tu**
  (vang · rong · cut · nen qua tay), **khong co** vi-tu ma-hoa.
- 07-19 `harness-dong-du-vong` M8: *"V5-counter DEFER (dong V5 **nguoi dien**)"* ⇒ deliverable = bien
  dong nguoi-dien thanh **phep dem may**.

### Lam gi

Detector moi **`C15 - V-5 encoding predicate (INFORM-only)`**, 2 nac tach BACH (2 hanh dong khac nhau):
- **rank-1 DATA LOSS** — co `U+FFFD` THAT (byte `EF BF BD`). Byte goc **da mat**, re-decode KHONG cuu
  duoc, chi ban goc cuu duoc. Do tren **BYTE** ⇒ doc-lap voi decode.
- **rank-2 MOJIBAKE-ONLY** — khong co U+FFFD nhung co chu-ky double-encoding ⇒ **khong mat gi**,
  re-decode dung la lanh.
- **rank-1 THANG** khi 1 file dinh ca 2 (`continue` sau khi ghi rank-1) — "mat" la su that hanh-dong-duoc.

**`use ⟂ mention` cuong che o tang BYTE** — khong phai chi tiet: baseline cu tung dem mot file viet
token ASCII `<FFFD>` **7 lan** thanh 7 ky tu hong, ky sau doc "sut" roi **di truy mot file phantom**.
Khop raw `EF BF BD` **khong the** mac loi do (chung bang ca BOUNDARY duoi).

**CORPUS = `$GovMd` + `.claude/workflows/runs/**/*.md`.** Runs/ bi loai khoi `$GovMd` boi luat C4
self-line, nhung luat do noi ve **mau NOI DUNG** con vi-tu nay doc **BYTE** ⇒ loai ra khong duoc gi
ma mat tat ca: **7/12 file hong nam DUNG o do**. (Da co tien le auditor bao 0-hit gia vi khong quet `runs/`.)

### 🔴 Bay THUOC toi tu dinh — ghi lai vi day la phat hien dat nhat cua item

Phep do **DAU TIEN** cua toi bao `mojibake: 0 files / 0 hits`. Phep do **thu hai** (detector) bao
**13 files / 361 hits**. Hai so cua CHINH TOI da nhau ⇒ dung mot cai la thuoc hong, phai tim ra cai nao.

Truy: mang pattern trong probe viet **thieu ngoac boc tung phan tu**
```powershell
$MOJI = @( (U @(0x00C3)) + '[' + ... + ']',  (U @(0x00E2,0x20AC)),  (U @(0x00C4,0x0091)) )
```
`+` chay **XUYEN QUA dau phay** ⇒ ca mang **gop thanh 1 chuoi**, `Count = 1`, pattern thanh
`Ã[ -¿] â€ Ä'` (doi ca 3 xuat hien lien tiep cach nhau dau cach) ⇒ **0 match vinh vien**.
Do bang `$MOJI.Count` + in code-point tung phan tu: probe = **1** · detector = **3** ⇒ **PROBE la
cai hong, detector dung**. Doi chung doc lap tren file nang nhat (`sub-w3-nghi-thuc.md`):
`321 + 25 + 0 = 346` khop dung `x346` detector in ra.
⇒ **"0 hit" dau tien cua toi la SACH-GIA** — dung Lop-1 cua chinh thu 08-05 (*"0 doc y het nhau o hai
trang thai doi lap: khong co loi ⟂ khong co kha nang thay loi"*). Da cam ngoac boc + comment canh bao
tai cho trong script de nguoi sau khong lap lai.

### Evidence

**(a) Do 2 THUOC doc lap, KHOP:** (`time-v5.ps1`)
```
FAST (Latin-1 view + .NET regex) : 1468 files in   420 ms -> rank1 12f/25h  rank2 13f/361h
SLOW (vong lap tung byte PS 5.1) : 1468 files in 24244 ms -> rank1 12f/25h
AGREE rank-1 (2 independent instruments): True
```
⇒ so rank-1 **12 file / 25 hit** duoc 2 thuoc khac nhau xac nhan. Doi sang duong FAST cung cat
**~24 s** khoi suite (do that: suite 26,7 s → **10,2 / 10,4 s** 2 lan lien tiep; baseline ~8,1 s).
*(1 lan do le 47,9 s la outlier cache lanh — khai thang, khong lay lam so.)*

**(b) Ket qua tren cay THAT:**
```
V-5 measured over 1466 .md (docs + .claude + workflows/runs)
   rank-1 data-loss      : 12 file(s) / 25 hit(s)
   rank-2 mojibake-only  : 13 file(s) / 361 hit(s)   <- 346/361 nam trong 1 file: sub-w3-nghi-thuc.md
```
🔸 File nang nhat **`runs/2026-08-07-S180-adap-upgrade-pack-phased/sub-w3-nghi-thuc.md` x346** — dung
**ca `sub-w3`** ma `_context-s-12:65` neu ten lam bang chung "may W2 mu nac encoding". Vi-tu vua cam
**bat lai dung ca da chung minh no can ton tai**.

**(c) Fault-inject + positive-control (F-13 doi) — cay tam, 5 ca** (`fi-c11.ps1`; moi specimen **dung tu
code-point trong harness**, harness khong mang mau vat that):

| ca | dung gi | ket qua |
|---|---|---|
| **CONTROL-clean** | tieng Viet co dau THAT (`Tiếng Việt`, em-dash, smart-quote) | `0/0` + `[ok] no encoding damage` ⇒ **khong duong-gia tren dau tieng Viet** |
| FAULT rank-1 | 4 byte-triple `EF BF BD` | `rank-1: 1 file / 4 hit` + INFORM DATA LOSS |
| FAULT rank-2 | UTF-8 tieng Viet **decode lai bang CP1252** roi luu UTF-8 | `rank-2: 1 file / 4 hit`, **rank-1 = 0** (khong xep nham nac) |
| **BOUNDARY** use⟂mention | token ASCII `U+FFFD` va `<FFFD>` **x7** | `0/0` + `[ok]` ⇒ **noi ve no ≠ dinh no**; dung bay phantom-file cu |
| DOMINANCE | 1 file mang **CA HAI** | `rank-1: 1f/1h · rank-2: 0f` ⇒ khong dem doi |

`VERDICT: CONTROL=True · rank-1=True · rank-2=True · BOUNDARY=True · DOMINANCE=True` (5/5)

### Verdict C-11: **DONE**

### Residual khai thang

- **Recall co chu dinh la MOT PHAN.** 3 chu-ky moji chon **do chinh xac hon do phu** (`Ã`+latin1 ·
  `â€` · `Ä'`). Cac dang double-encode khac chua bat. Day la **luoi ha-thap**, khong phai chung nhan sach.
- **Nha cua V-5 dang o `governance-detectors.ps1`, KHONG phai `artifact-integrity.ps1`** (may W2 that su
  mu). Ly do: lane-rule cam 2 agent cham cung file, va checklist chi dinh file nay. ⇒ **de xuat lead**:
  neu muon V-5 song trong nghi-thuc diem-danh vat chung thi port sang `artifact-integrity.ps1` (goi
  chung ham, dung viet phep so thu hai — viet phep so thu 2 = de ra dinh nghia thu 2).
- **Chua lat dong V5 o `bao-cao-cuoi.md:79`** tu "chua cam" → "da cam": file do la **artifact DA GUI hub**;
  sua no = vung khai-bao doi ngoai ⇒ **DUNG + khai** (lead/lane report quyet). Con so may da san de dien.
- 25 hit rank-1 + 361 hit rank-2 **chua sua** — C-11 giao *dung vi-tu*, khong giao *don kho*. Danh sach
  day du in ra moi lan chay.

---

## Tong ket LANE-1

| item | detector trong script | fault-inject | control | verdict |
|---|---|---|---|---|
| C-2 | `L7-bolt` x2 site (trong `C1 gotcha-ref` + `H24-2 carry-age`) | 3 ca (A/B/A2) | byte-level `diff` vs baseline: **dung 2 dong them** | **DONE** |
| C-8 | `C13 - carve-out liveness` | 3 ca **CO LAP** | 1 (im) | **DONE** |
| C-19 | `C14 - stamp_verify mirror-drift` | 4 ca (co 1 boundary) | 1 (im) | **DONE** |
| C-11 | `C15 - V-5 encoding predicate` | 4 ca (co 1 boundary) | 1 (clean VN) | **DONE** |

**Lenh tai-lap tat ca:**
```
powershell.exe -ExecutionPolicy Bypass -File scripts/governance-detectors.ps1        # suite
powershell.exe -ExecutionPolicy Bypass -File <scratchpad>/fi-c2.ps1                  # C-2
powershell.exe -ExecutionPolicy Bypass -File <scratchpad>/fi-c2b.ps1                 # C-2 anti-Goodhart
powershell.exe -ExecutionPolicy Bypass -File <scratchpad>/fi-c8.ps1                  # C-8
powershell.exe -ExecutionPolicy Bypass -File <scratchpad>/fi-c19.ps1                 # C-19
powershell.exe -ExecutionPolicy Bypass -File <scratchpad>/fi-c11.ps1                 # C-11
powershell.exe -ExecutionPolicy Bypass -File <scratchpad>/time-v5.ps1                # 2-thuoc + timing
```
(scratchpad = `C:\Users\pqhuy\AppData\Local\Temp\claude\D--Dropbox-CONG-VIEC-SOLUTION-SOLUTION-ERP\c0a6705e-7526-497a-a85a-5fa6b8a9a083\scratchpad`)
**Re-chay 3 harness SAU khi vá ASCII ⇒ 14/14 van True** (regression sach).

### SKIP-owner da khai (khong tu quyet)

1. **Lop (1) cua thuoc Lop-7** (bo neo-glyph, neo vao cau truc) — doi khuon heading `gotchas.md` /
   khuon `**NEXT` = **quy uoc tai lieu** ⇒ chi cam lop (2) chot song-chet.
2. **Nang severity / fold vao TOTAL** cho C13·C14·C15 — hop dong sink dau script ghi ro la quyet dinh
   **post-triage, owner-gated**. Giu INFORM.
3. **Nguong so-ngay cho `H24-1 title-freshness`** (site cung-lop chua va) — dat nguong = **so cua owner**.
4. **Lat dong V5 trong `bao-cao-cuoi.md:79`** — artifact da gui hub.
5. **Mo rong C13 sang luoi trio-consent S141** (`error-ledger:66`, cung CLASS) — ngoai pham vi C-8.

### Khong lam (theo ranh lenh)

- KHONG commit / push · KHONG `store_memory` · KHONG cham file cua lane khac
  (`git status`: file code duy nhat toi sua = `scripts/governance-detectors.ps1`; cac file `M` khac
  la cua lane 3/4/5/6/7 chay song song).
- KHONG inject vao repo that: **moi** fault-inject chay tren cay tam duoi `%TEMP%`, dung `-RepoRoot`.
- Khong co file lenh `.md` / persona nao bi sua ⇒ **khong co khoan "an tu phien sau restart"** cho lane nay
  (script `.ps1` chay truc tiep, hieu-luc NGAY).
