fix(hfs): 将正式 wrapper 发布绑定 canonical private Space 与 main - #9
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.
结果与原因
现有流程允许 production 只依赖 manifest 选择目标,且 private 可见性仅覆盖 candidate;
SOURCE_REF也只要求是origin/main的 ancestor,不能证明正式上传使用 current main。本 PR 为 production 增加严格 fail-closed 门,同时保留 candidate 的历史 commit 语义。变更
BlueSkyXN/Data-Agent-Panel-HFS,并要求 candidate 与 production 都已是 private。origin/main,要求GITHUB_REF=refs/heads/main,并使 checkoutHEAD、GITHUB_SHA、SOURCE_REF、current main 全部相等。git merge-base --is-ancestor "$SOURCE_REF" origin/main约束。scripts/static_check.py,校验 gate 存在且位于 HF upload 前;同步部署文档。影响与边界
仅 production 从“已审阅 ancestor”提升为 current main 等值绑定;candidate 可继续发布已审阅的 main 历史 commit。此 PR 未触发 workflow、未写 Hugging Face、未部署、未 restart,也未改变数据或 Settings。
验证
python3 scripts/static_check.pyactionlint .github/workflows/sync-hf-space.ymlgit diff --checkorigin/main上缺少 strict formal gates 的旧 workflow。以上均在本 PR head 上通过。
Review focus
请重点核对 production 的
SOURCE_REF == GITHUB_SHA == HEAD == origin/main门及其 upload 前顺序,并确认 candidate ancestor 语义未变。