Skip to content

fix: allow bugfix-release/* carve-out branches in ci.yml version-guard - #2859

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-12_ci-version-guard-bugfix-release
Oct 12, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-12_ci-version-guard-bugfix-release

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #2858

What

#2853 made the bugfix carve-out channel PR-gated: the branch keeps the bugfix-release/ prefix as the carve-out marker (release-bugfix.yml publishes on the closed-PR trigger; release.yml / master-build.yml detection regex ^[0-9]{4}-[0-9]{2}-[0-9]{2}_release-v deliberately does NOT match it). But ci.yml's version-guard still only whitelisted *_release-v*, so every carve-out release PR — which legally carries exactly one isolated release v{VERSION} bump commit — was rejected as a "non-release branch". First casualty: PR #2857 (bugfix-release/v0.1.195-dsh-compaction-422) red at head sha 7c41abd29c8d, all other lanes green.

Because release-bugfix.yml's full-CI gate is fail-closed, a red version-guard also blocks the merge-time publish — the channel was effectively unusable until this lands on master.

Fix

  1. .github/workflows/ci.yml version-guard allowlist: *_*_release-v* → *_release-v* || bugfix-release/* (one condition + comment update).
  2. reference/release.md carve-out section: added the guard-compatibility requirement (the version-guard MUST whitelist the marker prefix) with the ci.yml version-guard 不识别 bugfix-release/* carve-out 分支:#2853 新通道下所有 carve-out 发布 PR 必红 #2858 divergence as the cautionary case, so the two files can't silently fork again.

Deliberately NOT done: renaming carve-out branches to *_release-v* to slip past the guard — that would make release.yml/master-build.yml misfire on merge and double-publish the post-merge master tree, the exact accident #2853's design prevents.

Behavior change (flagged per policy)

CI gate semantics: version-guard previously rejected ANY package.json version diff on branches not matching *_release-v*; it now also passes bugfix-release/* branches unconditionally (same posture as release branches — the isolated-commit discipline is enforced by process/review, not by this guard, for both kinds). No impact on normal release, kernel release (*_release-kernel-v* was already outside the allowlist AND never diffs the root package.json's version field), or content branches.

Verification

  • Pattern check: bugfix-release/v0.1.195-dsh-compaction-422 → allow; 2026-10-12_release-v0.1.196 → allow; feature/* → deny (unchanged); edited block passes bash -n.
  • No product code touched; no tests affected.

After this merges to master, re-run PR #2857's CI — pull_request runs use the base branch's workflow definition, so it will pick up the fixed guard and go green.

Touches a CI workflow → human review per AGENTS.md §7.4.

#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. #2857) went red, and release-bugfix.yml's fail-closed full-CI gate then blocked the merge-time publish.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-12_ci-version-guard-bugfix-release (60538d1)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3173-pr.2859.7e42b38

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-pr2859.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] 🏷 PR review 完成 — 结论:可合并(人工 merge)。

核对范围:单 commit 60538d1,base 即当前 master tip a8d9dc393(无落后、无需 rebase);diff 仅 2 文件 +8/−2:.github/workflows/ci.yml(放行条件一行 + 注释)、reference/release.md(carve-out 章节补 guard 兼容性要求)。逐行读过,每行都与本 PR 目的相关,diff 干净。

独立验证(非转述 PR 描述):

  • master 上 ci.yml 白名单确为 if [[ "$BRANCH" == *_release-v* ]](PR 描述写作 *_*_release-v*,与实际差一个通配层级,功能等价,纯描述措辞问题,不阻塞);
  • 本地对编辑后条件跑了模式矩阵:bugfix-release/v0.1.195-dsh-compaction-422→allow、2026-10-12_release-v0.1.196→allow、feature/foo→deny、2026-10-12_release-kernel-v0.0.102→deny(与现状一致——kernel release commit 只动 kernel/package.json,root package.json version 字段无 diff,grep 不命中,行为前后一致);编辑块过 bash -n;
  • 「不要改名绕过」的判断成立:release.yml 与 master-build.yml 的检测正则均为 ^[0-9]{4}-[0-9]{2}-[0-9]{2}_release-v(已逐一核对源码),bugfix-release/* 不匹配;而 release-bugfix.yml 的发布触发又硬性要求 head.ref 匹配 bugfix-release/*——前缀是通道本身的标记,改名两个方向都会断。

八问:

  1. 是什么问题:新 PR-gated carve-out 发布通道(feat: route bugfix carve-out releases through a PR like normal releases (#2851) #2853)的分支名族 bugfix-release/* 不在 ci.yml version-guard 放行清单里,合法携带 isolated release bump commit 的 carve-out PR 被当普通内容分支拒掉。
  2. 什么原因导致的:feat: route bugfix carve-out releases through a PR like normal releases (#2851) #2853 改造时把 bugfix-release/ 从触发器降级为纯标记,其 diff 覆盖了 release-bugfix.yml / AGENTS.md / reference/release.md 三处消费者,漏了第四处 ci.yml version-guard——放行清单没跟上新的合法分支族。
  3. 影响范围与严重程度:所有走 carve-out 通道的发布 PR 必红于 version-guard;叠加 release-bugfix.yml fail-closed 全量 CI gate,合并后发布卡死在 gate 上什么都不发——安全但通道实际不可用(只能退回 workflow_dispatch 紧急 fallback)。常规 release、kernel release、内容分支均不受影响。首起实例:release v0.1.195 #2857 红于 7c41abd29c8d。
  4. 怎么修复的:放行条件扩展为 *_release-v* || bugfix-release/*(carve-out 与 release 分支同姿态:isolated-commit 纪律靠流程+review 保证,而非此 guard);并在 reference/release.md carve-out 章节把「guard 必须与标记前缀同步维护」写成显式要求,以 ci.yml version-guard 不识别 bugfix-release/* carve-out 分支:#2853 新通道下所有 carve-out 发布 PR 必红 #2858 为警示案例,防两处文件再次静默分叉。这是修复的根本原因(补齐漏改的消费者),不是掩盖症状。
  5. 是否回归问题:无。version-guard 既有行为逐项清点——*_release-v* 放行不变;内容分支 version-bump 拒绝不变(错误消息文案未动);*_release-kernel-v* 原本就在白名单外且依赖后续 grep 通过,路径未变;新增的 bugfix-release/* 无条件放行是唯一语义变化,且正是修复目的本身(已在 PR 描述按政策披露)。guard 之外无任何产品代码触碰。
  6. 是否破坏缓存:不涉及(CI 门禁逻辑,无缓存/游标/去重面)。
  7. 是否改了设计方向:不涉及。是把 feat: route bugfix carve-out releases through a PR like normal releases (#2851) #2853 已定设计补完到漏掉的消费者,未引入新机制;「不改名」的取舍与 feat: route bugfix carve-out releases through a PR like normal releases (#2851) #2853 防二次发布的设计一致。
  8. 是否引入了新的配置:不涉及。无新 env/config/默认值。

CI 状态(head 60538d1):version-guard ✅ success(本 PR 的关键 lane)、kernel-guard / pi-subagents-guard / config-surface-guard / lane-guard / docs-sync / docs-coverage / lock-sync / unused-exports / build-artifact 全部 ✅;四个全量 test job(ubuntu/windows × node22/24)仍在跑——diff 不触碰任何产品代码,预期绿,若异常我会跟进报告。

合并后动作:re-run PR #2857 的 CI(pull_request 事件使用 base 分支的 workflow 定义,会拾取修好的 guard)即可转绿并发布 v0.1.195。

判定:可合并。涉及 CI workflow,按 §7.4 留人工 review/merge。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 补充:head 60538d1 的 CI 已全绿——14/14 lane success(含 version-guard 与四个全量 test job:ubuntu/windows × node22/24)。无异常,维持可合并判定;合并后 re-run #2857 即可收工。

@ranxianglei
ranxianglei merged commit 75b861c 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.304-master.75b861c (rolling master tag).

npm install -g billion-context@0.0.304-master.75b861c  # 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.

ci.yml version-guard 不识别 bugfix-release/* carve-out 分支:#2853 新通道下所有 carve-out 发布 PR 必红

1 participant