Skip to content

test(installer): 长期保留 PowerShell 5.1 真实网络生命周期验收 - #1771

Draft
luokerenx4 wants to merge 4 commits into
devfrom
test/powershell51-network-installer
Draft

luokerenx4 wants to merge 4 commits into
devfrom
test/powershell51-network-installer

Conversation

@luokerenx4

@luokerenx4 luokerenx4 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

问题与结果

现有 Windows 安装器验收通过 -Archive/-Sha256 注入本地归档,绕过真实 checksum sidecar;合成旧版本也不能证明已发布 CLI 的在线升级。#1538 的 byte[]→UTF8 修复已合并,本 PR 补齐长期验收,不改生产安装器、不发布新版本。

Windows x64 / 系统 PowerShell 5.1.26100.33438(Desktop)已实际通过完整网络生命周期。 当前源码安装器和公开发布安装器各跑一次;验收提交均为 3fb5a1fc96ce5821a5c87e80f51db45b28e6ab82。

最小实现

  • 扩展现有 windows-cli-preview-smoke.ts 的 --published 模式,复用启动、更新状态、回滚和卸载断言;保留原本地候选模式并明确 synthetic 覆盖边界。
  • 明确调用 %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile,断言 Desktop/5.1;真实请求 GitHub sidecar,要求 System.Byte[] → System.String,随后让普通安装器自行下载、校验与解包,不传预下载 archive/hash。
  • 先验收 fresh beta,再清空测试安装和数据、在线安装真实 stable,执行已发布 binary 的 openalice update --channel beta --yes。验证运行中的旧 Runtime、待激活状态、双向回滚、新 Runtime 就绪及延迟卸载。
  • 在现有安装器 workflow 接入 dev/master PR 路径筛选,以及单独手动网络入口。安装器、CLI、update-lifecycle 和相关验收修改触发 Windows;无关 UI/业务变更不触发 Windows。原有 master 验收与 dev 发布链边界保留。
  • Windows 网络 job 只有 contents: read,不使用发布凭证;临时安装/home/profile,loopback、lite 模式、-NoModifyPath。成功与失败均保留记录;停止失败时保留测试目录,不盲删运行中内容。
  • 公网下载/解包有独立 300 秒预算(实测单次约 90–130 秒);收紧运行环境时保留系统 PATHEXT,并断言同环境下 tar.exe 输出与退出码。PowerShell 5.1 文档说明其可执行文件识别语义。
flowchart TD
  A[相关 PR / 手动网络入口] --> B[系统 powershell.exe:Desktop 5.1]
  B --> C[真实 GitHub sidecar:byte数组 → UTF8文本]
  C --> D[在线安装 beta:版本 / 启动 / Web UI / 停止]
  D --> E[清空测试安装和数据,在线安装真实 stable]
  E --> F[运行中 openalice update --channel beta]
  F --> G[待激活状态 / 双向回滚 / beta 再启动]
  G --> H[延迟卸载 / 保留数据标记 / 清理 / JSON记录]
Loading

Windows 实测证据

模式 结果与日志 验收记录
checkout 安装器,PR 自动路径筛选 通过:37560736379 native-smoke.json artifact
公开 checksum-bound 安装器,手动入口 通过:37560732511 native-smoke.json artifact

两份记录均为 status: pass、cleanupComplete: true,卸载回执 status: removed / dataPreserved: true。已验证:真实 sidecar 解码、SHA256、fresh install、版本、独立 Guardian/Alice、真实 Web UI、停止、运行中真实升级、双向回滚、升级后就绪、延迟卸载。

  • 系统:Windows Server 2025,Windows NT 10.0.26100.0,PowerShell 5.1.26100.33438,x64,系统 powershell.exe。
  • 真实升级:0.94.1(0d4faa90c67d6c24685c7b40679bea5a5742a215)→ 0.95.0-beta(87bc415260aaac92a072d89a1c6440268a3efdf1);beta content identity 01e5e10a9d3810d2。
  • 真实 beta sidecar:application/octet-stream,摘要 af9e57aa2301ce7d4a5064a85b37d918b391e4039b4e599ccdd2b170263a272d。
  • 公开安装器 SHA256:969cf6fc77b4383d5aa2ce06897e332f0d33af95e8c6f283ca3efaca6b4e41db;Windows checkout 执行字节 SHA256:1f0cbab7d1ca6b3e81cd14246981f788203b1d743b55568e0338cdbaaa0d0c17(Git checkout 的 CRLF,与同源 LF 字节差异已复核)。

运行命令:

bun scripts/windows-cli-preview-smoke.ts --published
bun scripts/windows-cli-preview-smoke.ts --published --published-installer

gh workflow run cli-installer-smoke.yml --ref test/powershell51-network-installer \
  -f windows_network=true -f windows_published_installer=true

初期运行失败有明确记录:原本地测试 120 秒时限终止了公网更新;随后发现隔离环境遗漏 PATHEXT,导致 PowerShell 不能正常取得 tar 的 $LASTEXITCODE。修正测试环境、增加原生命令前置断言后,两种完整公网模式通过,未跳过或吞掉失败。

其他验证与限制

  • 最终 head Dev PR Clean Build 通过;相关 workflow 定向测试 21/21。
  • root、CLI、UI、tests 类型检查及 UI 构建通过;critical-local 18 条测试通过、全部必需断言满足。
  • 本地全套不是一次全绿:最近完整运行 7739 passed / 2 failed / 6 skipped,另有一个 Electron 安装缺失导致的未收集文件。NewsPage、PTY 失败随后单独重跑 24/24 通过;补齐 Electron 后桌面 data-home 3/3 通过。此前 npm 缓存、dugite Git、PTY 原生模块和桌面依赖缺失也已补齐并补验。没有把失败的全套 receipt 写成通过。
  • 公网更新器来自实际已发布 binary,不能据此宣称未发布 updater 源码的原生端到端验收;其既有源码测试与候选验收仍保留。
  • 本次公网生命周期只跑 x64;ARM64 公网模式、交互 Agent/provider、真实交易不在本次验收范围。本 PR 不合并、不发布,保持 Draft;不合并 docs(installer): retain PowerShell 5.1 as the Windows baseline #1742。

关联 #1539、#1538。

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openalice-demo Ready Ready Preview Oct 7, 2026 2:11am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 3fb5a1fc Deployed Oct 7, 2026 by vercel[bot]
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.

2 participants