Repository navigation
测试: 放宽 CI 上不够用的终端与 shell 等待窗口 - #15
Merged
Merged
Conversation
CI runner 上 PowerShell 冷启动超过 20 秒,但 waitPrompt 的等待窗口 硬编码 20 秒、check:ui 等提示符 15 秒、shell-encoding 每个命令 timeoutMs 30 秒,内层全部比外层用例的 timeout 还短。 本机实测终端输入本身正常(裸 CR 与 CRLF 都能提交,win32-input-mode 键事件反而失败),此前多轮调输入编码方向不对。把等待窗口调到与 实际耗时匹配,不改输入逻辑。
integration 在 CI 上从终端那处推进后又卡在等响应文本(10 秒)。 3s/8s/10s 的断言窗口在冷启动的 runner 上都不够,统一放到 30 秒以上, Playwright 默认断言超时也从 30 秒提到 60 秒。
expectOutput 仍在用默认 20 秒窗口,而 CI 上两个终端跑三个命令要 20 秒以上,用例因此间歇性失败。把内层等待提到 40 秒,外层 timeout 提到能真正覆盖内层总和。
CI 日志出现过 ISOLATED_' 后换行、再补 ('FIRST') 的截断,命令因此
永远不完整。分两次写入时 500ms 的间隔在慢 runner 上不可靠。
check:plugins 仍在调 invoke('workspace-set'),该通道随托管工作区
一起被移除了,运行时报「未知通道」。check-sidecar 的 packaged PTY
用例同样只有 15 秒等待窗口,CI 上不够。
托管工作区移除后测试里没有会话,session-list 的 focused 是 null, browser-launch 直接报「会话不存在」。改为用 folderProof 签一个单次 目录凭证、建项目和会话后再验证 WDH 浏览器。
内核固定为 CloakBrowser 后不再支持系统 Chrome,测试原来每次开新的 临时数据目录,里面永远没有内核,browser-launch 直接报未安装。 改为优先使用 JSRA_UI_DATA_DIR(CI 在该目录下装过内核),并在 workflow 里把这个 env 传给 check:plugins。
复用 JSRA_UI_DATA_DIR 时 onboarding 已完成,「稍后」按钮不会渲染, 硬等 15 秒必然超时。改为按存在与否处理。
This was referenced Nov 1, 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.
main 现在在 Windows 上是红的,两个失败都源于等待窗口比实际耗时短,不是终端输入坏了。
实测结论
在本机真实 Windows 上跑
scripts/diagnose-windows-terminal.mjs:\r\r\n再看本机跑单测:
workspace-tabs.test.mjs8 个用例全过,终端用例 2.1 秒 / 3.3 秒。而 CI 上同样用例要 22 秒后超时——CI runner 上 PowerShell 冷启动慢一个数量级。之前栈里 8 个提交都在调输入编码(CRLF → settle window → prompt wait → winpty → Remove-Module PSReadLine),方向不对。
真正的三个超时
sidecar/test/workspace-tabs.test.mjswait硬编码 20000waitPrompt用 45000timeout: 60000还短scripts/check-ui.mjssidecar/test/shell-encoding.test.mjstimeoutMs: 30000wait改成可传budget参数,默认值仍是 20000,其他调用点行为不变。验证