fix(install): discover stable CLI releases instead of desktop archives #16

已合并
fourbroad 于 2026-11-14 22:28:10 +08:00 将 2 次代码提交从 workflow/session/cli-release-discovery-public 合并至 main
所有者

Bug

The public release list and /releases/latest currently resolve to desktop-v1.3.1. Bash limit=1 cannot extract a CLI version; PowerShell treats the desktop archive tag as a CLI version.

Fix

  • Page through releases (50/page, bounded at 100 pages), preserving Gitea release order.
  • Select only exact vMAJOR.MINOR.PATCH tags with boolean draft=false and prerelease=false.
  • Require the detected platform archive in that release assets. Missing assets fail explicitly; never silently downgrade.
  • Bash uses a validated JSON reader in POSIX awk, byte locale, no new jq/Python/Node installer dependency. PowerShell uses structured JSON and the same selection contract.
  • Preserve host safety for irm | iex: return/throw instead of terminating the host, as the existing regression suite requires.
  • Add offline regressions and a minimal read-only Linux/Windows Gitea CI workflow. Existing host-safety tests remain enabled, with portable child-host/temp-path discovery.

Test evidence

  • macOS BSD awk/Bash: 13 Python unittest cases passed; bash -n install and git diff --check passed.
  • Linux Bash/awk independent final run: all 13 cases passed.
  • PowerShell 7.4.13 on Linux: 23 discovery assertions passed; existing tests/test.ps1 passed.
  • Anonymous read-only live Bash discovery selected CLI 1.3.1 with asset octopus-darwin-arm64.zip, while desktop archive remains first.
  • Exact-head Gitea CI run 55002: Linux bash-discovery and Windows PowerShell powershell-discovery both completed successfully. https://eightarms.net/Octopus/octopus-release/actions/runs/55002
  • Approved normally and merged at 2026-11-14 22:28:10 Asia/Shanghai as 6bbafa9acc.

Scope / safety

User-approved CLI version-discovery repair only. No release version bump, tag, feed publish, rollout increase, branch-protection edit or immutable-archive replacement.
The source-repository install scripts also require a matching upstream patch before any future public-install sync, otherwise that sync could revert this fix.

## Bug The public release list and `/releases/latest` currently resolve to `desktop-v1.3.1`. Bash `limit=1` cannot extract a CLI version; PowerShell treats the desktop archive tag as a CLI version. ## Fix - Page through releases (50/page, bounded at 100 pages), preserving Gitea release order. - Select only exact `vMAJOR.MINOR.PATCH` tags with boolean `draft=false` and `prerelease=false`. - Require the detected platform archive in that release assets. Missing assets fail explicitly; never silently downgrade. - Bash uses a validated JSON reader in POSIX awk, byte locale, no new jq/Python/Node installer dependency. PowerShell uses structured JSON and the same selection contract. - Preserve host safety for `irm | iex`: return/throw instead of terminating the host, as the existing regression suite requires. - Add offline regressions and a minimal read-only Linux/Windows Gitea CI workflow. Existing host-safety tests remain enabled, with portable child-host/temp-path discovery. ## Test evidence - macOS BSD awk/Bash: 13 Python unittest cases passed; `bash -n install` and `git diff --check` passed. - Linux Bash/awk independent final run: all 13 cases passed. - PowerShell 7.4.13 on Linux: 23 discovery assertions passed; existing tests/test.ps1 passed. - Anonymous read-only live Bash discovery selected CLI `1.3.1` with asset `octopus-darwin-arm64.zip`, while desktop archive remains first. - Exact-head Gitea CI run 55002: Linux bash-discovery and Windows PowerShell powershell-discovery both completed successfully. https://eightarms.net/Octopus/octopus-release/actions/runs/55002 - Approved normally and merged at 2026-11-14 22:28:10 Asia/Shanghai as 6bbafa9acc2042baed1f9966961729a71cbdd87a. ## Scope / safety User-approved CLI version-discovery repair only. No release version bump, tag, feed publish, rollout increase, branch-protection edit or immutable-archive replacement. The source-repository install scripts also require a matching upstream patch before any future public-install sync, otherwise that sync could revert this fix.
fourbroad 于 2026-11-14 22:26:55 +08:00 推送 1 个提交
[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
796948d384
fourbroad 于 2026-11-14 22:27:28 +08:00 推送 1 个提交
[cli-release-discovery][iter-2] test(install): keep host-safety regression offline
Installer Tests / bash-discovery (pull_request) Successful in 2s
Installer Tests / powershell-discovery (pull_request) Successful in 9s
9b792f5378
octopus-reviewer 于 2026-11-14 22:28:09 +08:00 批准此合并请求
octopus-reviewer 留下了一条评论
首次贡献者

Reviewed release filtering, structured/validated JSON parsing, strict stable tag and boolean checks, exact platform asset matching, bounded pagination and fail-closed behavior. Exact-head Linux and Windows CI run 55002 is green; offline discovery and existing host-safety regressions pass. No release or rollout changes.

Reviewed release filtering, structured/validated JSON parsing, strict stable tag and boolean checks, exact platform asset matching, bounded pagination and fail-closed behavior. Exact-head Linux and Windows CI run 55002 is green; offline discovery and existing host-safety regressions pass. No release or rollout changes.
fourbroad 于 2026-11-14 22:28:10 +08:00 合并提交 6bbafa9acc 到 main
登录 并参与到对话中。
未指定评审人
未选择标签
2 名参与者
通知
截止日期
未设置截止日期。
依赖工单

未设置依赖工单。

引用:Octopus/release#16