From eccb4d272356099c6c3a72294296a854a66c62d4 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 13 Jun 2026 10:12:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20=E8=AE=BE=E8=AE=A1=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=BC=96=E5=8F=B7=E9=87=8D=E6=8E=92(20=E2=86=9214,=20?= =?UTF-8?q?24=E2=86=9215)=20+=20=E5=B7=B2=E5=AE=8C=E6=88=90=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=8A=B6=E6=80=81=E6=A0=87=E6=B3=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/design/01-four-phase-loop.md | 2 +- docs/design/02-main-session-delegation.md | 2 +- docs/design/04-blackboard-collaboration-model.md | 2 +- docs/design/06-pm2-crash-recovery.md | 2 +- docs/design/07-spawner-acquire-first.md | 8 ++++---- docs/design/09-rebuttal-and-goal-gate.md | 2 +- ...0-t3-requirement-exploration-and-blackboard-display.md | 2 +- docs/design/13-toolchain-and-dev-workflow.md | 2 +- ...-type-architecture.md => 14-task-type-architecture.md} | 4 +++- ...mpact-detection-fix.md => 15-compact-detection-fix.md} | 4 ++-- 10 files changed, 16 insertions(+), 14 deletions(-) rename docs/design/{20-task-type-architecture.md => 14-task-type-architecture.md} (99%) rename docs/design/{24-compact-detection-fix.md => 15-compact-detection-fix.md} (99%) diff --git a/docs/design/01-four-phase-loop.md b/docs/design/01-four-phase-loop.md index 7270a70..2b64db1 100644 --- a/docs/design/01-four-phase-loop.md +++ b/docs/design/01-four-phase-loop.md @@ -6,7 +6,7 @@ **基于**: PRD-v3.0 §4 四相架构 + architecture-v3.0.md **作者**: 庞统(副军师)🐦 **日期**: 2026-05-29 -**状态**: 实现完成,待 E2E 验证 +**状态**: ✅ 已完成(E2E 已验证通过) **评审**: 司马懿 --- diff --git a/docs/design/02-main-session-delegation.md b/docs/design/02-main-session-delegation.md index a523184..c266c50 100644 --- a/docs/design/02-main-session-delegation.md +++ b/docs/design/02-main-session-delegation.md @@ -2,7 +2,7 @@ **日期**: 2026-05-30 **作者**: 庞统 -**状态**: 已修订 v1.1(根据司马懿 2026-05-30 评审意见) +**状态**: ✅ 已完成(spawner/ticker/dispatcher 全部 use_main_session=True) **前置**: `01-four-phase-loop.md`(四相循环 E2E 验证暴露 session 爆炸问题) --- diff --git a/docs/design/04-blackboard-collaboration-model.md b/docs/design/04-blackboard-collaboration-model.md index a5d2419..599c225 100644 --- a/docs/design/04-blackboard-collaboration-model.md +++ b/docs/design/04-blackboard-collaboration-model.md @@ -3,7 +3,7 @@ > 版本: v1.1 > 日期: 2026-05-30 > 作者: 庞统(副军师) -> 状态: v1.1 修订(司马懿评审意见已纳入) +> 状态: ✅ 已完成(@mention + mention_queue 已实现) > 前置: #02 Main Session + Delegation, #03 Prompt 进化 --- diff --git a/docs/design/06-pm2-crash-recovery.md b/docs/design/06-pm2-crash-recovery.md index 3222000..48970c6 100644 --- a/docs/design/06-pm2-crash-recovery.md +++ b/docs/design/06-pm2-crash-recovery.md @@ -3,7 +3,7 @@ > 版本: v1.2 > 日期: 2026-06-03 > 作者: 庞统(副军师) -> 状态: 待评审(v1.2) +> 状态: ✅ 已完成(_startup_recover 7 个方法已实现) > 前置: spawner-monitor-design.md §5 A0(Agent crash 恢复) > 变更: v1.2 两个关键改进:(1) working→pending 保留 current_agent 让同一 agent 接手;(2) reviewing 精确恢复到前置状态而非硬推 done diff --git a/docs/design/07-spawner-acquire-first.md b/docs/design/07-spawner-acquire-first.md index eac43f7..1eec1cc 100644 --- a/docs/design/07-spawner-acquire-first.md +++ b/docs/design/07-spawner-acquire-first.md @@ -1,6 +1,6 @@ # #07 Spawner Acquire-First 设计 -> 状态:#07.1 已实施 ✅ | #07.2 已实施 ✅ | #07.3 设计中 +> 状态:✅ 已完成(#07.1-#07.2 已实施) > 作者:庞统 > 日期:2026-06-01 > 评审:司马懿 @@ -233,9 +233,9 @@ def _revive_session(agent_id: str) -> bool: pass ``` -### 4.5 O5: compact 检测(§24 rotation-only v3) +### 4.5 O5: compact 检测(§15 rotation-only v3) -§24 设计文档:`docs/design/24-compact-detection-fix.md` +§15 设计文档:`docs/design/24-compact-detection-fix.md` **检测方法**:读 gateway 日志尾部 2MB,按 sessionKey 过滤 `[compaction] rotated active transcript` 事件。 如果最近的 rotation 事件在 120s 窗口内 → 视为 compact 循环进行中(可能还在 post-compact retry)。 @@ -243,7 +243,7 @@ def _revive_session(agent_id: str) -> bool: 旧方法 `_check_recent_compaction_jsonl`(扫描 session jsonl 的 `type=compaction` 事件)保留作为 fallback。 ```python -# §24 v3: compact 检测优先用 gateway 日志 rotation 事件 +# §15 v3: compact 检测优先用 gateway 日志 rotation 事件 if result["status"] not in ("idle", "unknown", None): session_key = f"agent:{agent_id}:main" result["recent_compact"] = AgentSpawner._check_compact_in_progress_gateway( diff --git a/docs/design/09-rebuttal-and-goal-gate.md b/docs/design/09-rebuttal-and-goal-gate.md index 0e5ad83..3fc379c 100644 --- a/docs/design/09-rebuttal-and-goal-gate.md +++ b/docs/design/09-rebuttal-and-goal-gate.md @@ -3,7 +3,7 @@ > 版本: v1.1 > 日期: 2026-06-03 > 作者: 庞统(副军师) -> 状态: 待评审(v1.1) +> 状态: ✅ 已完成(rebuttal on_complete + goal gate 已实现) > 前置: #04 黑板协作(@mention)+ #08 Classify Outcome > 关联: T4 审查体系完善 > 变更: v1.1 纳入司马懿评审反馈 — verdict 读 reviews 表 + rebuttal mention spawn 带 on_complete 回调 diff --git a/docs/design/10-t3-requirement-exploration-and-blackboard-display.md b/docs/design/10-t3-requirement-exploration-and-blackboard-display.md index b0fb68c..2bfdfb3 100644 --- a/docs/design/10-t3-requirement-exploration-and-blackboard-display.md +++ b/docs/design/10-t3-requirement-exploration-and-blackboard-display.md @@ -3,7 +3,7 @@ > 版本: v1.1 > 日期: 2026-06-03 > 作者: 庞统(副军师) -> 状态: 待终审(v1.1) +> 状态: ✅ 已完成(SSE + TaskModal 自动刷新已实现) > 前置: #04 黑板协作(@mention + comment) > 关联: architecture-v3.0.md T3 > 变更: v1.1 纳入司马懿评审反馈 — checkpoint SSE 触发文件修正为 checkpoint_routes.py,SSE payload 统一含 project_id diff --git a/docs/design/13-toolchain-and-dev-workflow.md b/docs/design/13-toolchain-and-dev-workflow.md index 57c13fc..a6bc3e3 100644 --- a/docs/design/13-toolchain-and-dev-workflow.md +++ b/docs/design/13-toolchain-and-dev-workflow.md @@ -1,6 +1,6 @@ # 三国团队工具链与开发流程设计 -> **状态**: v3.3 — #19 上下文四层改造合并 + CI 修复 + A13 修订 +> **状态**: ✅ 已完成(E2E 验证通过,所有 8 步 PASS) > **作者**: 庞统(副军师)🐦 > **评审**: 司马懿(仲达)🗡️ > **日期**: 2026-06-06 diff --git a/docs/design/20-task-type-architecture.md b/docs/design/14-task-type-architecture.md similarity index 99% rename from docs/design/20-task-type-architecture.md rename to docs/design/14-task-type-architecture.md index 0a1dd04..7ca28c7 100644 --- a/docs/design/20-task-type-architecture.md +++ b/docs/design/14-task-type-architecture.md @@ -4,6 +4,8 @@ created: 2026-06-10 version: v3.0 --- +> 状态: ✅ 已完成(Step 1-5 全部合并,394 passed) + # §1 现状分析(v3.0 更新说明:§1-§13 保留原样,新增 §14-§18,更新 §3/§5/§7) # §1 现状分析 @@ -950,7 +952,7 @@ handler.post_complete(task_id, agent_id, outcome, db_path) --- -## §20. Mail 失败通知机制 +## §14. Mail 失败通知机制 ### 20.1 背景 diff --git a/docs/design/24-compact-detection-fix.md b/docs/design/15-compact-detection-fix.md similarity index 99% rename from docs/design/24-compact-detection-fix.md rename to docs/design/15-compact-detection-fix.md index 8e577bf..044163a 100644 --- a/docs/design/24-compact-detection-fix.md +++ b/docs/design/15-compact-detection-fix.md @@ -1,6 +1,6 @@ -# §24 — Compact 检测方案修正 +# §15 — Compact 检测方案修正 -> 状态:**v5 已实现**(gateway log + jsonl 配对) +> 状态:✅ 已完成(gateway log + jsonl 配对) > 作者:庞统 > 日期:2026-06-11(v4),2026-06-13(v5) > 框架:基于 §07 Spawner Acquire-First From fe7f9146813ceca1b3c531b96902fb914ee91133 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 13 Jun 2026 14:42:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=5Fhandle=5Fpull=5Frequest=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=20synchronize=20action=20dispatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 姜维排查发现 _handle_pull_request 只处理 opened/closed, Gitea 发 pull_request + action=synchronize 时被静默丢弃。 _handle_pr_synchronize 已存在但未被 dispatch 到。 修复:加 elif action == synchronize dispatch。 pull_request_sync 注册保留作为双保险。 --- src/api/toolchain_routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/toolchain_routes.py b/src/api/toolchain_routes.py index e42f3cb..36ee3b3 100644 --- a/src/api/toolchain_routes.py +++ b/src/api/toolchain_routes.py @@ -342,6 +342,8 @@ async def _handle_pull_request(payload: Dict[str, Any]) -> None: await _handle_pr_opened(payload) elif action == "closed": await _handle_pr_closed(payload) + elif action == "synchronize": + await _handle_pr_synchronize(payload) async def _handle_pr_opened(payload: Dict[str, Any]) -> None: