Repository navigation
test(build): audit pinned host Python and fail closed on a broken pin - #168
Merged
Merged
Conversation
yesme
enabled auto-merge (squash)
September 3, 2026 23:44
yesme
force-pushed
the
grok/r3-python-pin-audit
branch
from
September 3, 2026 23:45
58b2da0 to
e631ec8
Compare
CI poisons PATH to prove the pin; the audit helpers must call /usr/bin/python3 so they are not the fake interpreter.
This was referenced Sep 4, 2026
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.
定位与重述
这是任务书三追加段对 GLM PR #165 的核验,位置在构建供应链(宿主 Python 钉定),不是产品合同。#165 的三平台 CI 已绿,本 PR 只核 CI 证明不了的三件事:钉定解释器是否真的在用、清单是否锁到官方制品、以及「C 编译 action key 仍稳定」是否成立。结论写在 #165 评论,不另开文档。
本地验收:
bash src/build/tests/check_python_pin.sh通过cd src && ./buck2 test root//build/tests:python_pin_test --target-platforms root//build/platforms:macos_arm64通过exit 1的假python3后./buck2 test root//build/tests:version_contract_test仍过buck-out后同 worktree 重建 foundation 测试 100% cache hit;第二个 worktree 的 sqlite buildscript-run 为 Local当前生效约束集
python-build-standalone.md文末追加复核记录。业界方案调研
新增
src/build/tests/check_python_pin.sh。钉版本与摘要锁是 DotSlash 的原生机制(与仓库已有 buck2/jq/process-compose 清单同一形状),核验是对照 python-build-standalone20260901官方 release 资产 digest,不自建第二套版本表。PATH 毒化与弄坏 digest 是供应链测试的常规反例(uv/rustup 同类),在本仓库里直接跑钉定 trampoline 和启动器,不引入新框架。缓存代价用 Buck2 原生日志log what-ran/log summary观察,不自建 action-key 解析器。启动器从「钉失效则|| true回落宿主」改为失败即停,因为任务书要求不能悄悄回落——这是把 #157 的核心主张收成 fail-closed,不是新协议。