[CLAUDE] Docs: closeout OUTWARD wave adap đợt-9/10 + vá drift skill-matrix H24
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m43s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m43s
Closeout 4 mục OUTWARD của wave S141-S142 (anh gật @S143): - adap-report 7/7 thư, đủ 5 trường REPORT-FORMAT LOCK, evidence đo thật - email hub báo-nấc (sha 6c94873f72e0, selftest_verify exit 0, log _index cùng lượt) - STAGE-2: 7 thư -> inbox/ai_infra/, _index 0 pending, cross-check 7/7 - squash K=8 wal: -> commit chốt Ngoài wave: agents/README skill-matrix thiếu 2 row H24 (drift S121) -> 15/17 thành 17/17. Nấc cao nhất khai được = executed-file/verified-pending-restart (trio CHƯA spawn). 2 phát hiện khai thẳng theo G-015 (chi tiết trong report + email): - whitelist `tools:` KHÔNG chặn ghi ở runtime: 6 vai read-only bị append Write+Edit - pull-lag do "watch broadcasts/inbox" canh nhầm chỗ TICK H24: counter 16->17 (S143), 3-điều-kiện OK-reachable, không fail-loud. Detector TOTAL 46 == baseline 46, 0 flag mới. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -14,7 +14,14 @@ argument-hint: <from_project | all>
|
||||
1. Validate `$1`.
|
||||
2. READ `<from>/broadcasts/outbox/se/*.md` (message gửi cho se).
|
||||
3. Mỗi file CHƯA có trong inbox (so id): **COPY VERBATIM** → `broadcasts/inbox/<id>.md` (**root = pending**). [repo MÌNH §J2]
|
||||
4. **Verify đối chứng:** (a) **whole-file** `Get-FileHash` copy == nguồn (byte-identical = tuyến CHÍNH); (b) **body** recompute `SHA256(body)` == `content_sha256`, body canonical (khớp `AI_INFRA\scripts\stamp_verify.py`): `$txt=[Text.Encoding]::UTF8.GetString([IO.File]::ReadAllBytes($f)) -replace "^\uFEFF",""; (($txt -replace "\r","") -split "(?m)^---\s*$",3)[2] -replace "^\n",""` → SHA256-UTF8. 🔴 **CẤM `Get-Content -Raw` cho hash** — PS 5.1 đọc UTF-8-no-BOM bằng ANSI → mojibake → **false-tamper** (S125). ✗ → **nghi VERIFIER TRƯỚC** (đối chứng `python <AI_INFRA>\scripts\stamp_verify.py <file>` + test 1 sibling known-good; verifier fail cả sibling ⇒ lỗi tool, KHÔNG phải tamper); vẫn ✗ → **flag tamper, KHÔNG move**, báo anh.
|
||||
4. **Verify đối chứng:** (a) **whole-file** `Get-FileHash` copy == nguồn (byte-identical = tuyến CHÍNH); (b) **body** recompute `SHA256(body)` == `content_sha256` khai ở frontmatter.
|
||||
|
||||
**4(b) — đầu-đọc stamp KHOAN-DUNG (adopt S141, ghim S142):**
|
||||
- 🔴 **ƯU TIÊN chạy SCRIPT, đừng tự chế lệnh rút hash:** `python scripts/stamp_verify.py <file>` — **bản port LOCAL trong repo này** (KHÔNG trỏ hub-path `AI_INFRA/scripts/...` nữa; hub-path chỉ còn là nguồn **re-pull** khi hub đổi §N canon). Script in `declared / canonical / no-strip` + verdict; **exit 0 = OK**, exit 1 = có MISMATCH. Nó còn tách được `WRONG-METHOD` (stamp bằng biến-thể no-strip) khỏi `MISMATCH` thật — thứ mắt thường không phân biệt nổi.
|
||||
- **Rút hash declared — PIN mẫu KHOAN-DUNG:** `content_sha256:\s*"?([0-9a-fA-F]{8,64})"?` — phủ **CẢ 3 dạng đang sống trên đĩa**: (i) **có-ngoặc** `content_sha256: "abc..."` · (ii) **không-ngoặc** `content_sha256: abc...` · (iii) **rút-gọn ≥8-hex** (so bằng **tiền-tố**, KHÔNG đòi bằng độ-dài).
|
||||
- 🔴 **CẤM mẫu quote-strict `content_sha256:\s*([0-9a-fA-F]+)`** — nó **whiff ngay ký-tự `"` đầu tiên** ⇒ hash có-ngoặc rút ra rỗng ⇒ đọc thành "không khớp" ⇒ **FALSE-TAMPER**. Bẫy ĐÃ GẶP, không phải giả-định: S141 suýt kết oan tamper cả ba trên ba thư mà cả ba đều lành. Mẫu chặt hơn ở đây **KHÔNG** an-toàn hơn — nó chỉ đổi lỗi "bỏ sót" thành lỗi "vu oan".
|
||||
- **Body canonical** (khớp ĐÚNG `scripts/stamp_verify.py`): `$txt=[Text.Encoding]::UTF8.GetString([IO.File]::ReadAllBytes($f)) -replace "^\uFEFF",""; (($txt -replace "\r","") -split "(?m)^---\s*$",3)[2] -replace "^\n",""` → SHA256-UTF8. 🔴 **CẤM `Get-Content -Raw` cho hash** — PS 5.1 đọc UTF-8-no-BOM bằng ANSI → mojibake → **false-tamper** (S125).
|
||||
- ✗ → **nghi VERIFIER TRƯỚC** (chạy `python scripts/stamp_verify.py <file>` + test 1 sibling known-good; verifier fail cả sibling ⇒ lỗi tool, KHÔNG phải tamper); vẫn ✗ → **flag tamper, KHÔNG move**, báo anh.
|
||||
5. Log `_index.md` §INBOUND: `received · id · <from> → se · status=pending · folder=(root) · sha256(12) · verify=✓`.
|
||||
|
||||
**STAGE 2 — Xử lý xong → archive (PROCESSED):**
|
||||
|
||||
Reference in New Issue
Block a user