[cli-release-discovery][iter-1] fix(install): select stable CLI releases and verify platform assets
Installer Tests / bash-discovery (pull_request) Successful in 1s
Installer Tests / powershell-discovery (pull_request) Successful in 8s

这个提交包含在:
朱四宏
2026-11-14 22:26:21 +08:00
父节点 fca5e79658
当前提交 796948d384
共修改 7 个文件,包含 396 行新增和 41 行删除
+23
查看文件
@@ -0,0 +1,23 @@
# Installer regression tests
Offline tests; no installation or public API calls are made.
```sh
bash -n install
python3 -m unittest discover -s tests -p 'test_cli_release_discovery.py' -v
pwsh -NoProfile -File tests/release-discovery.ps1
pwsh -NoProfile -File tests/test.ps1
```
On Windows PowerShell 5.1, replace `pwsh` with `powershell`. The Gitea workflow
runs Bash on the existing Linux pool and PowerShell on the Windows pool.
Discovery follows Gitea release order and paginates past desktop archives,
drafts and prereleases. Only exact `vMAJOR.MINOR.PATCH` CLI tags qualify.
The first eligible release must list the detected platform archive; an
incomplete newest CLI release is an error, not a silent downgrade.
The Bash installer uses POSIX awk (no new jq/Python/Node runtime dependency).
Tests execute its actual discovery functions with offline fixture responses.
PowerShell tests load only the discovery function via the language AST, so they
do not execute the installer. Existing host-safety tests also remain enabled.