Skip to content

fix(hfs): 将正式 wrapper 发布绑定 canonical private Space 与 main - #9

Merged
BlueSkyXN merged 1 commit into
mainfrom
codex/hfs-strict-formal-gate-20260730
Jul 29, 2026
Merged

fix(hfs): 将正式 wrapper 发布绑定 canonical private Space 与 main#9
BlueSkyXN merged 1 commit into
mainfrom
codex/hfs-strict-formal-gate-20260730

Conversation

@BlueSkyXN

@BlueSkyXN BlueSkyXN commented Jul 29, 2026

Copy link
Copy Markdown
Owner

结果与原因

现有流程允许 production 只依赖 manifest 选择目标,且 private 可见性仅覆盖 candidate;SOURCE_REF 也只要求是 origin/main 的 ancestor,不能证明正式上传使用 current main。本 PR 为 production 增加严格 fail-closed 门,同时保留 candidate 的历史 commit 语义。

变更

  • 固定 production Space 为 BlueSkyXN/Data-Agent-Panel-HFS,并要求 candidate 与 production 都已是 private。
  • production upload 前 fresh fetch origin/main,要求 GITHUB_REF=refs/heads/main,并使 checkout HEADGITHUB_SHASOURCE_REF、current main 全部相等。
  • 保留 candidate 的 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.py
  • actionlint .github/workflows/sync-hf-space.yml
  • git diff --check
  • 负向回归:升级后的 static validator 会拒绝 origin/main 上缺少 strict formal gates 的旧 workflow。

以上均在本 PR head 上通过。

Review focus

请重点核对 production 的 SOURCE_REF == GITHUB_SHA == HEAD == origin/main 门及其 upload 前顺序,并确认 candidate ancestor 语义未变。

@BlueSkyXN
BlueSkyXN merged commit 6f8de00 into main Jul 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant