Skip to content

[PR] fix(release): land the raw-publish bump as a commit before tagging/syncing (empty sync PR 422 + stale-version tag) - #5457

Merged
ranxianglei merged 1 commit into
masterfrom
2026-11-01_fix-raw-sync-bookkeeping
Nov 1, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-11-01_fix-raw-sync-bookkeeping

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

修什么

raw_publish 紧急通道(今晚 #5447 合入的那套)有两个静默账目 bug,都是同一个根因:Bump version 步骤只 git add、从不 commit(commit 在 raw 路径被跳过的 Commit-and-push 步骤里),于是 raw 步骤跑的时候工作区是"已暂存未提交"状态。

后果(在 npm publish 之后发生,publish 本身不受影响):

  1. tag 指错树:git tag v$VER 打在一个 tree 里 package.json 仍是旧版本的 commit 上 → 以后从该 tag 切 bugfix lane 时按树读版本 → strict-newer / already-live 守卫误判;
  2. 收敛 PR 必然 422:git push origin HEAD:refs/heads/emergency-sync-... 推出的分支与 master 逐字节相同(HEAD 没动过)→ 空 diff → GitHub 拒绝建 PR(422)→ master 永不收敛 → 下次走正常一键发版会卡在 drift guard。

怎么修(最小改动,+12 行,只动 Raw 步骤)

npm publish 成功之后、任何 tag/branch push 之前,把已暂存的 bump 原地提交(github-actions[bot] 身份)。之后:tag 指向版本一致的树 ✓,sync 分支带真实 diff、可合并且合了不会二次发版(分支名不匹配 release.yml 两个 gate)✓。pending_bump 路径下没有暂存内容,if ! git commit 守卫打印一条 warning 后继续(tag 照旧指向当前 head,行为不变)。

验证

  • npx js-yaml release-manual.yml 解析通过;
  • 抽取 Raw 步骤完整 run 脚本(73 行)bash -n 语法通过;
  • 改动仅一处连续块,grep 确认位置(npm publish 后、LAST_TAG 计算前)。

边界

不碰 skip_ci_gate、不碰 drift guard 逻辑、不碰正常路径;skip_ci_gate 在 master 受保护后价值趋零的问题(需要重设计为 master-independent)另议,不在本 PR。

…ncing

Today's audit of the raw_publish emergency path (#5430/#5447) found two
silent bookkeeping bugs in 'Raw emergency publish': the Bump version step
stages the bumped package.json/changelog/manifests but never commits them
(the commit lives in 'Commit and push to master', which the raw path
skips), so in the raw workspace:

1. git tag v$VER pointed at a tree that still carried the OLD version —
   later bugfix-lane cuts-from-tag read the stale version from the tree
   and misfire their strict-newer/already-live guards;
2. git push HEAD:refs/heads/emergency-sync-... pushed a branch byte-
   identical to master -> empty diff -> GitHub rejects the auto sync PR
   with a 422 -> master never converges -> the next NORMAL one-click
   release aborts on the drift guard.

Fix: commit the staged bump in-place right after npm publish, before any
tag/branch push. The tag then points at a version-consistent tree and the
sync PR carries a real mergeable diff (branch name still matches neither
release.yml gate, so merging publishes nothing). On the pending_bump path
the tree is already bumped, nothing stages, and the guarded commit
no-ops with a notice.
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-01_fix-raw-sync-bookkeeping (adb63f1)

Latest build — install this exact version

npm install -g billion-context@0.0.7723-pr.5457.f6e1766

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
adb63f1 billion-context@0.0.7723-pr.5457.f6e1766 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5457.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

收到。这是 PR #5457 的镜像线程,分支 2026-11-01_fix-raw-sync-bookkeeping(head adb63f1),不重做,进入核对流程。

查重: 不重复——open/closed 全库检索 raw_publish、emergency-sync、bump commit tag、422 均无同主题条目;本 PR 是 #5447(今晚合入的紧急通道恢复)的直接后续修复,与 #5447 本身机制不同(#5447 是通道恢复+4 个回归修复,本 PR 修的是该通道的账目记账缺陷)。

初步核对:diff 与 issue 描述完全一致——单文件 .github/workflows/release-manual.yml,+12 行,一处连续块,位置在 npm publish 之后、LAST_TAG 计算之前。正在做完整审核(YAML 解析、run 脚本 bash -n、sync 分支名与 release.yml 两个 gate 的关系、drift guard 收敛语义、CI 状态),结论稍后按八问给出。

@ranxianglei
ranxianglei merged commit 760c24c into master Nov 1, 2026
46 checks passed
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.990-master.760c24c (rolling master tag).

npm install -g billion-context@0.0.990-master.760c24c  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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