Repository navigation
fix(workbench): bound test waits and await specific Git results - #2436
Merged
xiaoyumuxi merged 7 commits intoNov 26, 2026
Merged
Conversation
…ded-workbench-tests
This was referenced Nov 26, 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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
工作台 Git 测试为了点击引用、打开菜单和读取某个操作结果,会先等待整个 App 的后台任务。旧
settle()没有本地期限;六轮或十二轮刷新只能限制次数,不能限制每一轮等待。main 与 #2420 的同机对照均超过累计 180 秒,因此这是独立的测试基础设施问题。改动 / Changes
wait()的阻塞语义,不增加辅助等待 goroutine。取消等待不取消工作,归零后立即复用不会让旧等待者错过完成。settle()与六轮刷新共用现有gitTimeout三十秒本地期限;fixture 清理限八秒,并输出 running/queued/closing/branchBusy。普通条件等待仍限八秒。sendClick/sendNamed。引用选择、菜单和公共分支 fixture 使用具体状态等待,通用click保留六轮刷新语义。settleUntil改为窗口唤醒事件驱动的条件等待,支持超过十二个后台回合的合法任务链。branchOperationTimeout(三十秒);先等待结果,再用真实 Git 断言,避免在等待条件内重复启动 Git。shared.generated.go的对齐;忽略空白后的差异为空,翻译内容未改变。此项保留独立提交。不在本 PR 范围内 / Out of scope
#2424 的折行绘制性能由 #2427 单独修复。此分支不包含 #2420 彩虹功能,不升级 Core/Viva,也不等待 Core #201 或 Viva #60;两者仍由 #2420 跟进。未重写生产 Git 查询、监听或调度行为。
类型专属:fix
复现与根因
git blame将旧settle()定位到本地历史边界818cdd428,十二轮 helper 来自既有构建设置测试;这不是彩虹分支引入的变更,不将历史边界误记为首次引入提交。检查项
TestLogReferenceSelectionDoesNotWaitForUnrelatedTask与TestHarnessPredicateWaitFollowsMoreThanTwelveTurns:恢复旧 helper 的 overlay 两项均失败;修复后连续三次通过。.agents/notes/implemented/bug-fix/2026-11-26-workbench-test-wait-boundaries.md。范围检查 / Scope checks
功能矩阵 / Feature matrix
git-branches-remotes.json两端同步器与 harness 证据及具体验证流程;原生验收状态仍 pending。插件归属 / Plugin ownership
UI 验证 / UI evidence
N/A:未修改产品布局、文案、视觉或交互逻辑;测试继续通过 Viva 无头输入路径验证现有行为。
统一日志系统 / Structured logging
N/A:未修改用户操作终态或产品错误处理;新增诊断只输出到测试失败信息。旧日志门禁尚未恢复,不宣称该门禁通过。
界面文案 / i18n
node scripts/i18n/generate-i18n.mjs,不是手改生成文件。git diff -w为空。逻辑归属 / Logic placement
N/A:没有新增业务规则或契约;
taskGroup只同步 Viva 宿主的 Go goroutine 与测试等待,继续留在平台工作队列边界。性能与内存 / Performance and memory
await原先在无限等待的点击之后才计时,不能把它误称为完整操作原有上限。设置 / Settings
N/A:无设置项或配置来源变更。
插件契约 / Plugin contract
N/A:不改契约、SDK、宿主方法或固定依赖。
发行包与资源 / Bundle and resources
N/A:没有资源、缓存或写入路径变化;本机缺少 zsh,资源只读脚本由标准 CI 执行。
无用代码与重构 / Dead code and refactoring
验证 / Verification
-count=3-race -count=1 -timeout=180s:taskGroup、harness、IDE API、关闭项目/窗口/bin/sh用例跳过,35.447 s,无竞态-count=10scripts/desktop/check.sh349f389ba精确 Go 源码 overlay计时补充:首轮把十项真实 Git 用例与链接放入同一个 180 秒运行器,在最后一项尚只运行约 1.7 秒时达到累计期限;已完成项均通过。该轮保留为失败记录,随后按公共分支、删除、提交三个范围分别计时,仍使用同一 180 秒期限和真实数据,没有增加套件预算。首轮运行器没有确认 taskkill 结果,随后本机进程枚举确认该轮 Go、工作台测试与 Git 子进程均已退出。
未能执行的检查和原因: 本机是原生物理 Windows,非 Parallels;macOS/Linux 本地测试和原生可见窗口流程未执行。资源只读脚本需要本机缺少的 zsh,交由标准 CI;没有资源路径变化。完整工作台仍受既有失败和累计期限影响,以上定向通过不等于全包通过。
计时 HTML/JUnit:
.artifacts/fix-2425/final-timing/index.html(31 项独立汇总)以及fix-2425-fast-final/common/delete/commit对应 JSON。31 项最终结果全通过;父测试已包含子测试,不相加作为墙钟时间。首次累计期限失败保留在.artifacts/fix-2425/timing-first/,不冒充通过。边界: 等待取消只停止当前等待;清理仍取消项目资源并有界等待。它不能强制终止不响应取消的任意后台实现;失败会明确报告剩余任务,不宣称强制回收。Windows 的
/bin/sh专属用例按原条件跳过,不等于该平台执行过这些流程。提交前确认 / Final checks
upstream/main 349f389ba创建,后续 merge 最新14a4bb241;目标 main,与 fix(editor): 深滚动自动换行只遍历可见折行 #2427 相互独立。