fix(release): 加固 RC5 HFS Provider 预检与暂停恢复 - #273
Merged
Merged
Conversation
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.
结果与边界
在任何 HF Space settings mutation 之前,对配置中唯一显式启用的 LLM Search Provider 执行 single-attempt live gate;为已经 containment 的
PAUSEDtransaction 增加 owner-only、Action-only 的前向恢复入口。本 PR 只提交代码、测试、文档与 GitHub Actions contract;尚未执行真实 HFS recovery、Secret 更新、tag 或 Release 发布。远端恢复与正式
v2.0.0rc5发布必须在本 PR exact-head checks 全绿并合并后,由两个独立的新 Actions run 完成。问题
上一轮 RC5 发布的本地/构建/资产门禁通过,但 selected DeepSeek Provider live smoke 返回上游 RPM 429。直接在运行时隐藏切换到另一个模型会破坏 operator control;同时,Space Secret write-only 使 mutation 后失败不能安全自动回滚到“旧代码 + 旧 settings”。
原恢复设计的审查还发现:runner environment 越权解析、runtime assembly 异常泄露、settings-only paused 拓扑缺失、recovery retry 不闭包、双 restart timeout、release/recovery publish 竞态,以及 candidate helper 在 trust gate 前导入等问题。
主要变更
scripts/hf_space_llm_preflight.py:隔离 runner environment,只允许受管 credential reference;使用 production runtime assembly 对 exact selected Provider 发起一次请求,不 retry、不换模型,错误输出脱敏。recover-hf-space.yml:要求 attempt 1、repository owner、currentmain、RC5 version、目标 tag/Release absent,并验证 failed release/recovery provenance。settings-only、direct-parentwrapper-advanced和 failed recovery retry。历史失败 run 仅接受一次性 exact legacy contract。factory_reboot=True并等待 exact repo/runtime SHA;任一步失败继续自动 pause。main、candidate/verifier/workflow SHA;所有 candidate execution job 都在该 gate 下游且 checkout 不持久化凭据。兼容性与非目标
contents: write、tag、Release 或 attestation 权限;成功恢复 runtime 也不能替代正式 central release run。验证
python3 -m pytest tests/ -q --tb=short:2799 passed, 2 skipped(另有 2 个既有 websockets deprecation warnings)72 passedpython3 -m ruff check src tests scripts:PASSpython3 -m ruff format --check src tests scripts:913 files already formattedactionlint(3 个变更 workflow):PASSsdk-contract、server-contract、provider-runtime:PASSgit diff --check:PASSgitleaks:no leaks foundReview focus