# harness-refine return — S158 (trio nac 2/3, con DE-XUAT)

> Vai tu ghi dan TRONG luc lam (chong #53). Chua ket thuc = chua co dong END.

## Fail-closed check
- INPUT PIN `harness-eval-return.md` = TON TAI, 18 signal, `HARNESS-EVAL: MIXED`. => KHONG tu-choi, di tiep.
- `reinject-ledger.md` = TON TAI, ledger THAT 0 dong (khoi tao trong S95). => CG-1 khong chan doi-tuong nao qua ledger; chot-dung phai tra tu DIARY vai.

## Dang xac-minh tren dia (khong do lai, chi mo file so noi-dung)

### V1 — S10 (thuoc 17,1K): eval SAI TIEN-DE, DUNG SO HOC
- `memory-budget.json` CO chuoi "17.1K" o **2 cho**: `_note` :185 va `measured.harvest-curator.rollout` :192 ("L1 over self-target 17.1K -> self-compact planned next session").
  => eval noi "KHONG ton tai trong memory-budget.json" = **sai theo nghia grep**; dung theo nghia **khong co KEY so + khong co reader** => ghost-wire class-2 NGUOC voi S12 (S12 = reader-khong-key; day = value-khong-key).
- Luat 17,1K la CONVENTION LAP that: co trong 5 diary (harvest-curator :9 + :5, reviewer :93, investigator-codebase, lead-gap-auditor, ring2-audit).
- Ap thuoc 17510B (=17.1*1024) len 23 L1 doc tu dia: **9/23 vuot** = cicd 20686 · fe-designer 21492 · harvest 19456 · impl-be 21987 · impl-fe 18435 · inv-cb 20646 · lead-gap 19792 · reviewer 19049 · tooling 23464. **KHOP y nguyen danh sach eval S10** => so hoc S10 XAC NHAN tu dia.

### V2 — S3/S4 cicd `_INDEX.md`: XAC NHAN 19484 B tren dia (cap 20480, headroom 996)
- Header CON nguyen dau vet attempt-1: `> 🗜️ gist-of-index @S152 (D1 queue)` => **D1@S152 DA THI-HANH**.
- Nhung header VAN chua `Total **78 records**` + van la prose dai => **A1@S153 (attempt-2) CHUA thi-hanh**.
- => doi-tuong nay da qua 2 vong de-xuat cua chinh tao (S152 D1, S153 A1). CHOT-DUNG kich hoat.

### V3 — S16 `.archive-strikes.json`: XAC NHAN tracked-set = 20 vai
- Thieu dung 3: `ctx-audit` · `ctx-curator` · `ctx-verifier` (ring1/2/4 CO trong strikes).
- Doi chieu S8 (`measured{}` thieu 6 = 3 ctx + 3 ring) => **3 vai ctx-* vo-hinh voi CA HAI may** (khong baseline, khong strike).

### V4 — SOAT CHOT-DUNG TRON 5 return truoc (S144·S151·S152·S153·S154)
Diary tao chi ghi S151/S152/S153 => **MAT S144 + S154**. Doc lai ca 5 file. Ket qua doi chieu DIA hom nay:

| item de-xuat truoc | doi-tuong | trang-thai tren dia @S158 |
|---|---|---|
| D1@S151 nen `_INDEX` cicd | cicd `_INDEX.md` | **DA LAND** 22634 -> 19322 (git c2d01f0) |
| A1@S151 drain lead-gap | lead-gap `MEMORY.md` | **DA LAND** 24185 -> 19792 + archive/ dung |
| A2@S144 drain inv-cb | inv-cb `MEMORY.md` | **DA LAND** 26624 -> 20646 (< low-water 21760) |
| A3@S151 drain harvest | harvest `MEMORY.md` | land 1 phan roi TAI PHINH 19456 |
| **A1@S153** nen header `_INDEX` | cicd `_INDEX.md` | 🔴 **CHUA LAND** — header **2.164 B** byte-y-nguyen, van khai `Total 78 records` |
| **A1@S154** them heading 3 diary ctx | ctx-curator · ctx-verifier | 🔴 **CHUA LAND** — ca 2 con **0 heading** (ctx-audit co 1) |
| **A2@S154** sua chu budget | `memory-budget.json` | 🔴 **CHUA LAND** — con **3 lan** "first-run pending restart" |
| **A3(i)@S154** sua diary `:22` | `harness-refine/MEMORY.md` | 🔴 **CHUA LAND** — `:22` con nguyen "CHUA chay lan nao" |
| **A3(ii)@S154** promote luat 2-CUA | `harness-refine/MEMORY.md` | 🔴 **CHUA LAND** — grep 0 hit |

=> **5 item verified 0-byte-doi.** Co-che DAT-CHO da chung minh chay duoc (4 ca land @S151/S152) nhung lo hang S153+S154 ~**1/6**.
=> Trigger DA DANG-KY TRUOC @S154 A3 ("neu (ii) cung khong land => leo-thang CO-CHE dat-cho, khong phai noi-dung") **DA KICH**.

### V5 — thuoc 17,1K: 0 KEY + 0 READER + KHONG DINH-NGHIA
- Quet toan bo key so trong `memory-budget.json` dai 17000-17600: chi co **2 gia-tri DO** (`measured.investigator-codebase.l1_hot`=17229 · `measured.harvest-curator.l2_verbatim`=17072). **KHONG co key nguong nao.**
- Luat nam dang VAN-BAN CHUAN-TAC o 5 diary: `harvest-curator:9` (+ `:5` no tu khai vuot) · `reviewer:93` · `lead-gap-auditor:37` · `ring2-audit:56` · `investigator-codebase:58`.
- 🔴 Thuoc con **KHONG DINH-NGHIA**: "17.1KB" = 17.100 hay 17.510 B? (ca 2 cach doc deu ra dung 9/23 vuot nen so hoc eval khong doi.)
- 🔴 Thuoc DANG TON CONG THAT: `inv-cb:58` ghi "S155 (07-27) hook @19.5KB -> compact 20.7 -> ~17.1KB" — nen 3 ngay sau da **20.646 B** lai. Vai bo cong nen theo mot thuoc ma **0 may soi**.

---

## ACTION — 1 (co y IT: xem E2, hang doi dang tac)

| # | action | lop | doi-tuong file:path | trigger (so con-DO) | chot-dung | owner-gate |
|---|---|---|---|---|---|---|
| **A1** | Gom thuoc **17,1K** ve MOT cho canonical + dan NHAN trang-thai. 🔴 **Tao KHONG dat so.** Owner chon 1 trong 3: **(i) WIRE** = them key `tiers.l1_hot.self_target_bytes` de may soi duoc · **(ii) RETIRE** = go luat khoi 5 diary vi thuoc that la 25600 · **(iii) RELABEL** = giu nhung ghi ro "advisory hook-read-limit, KHONG phai cap" de 9 vai thoi bi coi la vi-pham im-lang. Lead thi-hanh 1 lan: 5 diary TRO ve cho canonical thay vi chep lai luat | ② promote | `.claude/agent-memory/memory-budget.json` (`tiers.l1_hot`) **+** 5 diary chep luat: `harvest-curator/MEMORY.md:9` · `reviewer/MEMORY.md:93` · `lead-gap-auditor/MEMORY.md:37` · `ring2-audit/MEMORY.md:56` · `investigator-codebase/MEMORY.md:58` | **S10** — tao doi-chieu `wc -c` tung file: **9/23 vuot 17,1K** (cicd 20686 · fe-designer 21492 · harvest 19456 · impl-be 21987 · impl-fe 18435 · inv-cb 20646 · lead-gap 19792 · reviewer 19049 · tooling 23464) **khop y nguyen danh sach eval**, trong khi moi may in "0 over". [V5]: **0 key so + 0 reader**; thuoc con khong dinh-nghia (17.100 hay 17.510?) va **dang ton cong that** (`inv-cb:58` nen ve ~17.1K @S155, 3 ngay sau 20.646 lai) | **attempt-1 o PHAM-VI corpus** (S154 E2 chi escalate RIENG harvest). Vong sau van chua chon 1 trong 3 nga ⇒ **CAM attempt-2**, nhap thang vao E1 gui owner | 🔴 **OWNER**. `token_governor.role_boundary_note` + `reinject-ledger.md:5`: so/nguong = quyen cap-ngan-sach cua anh. De-xuat nay **0 SO do tao chon** |

## ESCALATE — 4 (chot-dung DA KICH, CAM de-xuat lai noi-dung)

| # | doi-tuong | vi sao KHONG de-xuat nua | gui ai |
|---|---|---|---|
| **E1** | `cicd-monitor/archive/_INDEX.md` | Da **2 attempt**: D1@S151 LAND (22634 -> 19322) · **A1@S153 CHUA LAND** (header 2.164 B byte-y-nguyen, con `Total 78 records`). Diary tao `:4` tu cam-ket "CAM attempt-3". Escalate @S154 E1 **van treo**. So moi: **19.484/20.480 = 95,14%, con 996 B**; tai-moc tu san sau-curate 19.322 (git `c2d01f0`) -> 19.484 = **+162 B / 2 ngay** ⇒ [so-hoc] ~81 B/ngay ⇒ cham cap **~2026-08-09** | **LEAD** disposition: thi-hanh nguyen-van A1@S153 HOAC **HUY** va ghi ro. Neu chon nang cap 20480 ⇒ **OWNER** |
| **E2** | 🔴 **CO-CHE DAT-CHO** (khong phai 1 file) | [V4] **5 item verified 0-byte-doi** qua 2 vong (A1@S153 · A1/A2/A3i/A3ii@S154). Lo hang S153+S154 ~**1/6** trong khi S151/S152 land 4/4 ⇒ hong o **khau DAT**, khong o noi-dung. Trigger **da dang-ky truoc** @S154 A3 chinh la ca nay ⇒ bom them noi-dung luc nay = do vao hang doi dang tac | **LEAD** (co-che). Ranh: HANDOFF "NEXT em @S153" nay da 5 phien = **lead-surface ⇒ NHUONG `lead-stale-auditor`**; tao chi bao phan **corpus** 0-byte-doi |
| **E3** | `ctx-curator/MEMORY.md` · `ctx-verifier/MEMORY.md` | A1@S154 dat truoc: "vong sau van `entries=0` ⇒ leo-thang + **CHUYEN LANE tooling**, CAM de-xuat lan 2". Do lai: ca 2 con **0 heading** (ctx-audit co 1) ⇒ planner van doc `entries=0` ⇒ `memory-archive-gate.ps1` vinh-vien "cannot auto-drain" + value-protect chay tren 0 entry | **LEAD + LANE tooling** (goc o parser `:153`, khong o diary) |
| **E4** | `harvest-curator/MEMORY.md` | @S154 E2 da escalate OWNER voi 3 loi ra. Do lai hom nay: **19.456 B = 0 byte doi** ke tu S154. Mon no TU-KHAI 2 lan (budget `:192` tu S107 · diary `:5` tu S153) chua tra lan nao | 🔴 **OWNER** (3 loi ra deu la SO/nhip cua anh). Tao **khong chon ho so nao** |

## DA CAN-NHAC ROI BAC — 9

| # | thu da soi | phan | ly do (neo dia) |
|---|---|---|---|
| **B1** | **S7** 11/23 diary chung 1 mtime `2026-07-26T15:49` ⇒ do-tuoi gia | **BAC action** | Tao mo **ca 11 file**: **11/11 deu mang tem provenance IN-CONTENT** (`on-behalf` / `M9` / `lead seed`, 2-6 hit/file). Corpus **khong giau gi** — chi PROXY mtime doc sai. Ap dung dung luat tao tu promote @S153: *proxy mtime/ngay ⇒ CAM neo action; phai mo file so NOI-DUNG*. Ben can sua = ben DOC mtime nhu freshness ⇒ **lane instrument (eval/tooling)**, khong phai corpus |
| **B2** | **S16** `.archive-strikes.json` tracked 20 ≠ 23 (eval khai "khong phan giai duoc trong cua-so") | **BAC — phan giai DUOC, khong phai khuyet-tat** | 2 ve deu co loi giai tu dia, khong can re-run: (a) 3 vai `ctx-*` sinh **2026-07-26** (git `11db5ef`), file strikes mtime **2026-07-25T22:12** ⇒ **file co TRUOC 3 vai** — thieu do thu-tu-sinh; (b) "gate chay hom nay ma file 3 ngay" = **dung thiet-ke**: S152 da verify `memory-archive-gate.ps1:127 / :222-226 / :229` chi ghi strike khi `-Apply`, DRY-RUN khong ghi. File cung **khong git-tracked** (git log rong) |
| **B3** | **S8** bom 6 row thieu vao `measured{}` (3 ctx + 3 ring) | **BAC — DA QUEUED** | `docs/HANDOFF.md` muc ⑤ ghi nguyen van: monthly drift-audit **2026-08-01** + full re-sync `measured{}` (**+3 row ctx** ngoai 3 row ring) — con **4 ngay**. `memory-budget.json:2` va `:185` **cam hand-edit tung so le**. Theo `reinject-ledger.md:12` day la **build-gap**, KHONG phai floor-rot ⇒ cam vao ledger. **Ve tao GIU: sau 2026-08-01 van 17 row ⇒ luc do moi la no that** |
| **B4** | **S9** moc `measured` troi nang (lead-gap +436%, lead-stale +323%) ⇒ do them row / sua so | **BAC — cung ly do B3, va khong phai defect corpus** | Con so troi vi moc la snapshot **S107/S138/S141**, khong phai vi diary hong. Sua = re-sync **2026-08-01**. Ve agent-memory tao CO nhin: `lead-gap-auditor` 19.792 (tung **24.185** @S151 — A1 da drain THANH CONG) · `lead-stale-auditor` 14.078 — **ca 2 duoi MOI cap co day**, chi vuot thuoc 17,1K chua wire ⇒ da gop vao **A1/B6** |
| **B5** | **S3/S4** l2_index cicd near-cap 95,14% (con 996 B) + probe do OVER khong do NEAR (Goodhart-flip) | **BAC action — TRUNG E1, va ve "probe" la lane khac** | Ve **vat** (nen `_INDEX`) da het cua: 2 attempt roi, diary tao `:4` tu cam-ket **CAM attempt-3** ⇒ chuyen **E1**, khong de-xuat lan 3 (dung anti-pattern lap-vo-han). Ve **may** (probe in "l2idx 0 over" canh 996 B) = sua **INSTRUMENT** ⇒ **lane tooling-auditor** (dung vet S153-B4: 2 nguon khuon da nhau ⇒ diary NHUONG tooling). Tao **khong tu nang cap 20480** — doi-thuoc-thay-vi-doi-vat = Goodhart, va so = quyen owner |
| **B6** | ③ archive HANG LOAT 9 vai vuot 17,1K | **BAC — gop vao A1** | De-xuat 9 action theo mot thuoc **chua duoc owner phe + chua co key + chua dinh-nghia (17.100 hay 17.510?)** = tu-Goodhart: nen theo thuoc may khong soi roi bao "da xu ly 9 vai". Dung thu-tu = **quyet thuoc TRUOC (A1), roi moi ban toi nen** |
| **B7** | ③ archive `tooling-auditor` 23.464 = 91,66% autoinject · `frontend-designer` 21.492 · `implementer-backend` 21.987 | **BAC — chua du trigger** | (a) tooling: S154 B1 da bac vi `memory-archive-gate.ps1:205` **tu dat luat** *propose only after 2 consecutive over-cap*; vai nay **0 over-cap, strike 0** ⇒ de-xuat bay gio = dung nguong rieng de nguong may = **lan quyen dat-so owner**. Do lai: **23.464 = byte-Y-HET S154** ⇒ **0 su-kien moi** de lat lai. (b) fd/impl-be: tripwire cua chinh tao @S151 = hanh-dong khi headroom < **3.070 B**; nay con **4.108 B** / **3.613 B** ⇒ chua cham. fd con **dong bang** (mtime 2026-07-01, 27 ngay, 0 growth) |
| **B8** | **S12** `pull_warn_days` vang key ma reader song `nhip-no-probe.ps1:212/:214` | **BAC + NHUONG** | Doi-tuong = **config script**, khong phai agent-memory corpus ⇒ **lane tooling-auditor**. Va chinh eval khai *"da ghi vong truoc, VAN MO"* ⇒ dung ca **CHOT-DUNG** ⇒ leo-thang, cam de-xuat lan 2. Tien-le cung class da dong @S153 (budget `:8` `_session_ctx_kb_reader`) |
| **B9** | Lop ① **reinject = 0 action** va lop ④ **distill = 0 action** | **BAC CO LY DO (khong bia cho du 4 lop)** | ①: `reinject-ledger.md` **that su 0 dong** tu S95; de neo 1 reinject phai co phep do **per-item-L1-presence** — chinh ledger `:50` **tu khai day la BUILD-GAP, PARTIAL**; eval S1..S18 **khong co so nao** do presence-per-item ⇒ neo bang gi cung la bia ⇒ **fail-closed dung lop nay**. Ung-vien tao dao duoc (diary tao thieu S144+S154) la **build-gap** (`:12`: chua-tung-dung ≠ floor-rot) ⇒ cam vao ledger. ④: truc distill **HEALTHY** (`pending=15/nguong=15 => IM`, dung bien); ung-vien ④ dang gia duy nhat (`_INDEX` cicd) **bi chot-dung khoa** ⇒ E1. Bia them viec chi de du 4 lop = **nghi-thuc rong** |

## NHUONG — khong phai turf tao
- **S1 · S2 · ve headroom cua S9** (headroom 174.463 < target 210.000 · hotload +20.294 B) ⇒ **`lead-gap-auditor`** (no da raise `gap-underfill`) — KHONG de-xuat chong.
- **`gap-incident-unrecorded` (so #53)** ⇒ turf `lead-gap-auditor`.
- **S18** `run-chua-gom 3` ⇒ **H2 `harvest-curator`** · **S17** detector TOTAL 44 khong baseline ⇒ **tooling** · **S14** truc TUOI 0/6 may ⇒ **tooling + owner** · **S15** MFE khong chay ⇒ khong co so, khong phan.
- **S5/S6** diary-0-delta 2 sub phien nay ⇒ lead da tu nhan M9 seed on-behalf trong `run.md`.

## Caveat tu khai
1. **read-only = thieu-tool, KHONG sandbox** — tao van co Bash va DA GHI dung **1 file**: `runs/2026-07-28-S158-bookend-close/harness-refine-return.md` (chong #53). **0 file corpus / 0 config bi cham.** Lead soat `git status` sau luot.
2. **De-xuat ≠ da-lam.** A1 propose-only, owner-gated.
3. **KHONG do lai instrument.** So tao dua ra = `wc -c` / `grep -c` / `git show | wc -c` de **XAC-MINH mo-neo** + cong-tru; moc ~2026-08-09 la **phep chieu so-hoc**, khong phai phep do.
4. **Tu-soi:** diary tao **mat 2/5 vong** (S144, S154) ⇒ vong nay phai doc lai 5 return cu moi biet minh da de-xuat gi. Chinh la trieu-chung cua **E2**.

`END · TOTAL=1 ACTION`
