Skip to content

AGT-00:Agent 运行链路盘点与特征测试 - #261

Draft
tanbro wants to merge 5 commits into
HuangPuStar:refactor/archfrom
tanbro:refactor/arch-agt-00-runtime-baseline
Draft

tanbro wants to merge 5 commits into
HuangPuStar:refactor/archfrom
tanbro:refactor/arch-agt-00-runtime-baseline

Conversation

@tanbro

@tanbro tanbro commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 新增 Agent Runtime 现状提取地图,记录实例创建/复用/停止、ACP relay、LaunchSpec、Environment/Machine/Sandbox、引擎调用、ID 体系、取消/超时、并发与资源释放的真实链路
  • 补齐单轮会话 dispose、OpenAI 流取消和 Scheduler 超时的跨层特征测试,并索引已有 Orchestration、Core 与 Chat 生命周期测试
  • 提供仅供 ARC-02 评审的 AgentRuntimeModuleAgentInstanceStarter 与 LaunchSpec 候选签名,并同步 AGT-00 协作计划进度
  • 不修改生产 Runtime、workspace、SDK、schema、migration 或 CE/EE 架构设计

Test plan

  • bun test src/__tests__/openai-chat-service.test.ts src/__tests__/openai-chat-routes.test.ts src/__tests__/agent-executor.test.ts(21 pass)
  • Orchestration Controller/Instance package tests(22 pass)
  • Core instance-orchestrator package tests(12 pass)
  • Chat SessionChannel cancellation package tests(73 pass)
  • bun run docs:build
  • git diff --check
  • Mermaid 图人工布局检查
  • bun run precheck:当前基线存在 4 条范围外 lint warning,以及 3 项仅在全量运行时失败、单文件运行通过的共享状态污染;证据和影响已记录在 extraction map 第 15 节,需由独立代码任务修复

Review notes

  • 本 PR 是当前实现的行为基线,不冻结 ARC-02 的目标接口。
  • OpenAI stream 当前可能从 cancel()start().finally 两处调用 dispose;测试只保护“取消必须启动清理并结束迭代器”,不将重复次数固化为合同。
  • Chat shared relay 的当前权威键是 instanceId + userId + rcsSessionId;文档同时列出既有陈旧二元描述,未在本任务中顺手修改。

🤖 Generated with Claude Code

yyquiet and others added 5 commits September 7, 2026 15:53
记录实例、会话与 relay 的当前生命周期,并补齐单轮释放、流取消和调度超时特征测试,为后续运行时提取提供可回归证据。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
增加职责边界、启动补偿时序和调用生命周期对比图,帮助后续任务快速理解当前 Runtime 所有权与资源释放路径。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tanbro
tanbro marked this pull request as ready for review September 8, 2026 06:58
@tanbro
tanbro marked this pull request as draft September 8, 2026 07:43
@tanbro

tanbro commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

由于 Core runtime instance 正处于密集重构中,此项工作暂停。

@yyquiet
yyquiet force-pushed the refactor/arch branch 5 times, most recently from 0daf636 to 7fe16e8 Compare September 11, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants