完成 Agent 深模块重构及评审修复 - #245
Merged
Merged
Conversation
…ion/reconciliation 三模块 (#197) - reconciliation 吸收 worker promise 包装并导出默认 runner 工厂 - compaction 吸收 compaction runner 与 storage 物理检查 - 删除 maintenance facade,业务库读取绑定移至 IPC 注册处 - 两个 worker 入口因 rollup 独立 input 约束保留,仅改类型导入来源 - runner/storage 行为测试随代码迁入对应模块测试文件,行为零变更 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 新增 skill-catalog 作为唯一公开入口:规范目录解析(默认铺 Built-in 与 用户 Global 目录)、Scene 曝光谓词组合、Conversation Skill Snapshot 捕获、运行时视图与 CRUD/视图再导出 - 快照捕获组合从快照持久化模块移入 catalog,持久化职责不变 - source label 映射与 isGlobalSkillSourceKind 收敛为 skill-sources 单份, 删除 skill-manager/cdf-skills-runtime/context-aggregator/命令收集器四份拷贝 (收敛副产品:enterprise 来源统一为 'Managed Skill',该来源无生产接线) - 迁移 8 个消费方到 catalog 接口:运行时装配、上下文聚合、快照捕获、 IPC 处理器、Agent 工具、Scene 曝光策略、命令注册与 Skill 收集器 - 命令收集器测试改在 catalog seam 上 mock;新增 catalog 谓词组合专属测试 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 新增 flow-diagram-document-store:原子 CAS 替换、路径限域、写边界场景 校验、按 Project 写串行化、SOURCE_CHANGED 冲突附带当前内容 - 编辑器 autosave 从通用 fs:writeFile 的读-比-写 CAS(非原子,有 TOCTOU 窗口)迁移到 flow-diagram:save-document 专用 IPC,落盘改为 temp+rename 原子发布;冲突时立即保留用户未保存内容进既有冲突横幅 - 通用文件写入删除 expectedContent CAS 参数(编辑器是唯一消费方) - service 的原子替换/路径解析/哈希原语移入存储,service 只保留动作编排; 工具动作集、结果与错误码不变(ADR-0071/0072 决策不变) - 新增存储并发场景测试:CAS 冲突返回当前内容、并发写串行化、无残留 临时文件、无效场景不落盘;stale-autosave 集成用例迁至存储 seam Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
编辑器写路径已改走 flow-diagram:save-document,参数形状与原 fs.writeFile CAS 版本一致,mock 复用、断言不变。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…模块族 (#201) - ~130 行 delegatedRuntimeAdapter 闭包从装配文件抽为显式工厂,父→子 继承契约收敛为 DelegatedParentContext 窄接口:审批模式(ADR-0063)、 工具 scope 收窄基线(ADR-0062)、Conversation Skill Snapshot 传播、 模型选择输入、文件系统限域与会话标识 - coordinator ↔ adapter 的闭包延迟绑定改为 resolveApprovalCoordinator 延迟解析注入;韧性中间件工厂由装配层传入,无运行时循环依赖 - 图构建 / MCP 装载 / 内建工具 / 装配为可注入执行依赖,生产默认真实实现 - 新增工厂接缝单测:scope 只收窄、快照排除 MCP、Skill 预载 ⊆ 快照、 每次运行独立 graph/checkpointer、结构化结果解析与中断失败路径 - 为 delegated-run-failure 失败分类补专属单测(原无测试) - 行为零变更;parallel-delegated-runtime 与 delegated contract 集成测试全绿 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 抽出 FLOW_DIAGRAM_SOURCE_CHANGED 常量取代两次裸 'SOURCE_CHANGED' 字面量 比较(消除 FlowDiagramEditor 与文档存储间的 Primitive Obsession) - 编辑器消费文档存储冲突返回的 currentContent:把磁盘 CAS 基线重定位到 外部当前内容,避免下一次保存重复触发同一个不可见冲突(落地此前未消费 的 Speculative Generality 字段) - 为 delegated-runtime-adapter 注入 resolveInterruptOn 执行依赖,补 ADR-0063 审批模式继承锚点测试:strict/agent_decides/bypass 三种父模式均断言子门控 由父模式解析,堵住"门控回归无法归因到结构改动还是模式"的缺口 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
content + version契约,删除手写磁盘镜像、Promise 保存队列和通用 fs reload 协调。原因与影响
这组改动完成 #198、#200、#201 的架构重构,并落实后续代码审查产生的 #238~#244。根因主要是模块边界过浅、Flow Diagram 一致性状态跨 main/renderer 重复维护,以及平台路径语义与可访问性交互缺少明确测试。完成后,高权限文件操作和一致性规则集中在 main Store,renderer 只维护当前未保存内容与不透明版本,相关安全与交互行为均有回归测试覆盖。
验证
pnpm run typecheckpnpm test:199 个测试文件通过,1928 个测试通过,1 个跳过pnpm run buildgit diff --check关联并完成:#198、#200、#201、#238、#239、#240、#241、#242、#243、#244