Files
solution-erp/.claude/workflows/runs/2026-07-16-S129-adap-errata-16-07/spec-review-errata-16-07.md
2026-07-16 22:51:50 +07:00

41 lines
5.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# spec-review — REVIEW độc-lập adap 2 errata 16-07 (Harness-9 workflow-2 · S129)
> 2 lane reviewer READ-ONLY + PROPOSE-only: cấm Edit/Write ngoài `sub-reviewer-<i>.md` của MÌNH trong run-dir này. Mọi phán-quyết = TỰ ĐO từ đĩa (sub-file là ĐỐI-TƯỢNG review, không phải nguồn tin). Ghi full-detail vào sub-file TRONG LÚC LÀM (chống garble #53 — implement vừa dính ×2). Dòng-1 sub-file = `VERDICT: GO / GO-WITH-FIXES / NO-GO`. Return 4-field NHỎ.
## PACK (memory-slice — đọc trước khi làm)
1. gotcha#30: `.ps1` pure-ASCII — grade diff phải check ASCII.
2. Citation-trap use⟂mention (mark RC-...17-23-10): file NÓI VỀ pattern cấm ≠ file DÙNG nó — đừng flag mention-site.
3. Đọc CR = BYTE-level (`[IO.File]::ReadAllBytes`); Get-Content (cả -Raw) drop CR = vacuous. PS5.1 `Set-Content -Encoding UTF8` ghi BOM; `[IO.File]::WriteAllText` default UTF8-no-BOM — đổi writer = đổi byte đầu file ⇒ PHẢI check reader-side trước khi GO.
4. 188 file `i/lf w/crlf` repo-wide = INFORM-only by-design (131 EF Migrations) — cấm đề-xuất mass-fix.
5. S121 W0.6: CRLF-fatality REFUTED tại SE (scope agents/ + 1 win32 build) — eol-check = HYGIENE exit-0, đừng nâng thành fatal-gate.
6. Bẫy `grep -c` đếm DÒNG vs `grep -o | wc -l` đếm occurrence (mega-line).
7. Meta-count class (S119): con-số tổng phải TỰ ĐẾM LẠI — discrepancy 39-vs-40 đang treo.
8. Đổi writer/hằng-số = grep MỌI consumer cùng commit (S87).
9. Review từng bắt honesty-PRESENTATION gap (S81) — soi cả CÁCH KỂ.
10. Return 4-field: findings · checklistEvidence · subMdPath · memoryDelta{task,verdict,learned,surprise}.
## Bối-cảnh
- Đối-tượng: run-dir `2026-07-16-S129-adap-errata-16-07``implement-synthesis.md` + `sub-investigator-codebase-{0,1,2}.md`. 🔴 sub-0/sub-1 = **ON-BEHALF transcript** (lane không tự ghi — em-main chép VERBATIM từ journal); sub-2 = lane tự ghi.
- Nguồn broadcast: `broadcasts/inbox/2026-07-16-Governance-erratum-eol-metric-hai-chieu-va-bon-lo-moi.md` (erratum) + `broadcasts/inbox/2026-07-16-Governance-tong-hop-loi-da-bat-va-sua-bay-lop-sau-phep-thu.md` (compendium).
- Journal implement (cho integrity-check): `C:/Users/pqhuy/.claude/projects/D--Dropbox-CONG-VIEC-SOLUTION-SOLUTION-ERP/a4febe5b-cfe6-4f95-8764-5df97dff3ad7/subagents/workflows/wf_3fccd7d1-b63/journal.jsonl` (đọc bằng python utf-8).
## §R0 — RE-VERIFY T0+T1 + grade 2 diff-proposal (ghi `sub-reviewer-0.md`)
Tự đo lại, dán lệnh + output:
- (a) **Sweep-hole-hunt:** grep độc-lập góc KHÁC T0 — `git grep -n "ls-files --eol"` trên *.ps1 *.md *.js *.yml + `git grep -n "git push"` — phân use⟂mention; verdict T0-claim "0 defect site / 8 graded" ĐỨNG/ĐỔ.
- (b) `git ls-files --eol | grep 'i/-text' | grep -v 'attr/-text'` → phải 0; đếm tổng i/-text.
- (c) `.mfe-state.json`: `git ls-files --eol .claude/agent-memory/.mfe-state.json``i/lf w/crlf`? `git status --porcelain` file đó rỗng? Đếm CR thật bằng byte-read/python (KHÔNG Get-Content).
- (d) `.gitattributes`: `git log --format='%h %cI' --follow -- .gitattributes` — xác-nhận 92de58f = class-wide landing 2026-07-15 vs 08c7036 = first-touch 2026-06-15 (xem nội-dung từng bản bằng `git show SHA:.gitattributes`).
- (e) `session-end.md` khối push §5.0/§5.2: xác-nhận so-SỐ if/then/else + eol-check exit-0 INFORM (không chain vào push).
- (f) **GRADE P1** (đề-xuất đổi `mfe-eval.ps1:204` Set-Content → WriteAllText LF): đọc quanh :204 + grep MỌI reader của `.mfe-state.json` toàn repo → BOM-risk reader-side (PACK-3)? Lợi-ích (xoá churn worktree) có đáng không? → GO (kèm diff ASCII chính-xác từng dòng) / NO-GO / DEFER + lý-do.
- (g) **GRADE P2** (1 câu ASCII vào header `agent-frontmatter-eol-check.ps1` block "WHY IT STILL EXISTS" :25-31 — khai W0.6 = EOL-only A/B, chống over-read trục-quote): đúng chỗ? có mâu-thuẫn severity-ladder/refutation-scope không? → GO (kèm câu + vị-trí dòng chèn) / NO-GO.
Return findings = verdict tổng + per-probe ĐỨNG/ĐỔ + per-diff GO/NO-GO; checklistEvidence = số đo (a)-(g) 1-dòng-mỗi-mục.
## §R1 — ADVERSARIAL T2 + integrity + nail discrepancy (ghi `sub-reviewer-1.md`)
- (a) **Spot-check 4 evidence-cite** của sub-2 bảng-A từ đĩa: `governance-detectors.ps1:598-601` Test-Quoted đúng dòng? `crystallized-backfill.ps1:25` đúng chữ "convention, NOT measured"? `memory-budget.json` harness_floor note RETIRED? `ACTIVE-MARKS.md:25` "fault-inject 4 bộ, 24/24"? — cite lệch dòng/chữ = FLAG.
- (b) **Adversarial refute "7/7 ADOPTED · 0 GAP ẩn":** tìm lớp nào evidence = lesson-trong-MEMORY mà KHÔNG có cổng-máy (S122: lesson-trong-context KHÔNG tự bật; memory ≠ enforcement) → hạ nấc + nói thẳng. Soi riêng lớp-1 lập-luận "N/A-by-design" — hợp-lệ hay Goodhart rời-tập-đo?
- (c) **Quick-test integrity:** re-run rẻ nhất 1 test (Test-Quoted locate + :745 use-site); soi output 2 test kia có dấu-hiệu bịa không (archive-gate "251 resolved 251" · eol-check "FmCr=4" — plausible vs codebase?).
- (d) **Nail 39-vs-40:** T0 nói scoped-set 40 file, T2 eol-check in 39 (15+18+6). Tự đếm: `git ls-files '.claude/agents/*.md'` + commands + skills SKILL.md; chú-ý eol-check glob agents/*.md KHÔNG recurse + README.md IN-scope (:67-69) — nguồn lệch 1 = gì, số ĐÚNG = gì, bên nào đếm sai.
- (e) **On-behalf integrity:** đối-chiếu 2-3 đoạn sub-0/sub-1 vs journal.jsonl (path ở §Bối-cảnh) — verbatim? marker đủ rõ?
- (f) **Omission-hunt:** erratum §"Bạn phải làm gì" 5 điểm — điểm nào CHƯA lane nào chạm? Compendium có §4/§5/§6 mà T2 bỏ sót không (đọc TRỌN nguồn)? T2 khai map-only có chỗ nào thực ra PHẢI chạy?
Return findings = verdict + FLAG-list (mỗi FLAG 1 dòng file:line); checklistEvidence = (a)-(f) 1-dòng-mỗi-mục.