--- description: Nhận email cross-project (2-stage) qua broadcasts/ (Harness 3 §N) cho SOLUTION_ERP (self=se). Verify hash đối chứng. §J2. Adopt AI_INFRA Harness 3 (2026-06-07). argument-hint: --- # /check-email — nhận email cross-project (Harness 3 · self=`se`) > 🔴 Kênh DUY NHẤT (§N) · **pull-copy** chỉ ghi repo MÌNH (§J2). self=`se`. Path map: xem `send-email`. Detail: AI_INFRA `broadcasts/README.md` §Harness 3. ## Tham số - `$1` = from_project (BẮT BUỘC) ∈ 6 others, hoặc `all` = quét cả 6. ## Quy trình 2-STAGE (audit qua folder) **STAGE 1 — Nhận (đọc → inbox root, PENDING):** 1. Validate `$1`. 2. READ `/broadcasts/outbox/se/*.md` (message gửi cho se). 3. Mỗi file CHƯA có trong inbox (so id): **COPY VERBATIM** → `broadcasts/inbox/.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 \scripts\stamp_verify.py ` + 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 · → se · status=pending · folder=(root) · sha256(12) · verify=✓`. **STAGE 2 — Xử lý xong → archive (PROCESSED):** 6. Sau khi xử lý → **MOVE** `inbox/.md` → `inbox//.md`. 7. Update `_index.md`: `status=processed · folder=`. ## Audit (anh) `ls broadcasts/inbox/*.md` (root) = **pending chưa xử lý** (backlog hiện ngay) · `inbox//` = **đã xử lý**. ## Luật 🔴 §N single-channel · 🔴 §J2 pull-copy chỉ-ghi-inbox-MÌNH (KHÔNG push repo bên kia) · **KHÔNG sửa** file copy (bằng chứng) · PHẢI committed · verify-hash trước move.