Skip to content

feat: route bugfix carve-out releases through a PR like normal releases (#2851) - #2853

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-12_bugfix-channel-pr-gate
Oct 12, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-12_bugfix-channel-pr-gate

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Per #2851 (owner request): the bugfix carve-out channel must go through a PR like normal releases instead of silently publishing on branch push. The ONLY difference from a normal release stays exactly what it always was: the published tree is the carve-out PR itself (+ version bump), never the post-merge master.

Changes

release-bugfix.yml:

Docs: reference/release.md (Bugfix carve-out channel section rewritten to the PR-gated process) and AGENTS.md §5 bullet updated to match.

Behavior change disclosure (old → new)

old new
what publishes pushing bugfix-release/v… branch (or manual dispatch) merging the carve-out PR against master
human review gate none (silent auto-publish) the PR merge (same as every release)
published tree the pushed ref's tree the PRE-MERGE PR-head tree (identical artifact for the standard flow)
master interaction none (master kept the older version) merging brings the version bump into master (master == npm latest afterwards; next normal release must be higher and carries the other pending fixes)
emergency path — unchanged: manual workflow_dispatch on an explicit ref

The bugfix-release/ prefix remains the carve-out MARKER: release.yml's detection (date-prefixed _release-v pattern) deliberately does not match it, so merging the PR cannot double-publish the post-merge master through the normal channel.

Notes

Part of #2851 (second PR closes it).

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-12_bugfix-channel-pr-gate (810e081)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3167-pr.2853.57e3811

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

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr2853.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

Review 结论:可合(人工门禁) — 单 commit 98ac33984,3 文件,workflow + 文档,无运行时改动。我拉了分支对照实际代码(非只读描述)逐项核过,未发现阻塞项。按八问如下:

  1. 是什么问题:这不是缺陷,是 bugfix通道也走pr而不是静默推分支 #2851 的 owner 需求。carve-out 通道过去是「push bugfix-release/** 分支即静默自动发布」,没有任何人工评审门禁 —— 在 CI 发布基础设施上留了一个绕过 review 直接发版的口子。本 PR 把它改成和正常 release 一样走 PR:合并才发布。

  2. 什么原因导致的:根因是触发模型选错了层。bili 0.1.181:clampOutputBudget 把小数写进 max_tokens,上游 400 max_tokens: Input should be a valid integer / 422 Endpoint is unavailable #2011(v0.1.182 紧急通道)为求「快」用「push 一个特殊前缀分支」当发布信号,这种信号天然不带 review 环节,把速度放在了人工门禁之上。修法是把发布信号换成「PR 合并」这个所有 release 共有、自带人工门禁的事件。

  3. 影响范围与严重程度:只影响 carve-out 这一个子通道的触发方式;不动 正常 release.yml、kernel release、manual release 三通道。定性是安全/流程加固(补上缺失的人工门禁),消除「任何人 push 一个 bugfix-release 分支就能发版」的风险,非行为退化。

  4. 怎么修的(机制层):① 触发器 push bugfix-release/** → pull_request types:[closed] branches:[master],push 分支不再触发任何东西;② 新增 resolve 步:仅当「已合并 + head 分支匹配 bugfix-release/* + head/base 同仓」才继续,未合并/非 carve-out 分支 → notice+跳过(green),fork PR → error+fail(loud);③ 关键正确性:pull_request 事件下 checkout 落在 merge ref(= 合并后树),故新增一步 detach 到真实 head sha(= 预合并树),保证发布的仍是「tag+单个 fix+版本号」那棵,而不是拖进 master 其它未发布工作;④ 后续步骤全部 gate 在 proceed=='true',并把 GITHUB_SHA/GITHUB_REF_NAME 显式导出进 dispatch/wait 两步(PR 事件没有可用的 ambient GITHUB_REF_NAME,而 gate 脚本两者都必填);⑤ workflow_dispatch 保留为紧急兜底(人在 UI 选 ref,所有 guard 照跑)。

  5. 是否有回归问题:逐项核过,无破坏:

  6. 是否破坏缓存:不涉及。CI-gate「复用 PR 已有 lane runs」是纯优化(省算力),不改发布判定 —— gate 仍等到该 sha 全绿才放行,缺的 lane 会 dispatch 补齐(fail-closed)。

  7. 是否改了设计方向:有,但正是目的:carve-out 从「独立于 master 的旁路发布」收敛为「与正常 release 同构的 PR 合并发布」,唯一区别保持为「发布预合并 head 树」。owner 明确要求的方向收敛,边界更清晰。

  8. 是否引入新的配置:不涉及。无新 env/config/CLI flag;workflow_dispatch.inputs 仍为空 {};BILI_* 面未动。

合并前建议:先 rebase 到当前 master —— PR 落后 6 个提交(全是无关的 src perf/diag:#2829/#2828/#2827/#2824×3),与这 3 个文件零重叠,rebase 会干净,属线性历史卫生而非正确性必需。

门禁:触及 CI 发布基础设施 → §7.4 强制人工评审,不可 auto-merge;由你手动合并 PR 链接:#2853 。合并后即可按你计划切第二个 PR(bugfix-release/v0.1.195-dsh-compaction-422)关闭 #2851。

…es (#2851)

The old channel auto-published on push of a bugfix-release/** branch, with no
human review gate. Now the carve-out branch goes through a PR against master;
release-bugfix.yml fires when that PR is MERGED and publishes the PRE-MERGE
PR-head tree (last tag + fix + version bump), strictly excluding master's other
unreleased work. All fail-closed guards, the pre-flight and full-CI gates are
unchanged; manual workflow_dispatch on an explicitly chosen ref remains the
emergency fallback. Pushing a bugfix-release/** branch triggers nothing anymore.
@ranxianglei
ranxianglei force-pushed the 2026-10-12_bugfix-channel-pr-gate branch from 98ac339 to 810e081 Compare October 12, 2026 02:50
@ranxianglei
ranxianglei merged commit 649a289 into master Oct 12, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.302-master.649a289 (rolling master tag).

npm install -g billion-context@0.0.302-master.649a289  # 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.

LoveDoLove pushed a commit to LoveDoLove-Forked-Projects/billion-context that referenced this pull request Oct 12, 2026
ranxianglei#2853 made the carve-out channel PR-gated with bugfix-release/* as the marker prefix, but ci.yml version-guard still only whitelisted *_release-v*. Every carve-out release PR (e.g. ranxianglei#2857) went red, and release-bugfix.yml's fail-closed full-CI gate then blocked the merge-time publish.
@ranxianglei
ranxianglei deleted the 2026-10-12_bugfix-channel-pr-gate branch October 15, 2026 05:33
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.

bugfix通道也走pr而不是静默推分支

1 participant