[CLAUDE] Docs: S124 adap-wave AI_INFRA + owner worker-tier-pin (14 agent opus+effort:max) + user-memory relocate R6 + H24 dogfood
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m26s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-15 23:17:45 +07:00
parent b764ac791a
commit 23bbe97f39
92 changed files with 2221 additions and 89 deletions

View File

@ -0,0 +1,23 @@
---
name: feedback-agent-kill-recovery
description: External kill (session-limit) / truncation / die-0-byte (resume-kill) of spawned agents → recover via on-disk/prod truth + em-main-solo fallback + curl-self-verify + evidence-checklist self-gate; agent return-message ≠ source-of-truth
metadata:
node_type: memory
type: feedback
originSessionId: 330bbef5-f7e6-4d7f-8d37-7df5ea9f0b04
---
Khi sub-agent bị **kill (session-limit) hoặc truncate (gotcha #53) hoặc die-0-byte (resume-kill) giữa task**, work KHÔNG mất — recover qua source-of-truth THẬT, KHÔNG dựa agent return-message.
**Why:** S52 (2026-06-08) — session-limit kill 3 agent mid-Wave-2 (FE 0-file-ghi, test file-ghi-xong-mất-report, cicd verdict-mất) + Wave-2 BE return truncated ("Now apply to LocalDB..."). TẤT CẢ recoverable vì work nằm trên disk/prod, không trong return-message. 0 việc mất, 0 prod bug. **S57bis (2026-06-11) thêm class #3 "die-0-byte":** 2 reviewer-spawn liên tiếp output-file 0-byte không return gì (quanh user `--resume` — resume-kill); CÙNG session 2 implementer return-truncated mid-task (BE chết trước migration+projection-3, FE chết giữa mirror fe-admin) → em main solo vá cross-stack + tự gate; ship sạch 240 test + prod.
**How to apply:**
- **Agent return = KHÔNG source-of-truth.** Verify THẬT: `git status`/`git diff` (file đã ghi gì) + `dotnet build`/`dotnet test` (compile+pass) + đọc file đã sửa.
- **Killed agent để lại work-on-disk:** file đã ghi + build/test pass → COMPLETE, chỉ mất report/MEMORY-step → em main proxy-append diary next.
- **Agent 0-file (killed sớm)** → em main solo redo (gotcha #53-class boundary fallback, proven S37/S52 FE 2-app SHA256).
- **Die-0-byte detect (S57bis):** `Get-Item <output-file>` size=0 + LastWrite im >5' → coi như chết, ĐỪNG đợi notification. KHÔNG spawn lại >2 lần cùng vai trong session có resume — chuyển fallback.
- **Reviewer-spawn chết ×2 → em main SELF-GATE evidence-checklist** (proven S56 StructuredOutput-fail + S57bis die-0-byte): mỗi điểm hệ trọng = 1 lệnh evidence (grep key-set authz, grep role-string vs AppRoles const, đọc Mig Up/Down) + backstop independent tests; ghi HONEST "self-gate + lý do" vào commit message/log/email — không giấu.
- **cicd-monitor unavailable** → em main **curl-self-verify** prod (health 200 → app booted → mig applied · endpoint 401-wired-not-404 · bundle-hash-rotate) thay spawn.
- **Limit pressure → giảm spawn:** em-main self-review (cross-check ground-truth: seed↔query dept-code, role-string vs AppRoles) thay reviewer-spawn; curl thay cicd-spawn. Đánh đổi: mất adversarial-independence → bù bằng cross-check thủ công + build/test/curl evidence.
Mở rộng [[feedback-implementer-truncation-mitigation]] (self-truncation mid-MEMORY) sang external-kill + resume-kill. Cùng nguyên lý: **git/disk/prod = truth, agent-message = không**.