From c021d7ae39b60423b64271da7542e23c69818706 Mon Sep 17 00:00:00 2001 From: LittleGuo Date: Wed, 14 Oct 2026 15:49:49 +0800 Subject: [PATCH] =?UTF-8?q?docs(memory):=20=E8=AE=B0=E5=BD=95=E5=9F=BA?= =?UTF-8?q?=E5=BA=A7=20TCP=20=E8=B7=AF=E5=BE=84=E7=9A=84=E4=B8=BB=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E9=98=BB=E5=A1=9E=E7=BA=A6=E6=9D=9F=E4=B8=8E=E5=88=86?= =?UTF-8?q?=E5=B8=A7=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai.memory/project_review_agent_impl.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ai.memory/project_review_agent_impl.md b/ai.memory/project_review_agent_impl.md index 46dbda1..d3a8966 100644 --- a/ai.memory/project_review_agent_impl.md +++ b/ai.memory/project_review_agent_impl.md @@ -85,6 +85,13 @@ type: project DLL 代理写锁改为 `ScopedDocumentWriteLock` RAII)。**插件作者无需自行 try/catch**, 但仍不要在异常路径上留下副作用。新增/改动工具后跑 `verify_mcp_fault_injection.py` 回归。 +**同一根因的另一面:阻塞。** 工具响应由 **AutoCAD 主线程**发送 +(`WndProc` → `ExecuteTaskInMainThread` → `SendAll`),所以发送路径也必须有时限—— +`accept` 时同时设了 `SO_RCVTIMEO`/`SO_SNDTIMEO`(各 5s),否则慢客户端能把 CAD 的 UI 线程卡死。 +分帧规则:`\n` 优先,其次「暂时无更多数据、且累积内容已是完整 JSON」(兼容不发 `\n` 的旧客户端); +**不要再引入基于等待时长的分帧判定**(旧的 150ms select 探测会把分片间隔大的大报文误截断)。 +回归脚本:`verify_mcp_tcp_hardening.py`。 + ## 验证结论(2026-10-13 实测通过) - `verify_mcp_frame.py` 4/4 PASS(换行分帧 / >2KB 报文不截断 / string id 原样回显 / 通知不回包 / isError)。