Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/mac-preview-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
with:
fetch-depth: 0

- name: Install required tools
run: command -v rg >/dev/null || brew install ripgrep

- name: Validate candidate branch provenance
run: ./scripts/verify-preview-branch.sh

Expand Down
17 changes: 11 additions & 6 deletions Bugs/2026-08-11-preview-candidate-runner-missing-rg.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# 预发布候选工作流依赖 Runner 未安装的 rg

- 时间:2026-08-11
- 状态:已修复
- 状态:修复完成,等待托管 Runner 复验
- 影响范围:macOS 公开预发布候选分支的 GitHub Actions 校验
- 功能点:预发布候选来源与发布说明门禁
- 简单描述:候选分支在本地校验通过,但 GitHub macOS runner 因未安装 `rg` 而错误判定发布说明缺失。
- 原始记录:[macOS Preview Candidate run 31458426481](https://github.com/HD838A/remote-mic-app/actions/runs/31458426481)
- 原始记录:[首次失败 run 31458426481](https://github.com/HD838A/remote-mic-app/actions/runs/31458426481)、[后续失败 run 31458857425](https://github.com/HD838A/remote-mic-app/actions/runs/31458857425)

## 复现

Expand All @@ -19,13 +19,18 @@ env PATH=/usr/bin:/bin:/usr/sbin:/sbin ./scripts/verify-preview-branch.sh

## 日志与根因

Actions 日志在 `Validate candidate branch provenance` 步骤的第 127 行首先出现 `command not found: rg`,随后才出现发布说明缺失提示。对应代码直接使用 `rg` 检查变更文件、版本标题和疑似明文凭据,但工作流没有安装 ripgrep,脚本也没有把它声明为依赖
首次 Actions 日志在 `Validate candidate branch provenance` 步骤的第 127 行首先出现 `command not found: rg`,随后才出现发布说明缺失提示。把该门禁改为系统 `grep` 后,第二次工作流已经通过候选来源、Swift 测试、自测、Release 构建和 App 构建,但在 `Verify candidate App structure` 的 `scripts/verify-app.sh:76` 再次因 `rg` 不存在而以 127 退出

根因是候选门禁错误依赖本机额外安装的命令,而不是发布说明内容或候选分支来源异常
根因是预发布工作流没有安装仓库发布验证脚本声明并广泛使用的 ripgrep。本机已安装 `rg`,所以完整链路只在 GitHub 托管 runner 上暴露;发布说明内容、候选分支来源和 App 构建本身均无异常

## 修复

仅把候选门禁中的 `rg` 调用替换为 macOS runner 自带的 `/usr/bin/grep`:固定字符串检查使用 `grep -F`,凭据模式检查使用 `grep -E`。没有修改候选分支规则、版本比较、允许文件列表或凭据检测模式。
修复分为两个最小边界:

- 候选来源门禁改用 macOS runner 自带的 `/usr/bin/grep`,避免基础来源校验依赖额外工具。
- 预发布工作流在所有验证前显式执行 `command -v rg >/dev/null || brew install ripgrep`,满足 `verify-app.sh` 及后续发布验证脚本的既有依赖。

没有修改候选分支规则、版本比较、允许文件列表、凭据检测模式、App 验证规则或打包行为。

## 验证

Expand All @@ -35,4 +40,4 @@ Actions 日志在 `Validate candidate branch provenance` 步骤的第 127 行首
- 在 `v1.8.8` 候选分支临时应用同一修复后,使用 `env PATH=/usr/bin:/bin:/usr/sbin:/sbin ./scripts/verify-preview-branch.sh` 重新执行原始复现,结果由退出码 1 变为退出码 0,并输出 `PREVIEW BRANCH PASS`。
- 验证后已撤销候选分支上的临时改动,候选工作树保持干净;正式修复只提交到独立修复分支。

仍需由修复合入后的 GitHub `macOS Preview Candidate` 工作流确认托管 runner 边界。该问题只涉及 CI 发布门禁,不涉及 App、蓝牙、音频、系统权限或真实硬件行为。
第二次工作流已证明候选来源门禁修复在托管 runner 上有效,并确认新的失败点是工作流未准备 `verify-app.sh` 的既有依赖。仍需在增加工具安装步骤后,由 GitHub `macOS Preview Candidate` 完整跑通到 CI 候选包上传。该问题只涉及 CI 发布门禁,不涉及 App、蓝牙、音频、系统权限或真实硬件行为。
2 changes: 1 addition & 1 deletion Bugs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
| 2026-08-10 | [已占用组合键无法录入](./2026-08-10-reserved-shortcut-capture.md) | 候选修复完成,等待真实系统热键验证 |
| 2026-08-10 | [左右键按住不能连续移动](./2026-08-10-left-right-hold-repeat.md) | 候选修复完成,硬件模拟通过,等待真机验证 |
| 2026-08-10 | [增益滑块轨道拖动带动整个窗口](./2026-08-10-gain-slider-drags-window.md) | 已修复,等待可见界面复验 |
| 2026-08-11 | [预发布候选工作流依赖 Runner 未安装的 rg](./2026-08-11-preview-candidate-runner-missing-rg.md) | 已修复,等待托管 Runner 验证 |
| 2026-08-11 | [预发布候选工作流依赖 Runner 未安装的 rg](./2026-08-11-preview-candidate-runner-missing-rg.md) | 修复完成,等待托管 Runner 复验 |

## 记录模板

Expand Down