probe: macOS brew install 复现(临时,勿合) - #419
Closed
Sunrisepeak wants to merge 3 commits into
Closed
Conversation
Member
Author
|
诊断完成,结论与修复见 #420。 根因:Homebrew 6 拒绝从未信任的第三方 tap 加载公式。
三个 OS × 三个 Homebrew 版本(14.8.7/6.0.5、15.7.7/6.0.12、26.5.2/6.0.13)形态一致。
关闭本探针 PR,临时 workflow 不合入。 |
Sunrisepeak
added a commit
that referenced
this pull request
Aug 11, 2026
…brew 验证段 (#420) ## 报错 Refusing to load formula mcpp-community/mcpp/mcpp-m from untrusted tap mcpp-community/mcpp. ## 为什么一直没被发现 Homebrew 6 拒绝从未信任的第三方 tap 加载公式,但 `brew install <user>/<repo>/<formula>` 是豁免的 —— 它被读作显式意图。 README 文档化的正是这条全限定命令,**所以它一直是绿的**,而用户真正会敲的 其它每一种拼写都是坏的。 真机实测(macOS 14.8.7 / 15.7.7 / 26.5.2,Homebrew 6.0.5 / 6.0.12 / 6.0.13, 临时探针 PR #419): | 命令 | rc | |---|---| | `brew install mcpp-community/mcpp/mcpp-m`(未 tap / 已 tap) | 0 / 0 | | `brew install mcpp-m`(短名) | **1** | | `brew install mcpp-community/mcpp/mcpp`(alias) | **1** | | `brew trust mcpp-community/mcpp` | 0 | | trust 后:短名 / alias / upgrade / new+run | 全 0 | alias 本身没坏:报错里点名的是它解析到的 `mcpp-m`,被拒的是**信任**。 ## 改动 - README.md / README.zh-CN.md:安装段写清信任门与 `brew trust` 一行修法 - ci-fresh-install.yml 新增 `macos-brew-fresh` job ## 为什么是独立 job 而不是加进 macos-fresh 那个 job 已经有一份经 xlings 装的 mcpp 在 PATH 上,再 brew 装一份会让下面每 一条断言都说不清自己量的是哪个二进制。 它也**不需要 `wait-index`**:brew 直接装 GitHub release tarball,而 tap 的 bump 工作流比 release 晚几分钟 —— 在这里断言"刚发布的版本"会因为与 mcpp 无关 的原因变 flaky。版本断言改成**自洽**的:tapped 公式声明什么版本,装出来的二进制 就必须报什么版本。 ## 这个 job 从两侧钉住信任门 只断言"trust 后短名能用"是不够的 —— 那分不清"门被正确处理了"和"这个 Homebrew 根本没有门",而一个不可能失败的测试与没在跑的测试无从区分。所以先 断言**未信任时被拒、且拒绝理由确实是 untrusted tap**(不是别的新缺陷),再断言 trust 之后短名/alias/upgrade 全通。将来 Homebrew 撤掉这道门,这一步会变红并说明 原因,而不是继续假装在保护什么。 另加两条只有真实用户会碰到的判据:装完能 `mcpp new` + `mcpp run` 真跑起来 (过 launcher 的 MCPP_HOME/MCPP_VENDORED_XLINGS 钉法与工具链自举),以及 per-user 状态确实落在 ~/.mcpp 而不是 Cellar(否则 `brew upgrade` 会把用户装 的工具链一起带走)。 tap 侧同步:mcpp-community/homebrew-mcpp@e5bdc21(README 那句 "short forms work too" 与 alias 宣传都已改准,公式 caveats 补了 brew trust)。 Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
临时探针 PR:在真实 macOS arm64 runner 上跑
brew install mcpp-community/mcpp/mcpp-m,拿到真实报错。每一步都容忍失败并紧跟诊断转储 —— 一个在第一个非零退出就死掉的 job 只能告诉我们"它失败了",不能告诉我们失败在哪。
覆盖:formula 求值(
brew info)、安装、失败日志转储、launcher、alias 路径、brew audit --strict --online、brew test,以及最关键的"装完能不能真的mcpp new+mcpp run"。合入前删除这个 workflow。