Skip to content

test(windows): exercise installer lifecycle - #2650

Merged
liugddx merged 1 commit into
apache:mainfrom
liugddx:ci/windows-installer-lifecycle
Aug 11, 2026
Merged

test(windows): exercise installer lifecycle#2650
liugddx merged 1 commit into
apache:mainfrom
liugddx:ci/windows-installer-lifecycle

Conversation

@liugddx

Copy link
Copy Markdown
Member

Summary

  • install the final NSIS artifact silently into an isolated Windows directory
  • verify the installed application from that directory, including resources, version, ConPTY, and renderer startup
  • run the shipped uninstaller and require the install directory to disappear
  • exercise the same lifecycle in pull-request packaging checks and the release workflow

Validation

  • node --test scripts/windows-x64-release.test.mjs scripts/electron-builder-config.test.mjs scripts/ci-test-plan.test.mjs (19 pass)
  • npm run test:scripts (128 pass)
  • Biome, workflow YAML parsing, and git diff --check

Scope

This closes clean install/start/uninstall evidence. Version-to-version upgrade, failed-upgrade rollback, Authenticode, and automatic updates remain separate Phase 3 work in #2142.

中文说明

内容

  • 将最终 NSIS 安装器静默安装到隔离的 Windows 目录;
  • 从真实安装目录校验应用资源、版本、ConPTY 和桌面渲染器启动;
  • 运行随安装包提供的卸载器,并要求安装目录最终消失;
  • PR 打包检查和正式发布工作流复用同一套生命周期验证。

验证

  • 相关单测 19 项通过;
  • 完整脚本测试 128 项通过;
  • Biome、workflow YAML 和 diff 检查通过。

边界

本 PR 完成干净安装、启动和卸载证据。跨版本升级、升级失败回滚、Authenticode 和自动更新仍作为 #2142 Phase 3 的后续独立工作。

Part of #2142.

@liugddx
liugddxforce-pushed the ci/windows-installer-lifecycle branch from 4b316bb to e63f113CompareAugust 10, 2026 15:08
@liugddx
liugddxforce-pushed the ci/windows-installer-lifecycle branch from e63f113 to 695f771CompareAugust 10, 2026 15:32
@liugddx

Copy link
Copy Markdown
MemberAuthor

Adversarial review found a real lifecycle gap, confirmed by Windows run 31401966245: installation and installed-app verification passed, but uninstall began while the detached Runtime Host was still inside its 30-second idle grace, so the install directory remained.

Updated the PR to:

  • wait for every process whose executable lives under the install directory to exit before invoking NSIS uninstall;
  • keep install-directory disappearance as the success condition (no cleanup retry can turn a failed uninstall green);
  • preserve the primary install/verification/uninstall error when best-effort test cleanup also fails;
  • use bounded retry only for the isolated test root cleanup;
  • slim the orchestration mock and add focused process-order and error-preservation tests.

Local validation: 13 focused release tests pass; full fast script suite reports 160 pass / 1 Windows-only skip. A fresh real Windows package run is pending.

中文说明

对抗审查通过真实 Windows run 31401966245 发现:安装和已安装应用验证都成功,但 Runtime Host 仍处于 30 秒 idle grace 时就开始卸载,导致安装目录残留。

本次修复会在卸载前明确等待安装目录下所有进程退出;仍以安装目录由卸载器真实移除为成功标准;测试环境清理不会把失败伪装成成功,也不会覆盖原始错误。同时瘦身 mock,并补充进程顺序与错误保真测试。新的 Windows 实跑正在等待。

@liugddx

Copy link
Copy Markdown
MemberAuthor

Windows lifecycle evidence is now green on run 31404195691.

  • final NSIS install completed;
  • the installed app passed resource, version, ConPTY, and renderer verification;
  • the verifier observed installed processes exit after 31.6s instead of racing the Runtime Host idle grace;
  • NSIS uninstall then completed and removed the install directory in 3.1s;
  • the full package job passed in 9m38s, and all PR checks are green.
中文结果

修复版 Windows 实跑已通过:最终 NSIS 安装成功,已安装应用通过资源、版本、ConPTY 和渲染器验证;验证器等待安装目录相关进程在 31.6 秒后退出,避免与 Runtime Host idle grace 竞争;随后 NSIS 在 3.1 秒内完成卸载并移除安装目录。完整 package job 用时 9分38秒,PR 全部检查绿色。

@liugddx
liugddx merged commit af86606 into apache:mainAug 11, 2026
13 checks passed
Sign up for freeto 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

@liugddx