A full-featured download manager.
fix(release): prepare beta.3 recovery (#1851)
Dr_rOotf37c02bd3120
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 4b2167d5..2bd20630 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -336,7 +336,7 @@ jobs:--directory "release/signing-input-${{ matrix.target }}"--platform ${{ matrix.platform }}--arch ${{ matrix.arch }}- --commit "$GITHUB_SHA"+ --commit "${{ github.sha }}"--archive "release/signing-input-${{ matrix.target }}.tar"- name: Upload isolated signing inputdiff --git a/README.md b/README.mdindex 36434762..f5553d92 100644--- a/README.md+++ b/README.md@@ -22,8 +22,8 @@ The same core powers two ways to run Motrix:## 🧪 Beta testingMotrix Turbo v2 is currently in beta. Download-[v2.0.0-beta.2 from GitHub Releases](https://github.com/agalwood/Motrix/releases/tag/v2.0.0-beta.2)-and read the [full release notes](./docs/release-notes/2.0.0-beta.2.md)+[v2.0.0-beta.3 from GitHub Releases](https://github.com/agalwood/Motrix/releases/tag/v2.0.0-beta.3)+and read the [full release notes](./docs/release-notes/2.0.0-beta.3.md)before installing it.Back up your existing Motrix data and downloads before testing. Migration from@@ -146,7 +146,7 @@ downloaded resources:```bashmkdir -p motrix-data downloadssudo chown 1000:1000 motrix-data downloads-export MOTRIX_IMAGE='docker.io/motrixapp/motrix-server:2.0.0-beta.2'+export MOTRIX_IMAGE='docker.io/motrixapp/motrix-server:2.0.0-beta.3'export MOTRIX_PUBLIC_URL='http://nas.example.lan:8080'docker compose pull serverdocker compose up -d --waitdiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 06f2a17c..775d2dfa 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -22,8 +22,8 @@ Motrix 是一款界面简洁、功能丰富的桌面下载管理器,可处理## 🧪 Beta 测试Motrix Turbo v2 目前仍处于 beta 阶段。安装前请从 GitHub Releases-下载 [v2.0.0-beta.2](https://github.com/agalwood/Motrix/releases/tag/v2.0.0-beta.2),-并阅读[完整发布说明](./docs/release-notes/2.0.0-beta.2.zh-CN.md)。+下载 [v2.0.0-beta.3](https://github.com/agalwood/Motrix/releases/tag/v2.0.0-beta.3),+并阅读[完整发布说明](./docs/release-notes/2.0.0-beta.3.zh-CN.md)。测试前请备份现有 Motrix 数据和下载文件。Motrix v1 数据的迁移路径尚未经过验证,请勿让本 beta 使用您唯一一份 v1 数据。条件允许时,建议通过独立的系统@@ -141,7 +141,7 @@ Beta 只发布不可变的版本 tag,不会更新 `latest`;仓库的 `compos```bashmkdir -p motrix-data downloadssudo chown 1000:1000 motrix-data downloads-export MOTRIX_IMAGE='docker.io/motrixapp/motrix-server:2.0.0-beta.2'+export MOTRIX_IMAGE='docker.io/motrixapp/motrix-server:2.0.0-beta.3'export MOTRIX_PUBLIC_URL='http://nas.example.lan:8080'docker compose pull serverdocker compose up -d --waitdiff --git a/docs/release-notes/2.0.0-beta.2.md b/docs/release-notes/2.0.0-beta.2.mdindex 894623f3..5385b512 100644--- a/docs/release-notes/2.0.0-beta.2.md+++ b/docs/release-notes/2.0.0-beta.2.md@@ -1,18 +1,23 @@# Motrix 2.0.0-beta.2-English | [简体中文](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.2/docs/release-notes/2.0.0-beta.2.zh-CN.md)+English | [简体中文](./2.0.0-beta.2.zh-CN.md)-Motrix 2.0.0-beta.2 is the first Motrix Turbo beta intended for public-distribution. It begins public validation of the rebuilt v2 desktop app and-headless server, shared download core, MDXP integrations, and sandboxed plugin-system.+> [!IMPORTANT]+> This release attempt did not complete. The four non-Windows build targets+> succeeded, but the Windows job stopped while creating its isolated signing+> input because PowerShell did not expand the Bash-style `$GITHUB_SHA`+> reference. The Snap run was canceled before its Store publish job began.+> Beta.2 created no GitHub Release, R2 update feed, Docker Hub or GHCR image,+> or Snap Store revision. Use+> [Motrix 2.0.0-beta.3](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.3/docs/release-notes/2.0.0-beta.3.md)+> instead. The remaining sections are retained as a historical record of the+> intended beta.2 scope.-The `v2.0.0-beta.1` tag started the protected release paths, but both-tag-triggered pipelines stopped before external distribution. It created no-GitHub Release, R2 update feed, Docker Hub or GHCR container image, or Snap-Store revision. This beta.2 release supersedes it.+Motrix 2.0.0-beta.2 was intended to be the first publicly distributed Motrix+Turbo beta. Its planned scope covered the rebuilt v2 desktop app and headless+server, shared download core, MDXP integrations, and sandboxed plugin system.-## Release recovery fixes+## Release recovery fixes included- Corrected Electron runtime dependency hydration so the packaged desktop appcontains the runtime modules required when it launches.@@ -32,12 +37,12 @@ Store revision. This beta.2 release supersedes it.- A QuickJS plugin sandbox with capability consent, signed builtin plugins,and an in-app plugin marketplace.- Persistent, multi-architecture Server containers for NAS and home-server- deployments, published to both Docker Hub and GHCR.-- A rebuilt release pipeline with isolated macOS signing, optional Windows- Authenticode signing, package verification, third-party notices, and an SPDX+ deployments, with publication planned for Docker Hub and GHCR.+- A rebuilt release pipeline with isolated macOS signing, explicit unsigned+ Windows finalization, package verification, third-party notices, and an SPDXSBOM.-## Before testing+## Planned testing precautionsThis is prerelease software. Back up your existing Motrix application data anddownloads before installing it. Migration from Motrix v1 data has not yet been@@ -47,7 +52,7 @@ When practical, test v2 in parallel using a separate OS account, machine, orDocker data directory. Please do not rely on this beta for your only copy ofimportant downloads.-## What to test+## Planned testing- HTTP, FTP, BitTorrent, and magnet downloads, including pause/resume andsession recovery@@ -55,9 +60,9 @@ important downloads.plugins- Headless Server deployment, persistent storage, and remote pairing-## Available downloads+## Intended downloads (not published)-| Distribution | Architectures | Published output |+| Distribution | Architectures | Intended output ||--------------|---------------|------------------|| macOS 12 or later | `arm64` (Apple Silicon), `x64` (Intel) | DMG and ZIP || Windows | `x64` | NSIS installer (`.exe`) and ZIP |@@ -65,22 +70,22 @@ important downloads.| Docker Hub / GHCR | `linux/amd64`, `linux/arm64` | Immutable `2.0.0-beta.2` tag in both registries || Snap Store | `amd64`, `arm64` | `latest/edge` |-Container images are available as+The planned container image names were`docker.io/motrixapp/motrix-server:2.0.0-beta.2` and-`ghcr.io/agalwood/motrix-server:2.0.0-beta.2`. See the+`ghcr.io/agalwood/motrix-server:2.0.0-beta.2`; they were not published. See the[Docker Server deployment guide](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.2/docs/docker-server.md)for storage, networking, and upgrade guidance.## Known distribution limits-- AppImage is not published for this beta.-- Flatpak is validated separately and is not published by the release tag.+- AppImage was not published for this beta.+- Flatpak was validated separately and was not published by the release tag.- Windows `arm64` and all 32-bit packages are not available.-- Windows packages in this beta are not Authenticode-signed and may trigger a- Windows SmartScreen warning. Download them only from this official GitHub- release.-- Beta container tags are immutable and do not update `latest`, `stable`, or- other stable floating tags.+- The intended Windows packages would not have been Authenticode-signed and+ could have triggered a Windows SmartScreen warning. No beta.2 Windows+ package was published.+- The planned beta container tags were immutable and would not have updated+ `latest`, `stable`, or other stable floating tags.## Feedbackdiff --git a/docs/release-notes/2.0.0-beta.2.zh-CN.md b/docs/release-notes/2.0.0-beta.2.zh-CN.mdindex fee71302..69168f1a 100644--- a/docs/release-notes/2.0.0-beta.2.zh-CN.md+++ b/docs/release-notes/2.0.0-beta.2.zh-CN.md@@ -1,17 +1,21 @@# Motrix 2.0.0-beta.2-[English](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.2/docs/release-notes/2.0.0-beta.2.md) | 简体中文+[English](./2.0.0-beta.2.md) | 简体中文-Motrix 2.0.0-beta.2 是首个计划对外发布的 Motrix Turbo beta。-该版本开始公开验证重新开发的 v2 桌面应用与 Headless server、共用下载-内核、MDXP 集成和沙箱化插件系统。+> [!IMPORTANT]+> 本次发布尝试未完成。4 个非 Windows 构建目标均已成功,但 Windows job 在创建+> 隔离的签名输入时停止,原因是 PowerShell 没有展开 Bash 形式的+> `$GITHUB_SHA` 引用。Snap 流水线在 Store 发布 job 开始前被取消。+> beta.2 未创建 GitHub Release,也未发布 R2 更新数据源、Docker Hub+> 或 GHCR 镜像及 Snap Store revision。请改用+> [Motrix 2.0.0-beta.3](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.3/docs/release-notes/2.0.0-beta.3.zh-CN.md)。+> 下文仅作为 beta.2 原定范围的历史记录保留。-`v2.0.0-beta.1` tag 触发了受保护的发布路径,但两条由 tag 触发的-流水线都在对外分发前停止。beta.1 未创建 GitHub Release,也未发布 R2-更新数据源、Docker Hub 或 GHCR 容器镜像及 Snap Store revision。本 beta.2-版本取代 beta.1。+Motrix 2.0.0-beta.2 原计划作为首个对外分发的 Motrix Turbo beta。+其原定范围包含重新开发的 v2 桌面应用和 Headless server、共用下载内核、+MDXP 集成和沙箱化插件系统。-## 发布恢复修复+## 已包含的发布恢复修复- 修正 Electron runtime 依赖的补全流程,确保打包后的桌面应用包含启动时所需的 runtime module。@@ -28,12 +32,12 @@ Motrix 2.0.0-beta.2 是首个计划对外发布的 Motrix Turbo beta。- 官方 CLI 和浏览器任务交接统一使用 MDXP,并支持本地安全发现及远程 Server的 device-code 配对。- 提供带能力授权的 QuickJS 插件沙箱、已签名的内置插件和应用内插件市场。-- 面向 NAS 和家庭服务器提供持久化、多架构 Server 容器,并同时发布到+- 面向 NAS 和家庭服务器提供持久化、多架构 Server 容器,原计划同时发布到Docker Hub 与 GHCR。-- 重建发布流水线,隔离 macOS 签名步骤、支持可选的 Windows Authenticode- 签名,并加入安装包验证、第三方声明和 SPDX SBOM。+- 重建发布流水线,隔离 macOS 签名步骤,并明确支持未签名的 Windows+ 最终处理,同时加入安装包验证、第三方声明和 SPDX SBOM。-## 测试前须知+## 原计划的测试须知这是预发布软件。安装前请备份现有 Motrix 应用数据和下载文件。Motrix v1数据的迁移路径尚未经过验证,请勿让本 beta 使用您唯一一份 v1 数据。@@ -41,15 +45,15 @@ Motrix 2.0.0-beta.2 是首个计划对外发布的 Motrix Turbo beta。条件允许时,建议通过独立的系统账户、设备或 Docker 数据目录与现有环境并行测试 v2。请勿让本 beta 成为重要下载文件的唯一存储位置。-## 建议测试项+## 原计划的测试项- HTTP、FTP、BitTorrent 和磁力链接下载,包括暂停/继续与 session 恢复- 桌面集成、通过 MDXP 进行的浏览器和 CLI 任务交接,以及沙箱化插件- Headless Server 部署、数据持久化和远程配对-## 可用下载+## 原计划下载(未发布)-| 发布方式 | 架构 | 发布产物 |+| 发布方式 | 架构 | 原计划产物 ||----------|------|----------|| macOS 12 或更高版本 | `arm64`(Apple Silicon)、`x64`(Intel) | DMG 和 ZIP || Windows | `x64` | NSIS 安装包(`.exe`)和 ZIP |@@ -57,18 +61,19 @@ Motrix 2.0.0-beta.2 是首个计划对外发布的 Motrix Turbo beta。| Docker Hub / GHCR | `linux/amd64`、`linux/arm64` | 两个 registry 中均发布不可变 tag `2.0.0-beta.2` || Snap Store | `amd64`、`arm64` | `latest/edge` |-容器镜像地址为 `docker.io/motrixapp/motrix-server:2.0.0-beta.2` 和-`ghcr.io/agalwood/motrix-server:2.0.0-beta.2`。数据持久化、网络和升级方法请参阅+原计划的容器镜像地址为 `docker.io/motrixapp/motrix-server:2.0.0-beta.2` 和+`ghcr.io/agalwood/motrix-server:2.0.0-beta.2`,但它们并未发布。数据持久化、网络和升级方法请参阅[Docker Server 部署指南](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.2/docs/docker-server.zh-CN.md)。## 已知发布限制-- 本 beta 不发布 AppImage。-- Flatpak 会单独验证,不会随该版本 tag 发布。+- 本 beta 未发布 AppImage。+- Flatpak 已单独验证,未随该版本 tag 发布。- 不提供 Windows `arm64` 和任何 32 位安装包。-- 本 beta 的 Windows 安装包未进行 Authenticode 签名,可能触发 Windows- SmartScreen 警告。请仅从此 GitHub 官方 Release 下载。-- Beta 容器 tag 不可变,不会更新 `latest`、`stable` 或其他稳定版浮动 tag。+- 原计划的 Windows 安装包不会进行 Authenticode 签名,因而可能触发+ Windows SmartScreen 警告。beta.2 实际并未发布 Windows 安装包。+- 原计划的 beta 容器 tag 不可变,不会更新 `latest`、`stable` 或其他稳定版+ 浮动 tag。## 反馈diff --git a/docs/release-notes/2.0.0-beta.3.md b/docs/release-notes/2.0.0-beta.3.mdnew file mode 100644index 00000000..686dce58--- /dev/null+++ b/docs/release-notes/2.0.0-beta.3.md@@ -0,0 +1,91 @@+# Motrix 2.0.0-beta.3++English | [简体中文](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.3/docs/release-notes/2.0.0-beta.3.zh-CN.md)++Motrix 2.0.0-beta.3 is the first Motrix Turbo beta intended for public+distribution. It begins public validation of the rebuilt v2 desktop app and+headless server, shared download core, MDXP integrations, and sandboxed plugin+system.++The protected `v2.0.0-beta.1` and `v2.0.0-beta.2` release attempts both+stopped before external distribution. Neither version created a GitHub+Release, R2 update feed, Docker Hub or GHCR container image, or Snap Store+revision. This beta.3 release supersedes both attempts.++## Release recovery fixes++- Corrected the Windows signing-input handoff to record the triggering commit+ with a cross-platform workflow expression before isolated finalization.+- Corrected Electron runtime dependency hydration so the packaged desktop app+ contains the runtime modules required when it launches.+- Corrected Snap artifact staging so the tag pipeline can verify and publish+ the exact `amd64` and `arm64` build outputs.++## Highlights++- A ground-up desktop rebuild with Electron 43, React 19, and TypeScript 7,+ including a customizable Dashboard, dark mode, a cross-platform application+ menu, and clearer task-inspector feedback.+- One host-neutral download core for both the desktop app and the new Node/Web+ Server, with SQLite session recovery, tracker management, UPnP/NAT-PMP, and+ HTTP, FTP, BitTorrent, and magnet support.+- MDXP-based integration for the official CLI and browser handoff, including+ secure local discovery and device-code pairing for remote Server instances.+- A QuickJS plugin sandbox with capability consent, signed builtin plugins,+ and an in-app plugin marketplace.+- Persistent, multi-architecture Server containers for NAS and home-server+ deployments, published to both Docker Hub and GHCR.+- A rebuilt release pipeline with isolated macOS signing, explicit unsigned+ Windows finalization, package verification, third-party notices, and an SPDX+ SBOM.++## Before testing++This is prerelease software. Back up your existing Motrix application data and+downloads before installing it. Migration from Motrix v1 data has not yet been+validated, so do not use your only copy of v1 data with this beta.++When practical, test v2 in parallel using a separate OS account, machine, or+Docker data directory. Please do not rely on this beta for your only copy of+important downloads.++## What to test++- HTTP, FTP, BitTorrent, and magnet downloads, including pause/resume and+ session recovery+- Desktop integrations, browser and CLI handoff through MDXP, and sandboxed+ plugins+- Headless Server deployment, persistent storage, and remote pairing++## Available downloads++| Distribution | Architectures | Published output |+|--------------|---------------|------------------|+| macOS 12 or later | `arm64` (Apple Silicon), `x64` (Intel) | DMG and ZIP |+| Windows | `x64` | NSIS installer (`.exe`) and ZIP |+| Linux | `x64`, `arm64` | DEB and RPM |+| Docker Hub / GHCR | `linux/amd64`, `linux/arm64` | Immutable `2.0.0-beta.3` tag in both registries |+| Snap Store | `amd64`, `arm64` | `latest/edge` |++Container images are available as+`docker.io/motrixapp/motrix-server:2.0.0-beta.3` and+`ghcr.io/agalwood/motrix-server:2.0.0-beta.3`. See the+[Docker Server deployment guide](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.3/docs/docker-server.md)+for storage, networking, and upgrade guidance.++## Known distribution limits++- AppImage is not published for this beta.+- Flatpak is validated separately and is not published by the release tag.+- Windows `arm64` and all 32-bit packages are not available.+- Windows packages are not Authenticode-signed and may trigger a Windows+ SmartScreen warning. Download them only from this official GitHub release.+- Beta container tags are immutable and do not update `latest`, `stable`, or+ other stable floating tags.++## Feedback++Please report reproducible problems through+[GitHub Issues](https://github.com/agalwood/Motrix/issues). Include your+operating system, architecture, package type, and the steps needed to reproduce+the issue.diff --git a/docs/release-notes/2.0.0-beta.3.zh-CN.md b/docs/release-notes/2.0.0-beta.3.zh-CN.mdnew file mode 100644index 00000000..ed37723e--- /dev/null+++ b/docs/release-notes/2.0.0-beta.3.zh-CN.md@@ -0,0 +1,78 @@+# Motrix 2.0.0-beta.3++[English](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.3/docs/release-notes/2.0.0-beta.3.md) | 简体中文++Motrix 2.0.0-beta.3 是首个计划对外发布的 Motrix Turbo beta。+该版本开始公开验证重新开发的 v2 桌面应用与 Headless server、共用下载+内核、MDXP 集成和沙箱化插件系统。++受保护的 `v2.0.0-beta.1` 和 `v2.0.0-beta.2` 发布尝试均在对外分发前+停止。两个版本都未创建 GitHub Release,也未发布 R2 更新数据源、+Docker Hub 或 GHCR 容器镜像及 Snap Store revision。本 beta.3 版本+取代前两次尝试。++## 发布恢复修复++- 修正 Windows 签名输入的交接流程,在隔离的最终处理前通过跨平台+ workflow 表达式记录触发本次发布的 commit。+- 修正 Electron runtime 依赖的补全流程,确保打包后的桌面应用包含启动时所需+ 的 runtime module。+- 修正 Snap 产物的 staging 流程,使 tag 流水线能够验证并发布确定的+ `amd64` 和 `arm64` 构建产物。++## 主要变化++- 使用 Electron 43、React 19 和 TypeScript 7 从头重建桌面应用,提供可自定义+ Dashboard、深色模式、跨平台应用菜单,以及更清晰的任务检查器反馈。+- 桌面应用和全新的 Node/Web Server 共用与宿主无关的下载内核,支持 SQLite+ session 恢复、Tracker 管理、UPnP/NAT-PMP,以及 HTTP、FTP、BitTorrent 和+ 磁力链接下载。+- 官方 CLI 和浏览器任务交接统一使用 MDXP,并支持本地安全发现及远程 Server+ 的 device-code 配对。+- 提供带能力授权的 QuickJS 插件沙箱、已签名的内置插件和应用内插件市场。+- 面向 NAS 和家庭服务器提供持久化、多架构 Server 容器,并同时发布到+ Docker Hub 与 GHCR。+- 重建发布流水线,隔离 macOS 签名步骤,并明确支持未签名的 Windows+ 最终处理,同时加入安装包验证、第三方声明和 SPDX SBOM。++## 测试前须知++这是预发布软件。安装前请备份现有 Motrix 应用数据和下载文件。Motrix v1+数据的迁移路径尚未经过验证,请勿让本 beta 使用您唯一一份 v1 数据。++条件允许时,建议通过独立的系统账户、设备或 Docker 数据目录与现有环境+并行测试 v2。请勿让本 beta 成为重要下载文件的唯一存储位置。++## 建议测试项++- HTTP、FTP、BitTorrent 和磁力链接下载,包括暂停/继续与 session 恢复+- 桌面集成、通过 MDXP 进行的浏览器和 CLI 任务交接,以及沙箱化插件+- Headless Server 部署、数据持久化和远程配对++## 可用下载++| 发布方式 | 架构 | 发布产物 |+|----------|------|----------|+| macOS 12 或更高版本 | `arm64`(Apple Silicon)、`x64`(Intel) | DMG 和 ZIP |+| Windows | `x64` | NSIS 安装包(`.exe`)和 ZIP |+| Linux | `x64`、`arm64` | DEB 和 RPM |+| Docker Hub / GHCR | `linux/amd64`、`linux/arm64` | 两个 registry 中均发布不可变 tag `2.0.0-beta.3` |+| Snap Store | `amd64`、`arm64` | `latest/edge` |++容器镜像地址为 `docker.io/motrixapp/motrix-server:2.0.0-beta.3` 和+`ghcr.io/agalwood/motrix-server:2.0.0-beta.3`。数据持久化、网络和升级方法请参阅+[Docker Server 部署指南](https://github.com/agalwood/Motrix/blob/v2.0.0-beta.3/docs/docker-server.zh-CN.md)。++## 已知发布限制++- 本 beta 不发布 AppImage。+- Flatpak 会单独验证,不会随该版本 tag 发布。+- 不提供 Windows `arm64` 和任何 32 位安装包。+- Windows 安装包未进行 Authenticode 签名,可能触发 Windows SmartScreen+ 警告。请仅从此 GitHub 官方 Release 下载。+- Beta 容器 tag 不可变,不会更新 `latest`、`stable` 或其他稳定版浮动 tag。++## 反馈++请通过 [GitHub Issues](https://github.com/agalwood/Motrix/issues) 报告可复现的问题,+并附上操作系统、架构、安装包类型和复现步骤。diff --git a/flatpak/app.motrix.native.metainfo.xml b/flatpak/app.motrix.native.metainfo.xmlindex 5c0cf04a..0a9cc9b8 100644--- a/flatpak/app.motrix.native.metainfo.xml+++ b/flatpak/app.motrix.native.metainfo.xml@@ -76,13 +76,13 @@<releases><!-- Update this list on every release; Flathub linter requires the mostrecent version listed here to match the manifest's source tag. -->- <release version="2.0.0-beta.2" date="2026-08-15">+ <release version="2.0.0-beta.3" date="2026-08-15"><description><p>First Motrix Turbo beta intended for public distribution. Rewrittenon Electron 43, Vite 8, React 19, TypeScript 7 and Zod 4, with- corrected Electron runtime dependency hydration and Snap artifact- staging.+ corrected cross-platform release finalization, Electron runtime+ dependency hydration and Snap artifact staging.</p></description></release>diff --git a/package.json b/package.jsonindex 1adb4a0d..d199b9be 100644--- a/package.json+++ b/package.json@@ -3,7 +3,7 @@"type": "module","productName": "Motrix","homepage": "https://motrix.app",- "version": "2.0.0-beta.2",+ "version": "2.0.0-beta.3","packageManager": "[email protected]+sha512.521705bce689924eac72f5a3587122f362689ef6571e55ba80076fd637c11132ecffada26fad4ea79c485bfddbfd3d5a2a5b05805a77e893de71ec8a6cca3bb1","description": "A full-featured download manager","keywords": [],diff --git a/tests/scripts/release-version-contract.test.ts b/tests/scripts/release-version-contract.test.tsindex 878acd58..b188a8fc 100644--- a/tests/scripts/release-version-contract.test.ts+++ b/tests/scripts/release-version-contract.test.ts@@ -72,22 +72,53 @@ describe('release version contract', () => {)})- it('preserves beta.2 recovery and distribution disclosures', () => {- const betaVersion = '2.0.0-beta.2'- const betaTag = `v${betaVersion}`- const english = read(`docs/release-notes/${betaVersion}.md`)- const chinese = read(`docs/release-notes/${betaVersion}.zh-CN.md`)+ it('preserves current distribution disclosures', () => {+ const english = read(`docs/release-notes/${packageVersion}.md`)+ const chinese = read(`docs/release-notes/${packageVersion}.zh-CN.md`)expect(english).toContain(- `https://github.com/agalwood/Motrix/blob/${betaTag}/docs/docker-server.md`+ `https://github.com/agalwood/Motrix/blob/${releaseTag}/docs/docker-server.md`)expect(chinese).toContain(- `https://github.com/agalwood/Motrix/blob/${betaTag}/docs/docker-server.zh-CN.md`+ `https://github.com/agalwood/Motrix/blob/${releaseTag}/docs/docker-server.zh-CN.md`)for (const source of [english, chinese]) {- expect(source).toContain(`motrix-server:${betaVersion}`)+ expect(source).toContain(`motrix-server:${packageVersion}`)+ expect(source).toContain('Snap')+ expect(source).toContain('AppImage')+ expect(source).toContain('Authenticode')+ expect(source).toContain('SmartScreen')+ }+ })++ it('preserves beta.3 recovery history', () => {+ const english = read('docs/release-notes/2.0.0-beta.3.md')+ const chinese = read('docs/release-notes/2.0.0-beta.3.zh-CN.md')++ for (const source of [english, chinese]) {expect(source).toContain('v2.0.0-beta.1')+ expect(source).toContain('v2.0.0-beta.2')+ expect(source).toMatch(/GitHub\s+Release/)+ expect(source).toContain('R2')+ expect(source).toContain('Snap')+ expect(source).toContain('workflow')+ expect(source).toContain('commit')+ }+ })++ it('marks beta.2 as an unpublished attempt superseded by beta.3', () => {+ const english = read('docs/release-notes/2.0.0-beta.2.md')+ const chinese = read('docs/release-notes/2.0.0-beta.2.zh-CN.md')++ expect(english).toContain('This release attempt did not complete')+ expect(english).toContain('Intended downloads (not published)')+ expect(chinese).toContain('本次发布尝试未完成')+ expect(chinese).toContain('原计划下载(未发布)')+ for (const source of [english, chinese]) {+ expect(source).toContain('v2.0.0-beta.3')+ expect(source).toContain('$GITHUB_SHA')+ expect(source).toContain('PowerShell')expect(source).toContain('GitHub Release')expect(source).toContain('R2')expect(source).toContain('Snap')diff --git a/tests/scripts/workflow-release-matrix.test.ts b/tests/scripts/workflow-release-matrix.test.tsindex deee2198..d8aca083 100644--- a/tests/scripts/workflow-release-matrix.test.ts+++ b/tests/scripts/workflow-release-matrix.test.ts@@ -1139,6 +1139,23 @@ describe('release workflow publication contract', () => {expect(releaseSource).not.toContain('APPLE_TEAM_ID')})+ it('passes the signing input commit through a shell-neutral expression', () => {+ const buildSteps = jobSteps(+ asRecord(workflowJobs(releaseWorkflow).build, 'build job')+ )+ const createInput = buildSteps.find(+ (step) => step.name === 'Create isolated signing input'+ )++ expect(createInput).toBeDefined()+ expect(stringField(createInput as LooseRecord, 'if')).toContain(+ "matrix.platform == 'win32'"+ )+ const command = stringField(createInput as LooseRecord, 'run')+ expect(command).toContain(`--commit "\${{ github.sha }}"`)+ expect(command).not.toContain('$GITHUB_SHA')+ })+it('verifies notarization stapling in addition to macOS signatures', () => {const signJob = asRecord(workflowJobs(releaseWorkflow).sign, 'sign job')const verification = jobSteps(signJob).find(@@ -1312,6 +1329,76 @@ describe('release workflow publication contract', () => {})})+describe('workflow shell portability contract', () => {+ it('recognizes Bash environment syntax without flagging shell-neutral forms', () => {+ expect(bareUppercaseEnvironmentReferences('$GITHUB_SHA')).toEqual([+ '$GITHUB_SHA',+ ])+ expect(bareUppercaseEnvironmentReferences(`\${GITHUB_SHA}`)).toEqual([+ `\${GITHUB_SHA}`,+ ])+ expect(bareUppercaseEnvironmentReferences(`\${FOO:-default}`)).toEqual([+ `\${FOO:-default}`,+ ])+ expect(bareUppercaseEnvironmentReferences(`\${{ github.sha }}`)).toEqual([])+ expect(bareUppercaseEnvironmentReferences('$env:GITHUB_SHA')).toEqual([])+ expect(bareUppercaseEnvironmentReferences('$Env:GITHUB_SHA')).toEqual([])+ })++ it.each([+ ['', true],+ ["matrix.platform == 'linux'", false],+ ['matrix.platform == "darwin"', false],+ ["matrix.os == 'ubuntu-22.04'", false],+ ['matrix.os == "macos-26-intel"', false],+ ["matrix.platform == 'win32'", true],+ ["matrix.os != 'win32'", true],+ ["github.event_name == 'push' && matrix.platform == 'linux'", true],+ ] as const)(+ 'treats %j as Windows-capable only when it is not an explicit non-Windows equality',+ (condition, expected) => {+ expect(stepMayRunOnWindows({ if: condition })).toBe(expected)+ }+ )++ it('rejects bare environment variables in release Windows default-shell steps', () => {+ const violations: string[] = []+ const jobs = workflowJobs(releaseWorkflow)+ const workflowShell = defaultRunShell(releaseWorkflow)++ for (const jobName of ['build', 'sign'] as const) {+ const job = asRecord(jobs[jobName], `${jobName} job`)+ expect(+ matrixEntries(job, jobName).some(+ (entry) =>+ stringField(entry, 'platform') === 'win32' &&+ stringField(entry, 'os').startsWith('windows-')+ ),+ `${jobName} must retain a Windows matrix target`+ ).toBe(true)+ const jobShell = defaultRunShell(job) ?? workflowShell++ for (const step of jobSteps(job)) {+ if (+ typeof step.run !== 'string' ||+ step.shell !== undefined ||+ jobShell !== undefined ||+ !stepMayRunOnWindows(step)+ ) {+ continue+ }+ const references = bareUppercaseEnvironmentReferences(step.run)+ if (references.length === 0) continue+ violations.push(+ `release.yml:${jobName}:${stringField(step, 'name', '<unnamed>')}: ${references.join(', ')}`+ )+ }+ }++ expect(violations).toEqual([])+ })+})+describe('workflow action supply-chain contract', () => {it('pins every external action to the reviewed full commit SHA', () => {const workflowFiles = readdirSync(WORKFLOW_DIRECTORY)@@ -1525,3 +1612,31 @@ function platformBuilderStep(function compareTargets(left: ExpectedTarget, right: ExpectedTarget): number {return left.key.localeCompare(right.key)}++function bareUppercaseEnvironmentReferences(command: string): string[] {+ return Array.from(+ command.matchAll(+ /\$(?!\{\{|[Ee][Nn][Vv]:)(?:[A-Z][A-Z0-9_]*|\{[A-Z][A-Z0-9_]*(?::-[^}]*)?\})/gu+ ),+ (match) => match[0]+ )+}++function defaultRunShell(record: LooseRecord): string | undefined {+ if (record.defaults === undefined) return undefined+ const defaults = asRecord(record.defaults, 'workflow defaults')+ if (defaults.run === undefined) return undefined+ const run = asRecord(defaults.run, 'workflow run defaults')+ return typeof run.shell === 'string' ? run.shell : undefined+}++function stepMayRunOnWindows(step: LooseRecord): boolean {+ const condition = stringField(step, 'if', '').trim()+ if (/^matrix\.platform\s*==\s*(['"])(?:darwin|linux)\1$/u.test(condition)) {+ return false+ }+ if (/^matrix\.os\s*==\s*(['"])(?:macos|ubuntu)[^'"]*\1$/u.test(condition)) {+ return false+ }+ return true+}