Skip to content

test(localshell): 为 WSL 登录 Shell 首次提示符保留独立冷启动预算(#2108) - #2354

Draft
lithe-support[bot] wants to merge 1 commit into
mainfrom
lithe-support/issue-2108-cold-wsl-shell-prompt-budget
Draft

lithe-support[bot] wants to merge 1 commit into
mainfrom
lithe-support/issue-2108-cold-wsl-shell-prompt-budget

Conversation

@lithe-support

@lithe-support lithe-support Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Refs #2108(不提前关闭;仍需 macOS 高负载复验)。

现象与原因边界

#2108 提供的完整桌面测试证据表明,在 59 个包并行的高负载下,TestWSLScriptStartsTheLoginShellInTheStartFolder/bash 等待第一个提示符 10 秒超时,此时 没有任何 Shell 输出;单包重跑 3 次均通过。冷启动包含系统 /etc/profile 和用户启动文件,跟已运行 Shell 的交互提示符不是同一等待预算。具体是哪一步耗时尚无进程跟踪证据,本 PR 不声称证明了未采集的性能根因。

变更

  • 只在测试代码中新增 integrated.awaitWithin(what, timeout, done),沿用原来的 wake 驱动和明确 deadline,time.NewTimer 用完停止;普通 await 继续执行 10 秒预算。
  • 仅 WSL 模拟登录 Shell 首次提示符采用 30 秒上限,保留真实 bash/zsh 启动、用户启动文件加载、在指定目录运行、命令开始/退出标记及关闭清理的原有断言。
  • 无固定 sleep、无重试或放宽后续命令超时,不修改生产 shell/WSL 脚本或 API。更新终端集成跨平台功能矩阵(原生验收继续 pending)。

验证与限制

已按既有 WSL 与 integrated fixture 的执行路径完成代码核对,原失败日志和单包重跑证据来自 Issue。当前执行容器缺少项目 Go 1.27 与绑定的 Rust Core,无法真实跑完整桌面测试;GitHub CI 上需要验证 TestWSLScriptStartsTheLoginShellInTheStartFolder、整个 localshell 包以及 Linux/macOS 全量负载。仅一轮 CI 通过也不能证明偶发问题已消除。保持 Draft 等待复测,不自动合并。

本 PR 是测试调度预算修复,不改变真实产品用户可见的 Shell 启动超时。

@ghfind-review ghfind-review Bot added the review: no-score ghfind author score missing (not zero) label Nov 23, 2026
@lithe-support

lithe-support Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Lithe Review(最新提交 79e9186)

本轮 Linux CI internal/localshell 包通过,原有 WSL bash/zsh 路径及后续命令仍以 10 秒等待,首次冷启动上限为 30 秒。该结果只证实 Linux 此轮通过:#2108 原环境是 macOS 59 包高负载下偶发首次提示符失败,macOS CI 因 Draft 跳过,真实高负载根因未证实。完整 Linux CI 失败来自与本修改无关的 Viva Text/Spacer Key panic。未达到 macOS 高负载复测条件,不能宣称 Issue 关闭或 PR 可合并。

@lithe-support

lithe-support Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Lithe Review|#2108 测试修复范围与验证边界

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: no-score ghfind author score missing (not zero)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants