Skip to content

fix(acp): preserve inbound interaction ownership and startup diagnostics - #182

Merged
YoungSx merged 2 commits into
mainfrom
review-recent-changes
Sep 8, 2026
Merged

fix(acp): preserve inbound interaction ownership and startup diagnostics#182
YoungSx merged 2 commits into
mainfrom
review-recent-changes

Conversation

@YoungSx

@YoungSx YoungSx commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

当 ACP 表单无法路由到可显示的会话、必填字段尚未被客户端支持,或旧连接的异步回调晚到时,原实现可能让 Agent 一直等候、发送不完整答案或清掉新表单。此变更统一保留请求实例与连接归属:不可显示的请求明确返回 cancel,未答表单不被替换,成功发送才移除 pending,发送失败仍可重试;会话取消不会作用到复用相同编号的新请求。

同时修正启动诊断与短命令的资源收尾:stdio 预检以结构化事实传入本地化服务,SDK 保留真实错误而不凭空追加 SSH 建议;CLI 版本探测与 macOS 命令注册共用有界进程 runner,并发排空 stdout/stderr,取消或超时后终止进程树、等待退出并观察读取任务。

  • AcpClient 与相关测试:应答互斥、发送失败/取消竞态、断连重连、请求 ID 复用,以及 URL completion 的连接关联、唯一性和去重。
  • Chat 交互 bridge、panel coordinator 与表单 ViewModel:不可显示请求应答、未知必填项禁止提交、语言切换重投影、旧回调不能移除或占用新表单;认证取消不再写入持久错误。
  • Domain/Application/Infrastructure 与本地化资源:传输错误事实和格式化接口,保留无 GUI 调用方的英文兜底。
  • ChatView.xaml、DI、AGENTS.md:现有间距收归命名资源,说明共享命令状态所需的 ViewModel singleton 例外,沉淀交互与进程所有权规则。
  • WASM full-chain smoke:真实 session/new 在途请求级取消、必填字段阻止空提交、字符串/布尔值回包、未知必填项取消,以及表单和三个操作按钮真实移除;最后检查每个请求只有一次响应。
  • browser-app.mjsui-affordances.mjs 与两条持久化 smoke:保存后只读等待 IndexedDB 精确文件记录提交,再刷新检查 UI,替换固定 1.5 秒等待和内存文件判据;不代应用打开数据库、调用 syncfs 或关闭其连接。

本地验证(Linux arm64,.NET SDK 10.0.302 / Uno 6.7.22):

检查 结果
ACP SDK 格式、analyzers、完整测试、打包 544 通过;0 警告 / 0 错误
nupkg 外部 consumer 稳定面运行通过;37 个草案类型拒编;两种文档化抑制通过
Presentation.Core 3346 通过
Infrastructure 813 通过 / 6 跳过
Application / Domain 120 / 125 通过
35 个变更 C# 文件格式验证 通过
Desktop / WASM Release 构建通过;Desktop 0 警告,WASM 3 条既有警告
本次 WASM 产物的浏览器验证 全链路 elicitation、settings persistence 与 capability boundary 通过

共 4948 项测试通过、6 项跳过。新增测试覆盖真实 stdout/stderr 管道、语言资源、传输到 UI 错误通路、表单和取消/重连竞态;多项先确认旧代码失败,其中跨会话 ID 复用的表单/权限/读文件 3 条均已做修复移除→失败→恢复→通过。浏览器直接服务本工作树 SalmonEgg/SalmonEgg/bin/Release/net10.0-browserwasm/wwwroot,使用 Playwright 1.59.1 / Chromium 1217,不使用旧安装或开发服务器缓存。

WASM 保存等待的反向验证:临时把真实 FS.syncfs(false) 延迟 8 秒,旧脚本在界面已退出编辑、内存 YAML 已含新目录但 IndexedDB 尚未提交时刷新,复现目录丢失;新脚本等待数据库提交后,同一场景刷新验证通过。临时延迟仅位于外部验证夹具,未进入产品或正式 smoke。此问题可在慢存储下确定性复现;原 CI 日志缺少存储快照,不能据其单独排除其它同症状原因。

边界:生产仍使用稳定 ACP v1,GUI 仅声明 form 能力,未新增 URL 授权界面。Windows MSIX 真安装和 macOS 授权弹窗未在本机验证;POSIX 命令夹具在 Windows 明确跳过。Uno WASM 再次显示表单时存在提示 TextBlock 未进入语义树的问题(画面可见),此次 smoke 用本轮唯一错误说明及原生表单/按钮节点验证生命周期,不代表完整无障碍验收。WASM 构建仍有 3 条既有 Uno0001 警告。

Refs #146, #164

Cancel undisplayable elicitation, block unsupported required fields, and retain request instances across response retries, session cancellation, reconnects, and reused IDs.

Localize structured stdio preflight errors and share bounded CLI process cleanup. Add protocol, presentation, real-pipe, and browser full-chain regressions.

Refs #146, #164
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
salmonegg Ready Ready Preview Sep 8, 2026 2:07am UTC

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Read the existing IDBFS backing store in a bounded readonly transaction instead of relying on a fixed delay or an in-memory file. Keep the post-reload UI assertions and wait for the directory editor to finish saving.

A real 8-second sync delay reproduces directory loss with the old gate and passes with the persisted-file wait. Full-chain elicitation and settings persistence browser smokes pass against the current Release artifact.
@YoungSx
YoungSx merged commit c1f47fe into main Sep 8, 2026
17 checks passed
@YoungSx
YoungSx deleted the review-recent-changes branch September 8, 2026 06:14
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.

1 participant