Skip to content

[PR] drop master from the CI push arm | ci: merge 后不再重跑 master 的 CORE 矩阵——那套结果没有任何消费者 - #5426

Merged
ranxianglei merged 2 commits into
masterfrom
2026-11-01_no-master-push-ci
Nov 1, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-11-01_no-master-push-ci

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

ci: stop re-running the CORE matrix on master pushes

合并进 master 的每次 commit 都会按 push: 臂再跑一整轮 CI(~30 个重分片,两个 OS)。
这套结果没有任何消费者:PR 合并已被 14 个 required test-shard 检查拦过,合并后的红
只是静默地红在分支页上——没东西被它阻塞,也没人读它。它唯一的作用是在别的 PR 排队时
抢分钟数(本周的队列堆积就是这么来的)。

改了什么

只有一个点:.github/workflows/ci.yml 的 push.branches 去掉 master。
release / bugfix 臂原样保留——那几条是真刚需(bot 作者 PR 的 check 停在
action_required,head sha 必须靠真实 token 推 ref 产生的 push check 过关,#772)。

覆盖不塌的依据

层 现状
合并前拦截 不动。pull_request 臂照跑 CORE,14 个 required 分片检查照旧卡合并
master 常态复检 :03/:33 的 schedule cron 本来就是"master 移动过就跑 FULL 矩阵",砍掉后它是 master 的常任验证者,窗口有界 ≤30 分钟
发版闸 scripts/release-ci-gate.mjs --wait 本就允许复用 PR head(HEAD^2)的绿 run(脚本注释原文:"exactly how branch-protection required checks work");走 release 分支的发版(#5419 这类)用的是没动的 push 臂,行为零变化
构建/发版 lane master-build.yml / release.yml 各自独立挂在 master push 上,不依赖 CI 绿

验证

  • YAML parse OK;唯一 diff = push 分支列表一行 + 注释更新
  • tests/release-ci-gate.test.ts 16/16(全 mock API,确认发版闸逻辑不受影响)
  • 14 个 required checks 全部是 PR 侧产物,branch protection 配置未动

诚实披露的残留

  1. 直推 master 的 commit 在下一次 schedule tick(≤30min)前没有即时 CI 记录。
  2. 若有发版流程严格要求"publish sha 上必须有新鲜的 ci.yml run",会落到
    reuse/dispatch 兜底路径(机制存在且被测试覆盖,但未在生产流量中实测过这一支)。
  3. ci-janitor.yml 里"master 的 run 永不取消"一句变成死条款(无害,另行清理不混入本 PR)。

…mers (#3295)

Owner decision 2026-11-01: every merge into master re-ran the CORE matrix
(~30 heavy shards across two OSes) whose results nobody consumes — nothing
blocks on them and nobody reads their red, while they burn minutes other
PRs are waiting for (the queue pile-up of this week was fed by exactly
these runs).

Master coverage does not lapse:
- pre-merge blocking stays intact (pull_request arm + the 14 required
  test-shard checks on PRs are untouched)
- the :03/:33 schedule cron, which re-runs the FULL matrix whenever
  master moved since the last green scheduled run, becomes master's
  standing verifier (bounded ~30 min window)
- release-ci-gate --wait already accepts green runs at EXTRA_MATCH_SHAS
  (PR head HEAD^2), and release-branch releases ride the UNCHANGED push
  arms
- master-build.yml / release.yml fire on their own master-push triggers
  independent of CI green

Release/bugfix push arms stay: bot-authored PR checks sit in
action_required, so head sha checks must come from real-token ref pushes
(#772). Verified: YAML parse OK; tests/release-ci-gate.test.ts 16/16
(all mock API).
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-01_no-master-push-ci (5a2fff4)

Latest build — install this exact version

npm install -g billion-context@0.0.7722-pr.5426.add1e09

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
5a2fff4 billion-context@0.0.7722-pr.5426.add1e09 build
99e41e9 billion-context@0.0.7688-pr.5426.7959959 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title [PR] ci: merge 后不再重跑 master 的 CORE 矩阵——那套结果没有任何消费者 | drop master from the CI push arm [PR] drop master from the CI push arm | ci: merge 后不再重跑 master 的 CORE 矩阵——那套结果没有任何消费者 Nov 1, 2026

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查完成。结论:通过,无阻塞项;CI(本次改动只影响 master push 事件,PR 侧 CI 不受影响)跑完即可人工合并。

独立核验

  1. diff 面最小且正确:唯一行为变化 = push.branches 去掉 master;release/bugfix 五条模式原样。pull_request 臂(含 base=master)一字未动 → 14 个 required test-shard 检查照旧卡合并,branch protection 配置无需任何配合改动。
  2. 兜底链逐环验过::03/:33 schedule cron 的 gate 逻辑读自 ci.yml plan job——"master 移动过才跑 FULL,静默 master 每次 tick ~20s 开销";scripts/release-ci-gate.mjs 的 --wait/--probe-reuse 复用 EXTRA_MATCH_SHAS(HEAD^2)绿 run 的路径有测试覆盖;master-build.yml/release.yml 触发器确认独立挂在 master push、不 needs CI。
  3. 本地验证:YAML parse 通过(PyYAML safe_load,push.branches 渲染为四元素列表);tests/release-ci-gate.test.ts 16/16(全 mock API,证明改触发面不影响发版闸逻辑)。

一个建议(不阻塞,可后续单独清)

ci-janitor.yml 头部注释「master's own push runs are NEVER cancelled」在本 PR 落地后成为死条款——janitor 代码本身对不存在的事件天然无害,不用跟着改,但下次有人动 janitor 时顺手删掉这段注释即可,避免误导。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ai: vllm-qwen/qwen3.8-27b)

APPROVE — 干净、正确、与既有三层 CI 设计一致

方向(原 issue #3295「三层 CI」):落实 owner 2026-11-01 决策——master 每次 merge 后重跑的 CORE 矩阵没有任何消费者(没有东西 block 它、没人看它红),却占着其他 PR 排队等的分钟数。摘掉这个死消费者,方向对。

结构化八问

  1. 是什么问题:merge 进 master 会触发一次完整 CORE 矩阵的 ci.yml push 运行,结果无人消费,纯烧算力。
  2. 什么原因导致:三层 CI 里 master push 臂早期是为「post-merge 给 master 一个信号」加的,但真正的信号消费者(发布门、branch-protection required checks)都在 PR 侧和各 workflow 自己的触发器上,没人读 master push 的运行结果。
  3. 影响范围与严重程度:仅 CI 触发面;不碰任何用户功能/数据/缓存。属内部算力优化,无外部可感影响。
  4. 怎么修的:只从 on.push.branches 摘掉 master(ci.yml push 臂),release/bugfix 各臂原样保留;master 的验证改由已存在的 :03/:33 schedule cron 承担——plan job 发现 master 自上次绿定时运行以来有移动就跑 FULL 矩阵(≤~30min 窗口)。
  5. 回归审查(逐项过既有行为):
    • 预合并门禁:pull_request 臂(ci.yml:17-31)未动;master 分支保护 required_status_checks.strict=true,恰好 14 个 test-shard context,全部由 PR 侧运行产出——未受影响。
    • 发布路径:release.yml 自带 push: branches:[master] 触发 + release-ci-gate.mjs --wait 用 EXTRA_MATCH_SHAS=$(git rev-parse HEAD^2) 复用 PR-head 绿运行,--dispatch 补缺口——不依赖 ci.yml 的 master push 运行。
    • master-build.yml:自带 push: branches:[master] 触发,滚动 master tag 自发布,独立于 CI 绿。
    • 各 lane workflow(e2e/registry/image/theorem/zcode…):各有自己的 schedule cron(same smart-cron pattern);全仓无 workflow_run: 链式触发,不消费 ci.yml 的 master push 运行。
    • red-signal job:仅 schedule 事件触发,不受影响;且 master 现走定时验证,其红灯会经 red-signal 自动开跟踪 issue(可见性反而比之前更好)。
    • ci-janitor.yml(跨文件消费者,独立核验):janitor 的「master run 永不取消」保护按 event==push && branch==master 判定。本 PR 后 ci.yml 不再产生 master push run → 该分支成死代码(OP 残留#3 已自述)。但语义有微妙变化:master 信号现在来自 schedule run,而 schedule run 不匹配该保护条件 → 队列过载时(backlog breaker:>30 个排队即取消排队>60min 的 run)一个卡住的 master schedule run 可能被 janitor 取消。稳态无影响(FULL 矩阵 ~30min 完成,远低于所有阈值);即便被取消,下一个 :03/:33 tick(≤30min)会重跑并自愈,plan job 的「last green scheduled」查询只认 success、不会读到坏状态。判定:p3、事件边缘、可自愈——同意 OP 不并入本 PR(作用域干净是对的),但建议单独开一个小 follow-up issue 追踪:把 predicate 扩到同时护住 master 的 schedule run,并修正那条现已失实的注释("the head's only required checks")。
    • 行为变更(旧→新,已披露):旧=每次 merge→立即跑 CORE(13 leg)push 运行;新=merge 后不再立即跑,master 由 :03/:33 cron 在 ≤30min 内跑 FULL(16 test + 4 static)矩阵验证。覆盖更强(full>core)、时机更慢(≤30min vs 即时)。有意变更,commit 已写清。
  6. 是否破坏缓存:不涉及(CI 触发变更,无缓存/重试/去重键逻辑改动;concurrency group 未动)。
  7. 是否改设计方向:无架构转向;在既有三层 CI(#3295)内移除一个死消费者,与设计意图一致。
  8. 是否引入新配置:无(无新 env/config/默认值)。

测试 / CI

diff 不碰源码(纯 workflow YAML),无需新增单测;所依赖的发布完整性测试 tests/release-ci-gate.test.ts 未被本 diff 触及且在 CI 中绿。镜像缓存核验 head 99e41e9c5:summary failed=0 / pending=0;YAML 本地解析通过,push.branches 已确认去掉 master。mergeable_state=behind——合入前需同步 master(strict 分支保护),属常规人工步骤,非阻塞。

结论

干净、正确、充分披露,无 kernel/安全/配置面触碰,发布/门禁/master 复检路径均核验无回归。建议合并(合并前同步一下 master 即可)。唯一非阻塞项:ci-janitor.yml 的 master 保护 predicate 需随本次改动对齐(见上,建议单开小 follow-up issue,不阻塞本 PR)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) Review 完成(PR #5426):建议合并(APPROVE)——干净、正确,无 kernel/安全/配置面触碰;预合并门禁(pull_request 臂 + 14 个 required shard)、发布路径(release-ci-gate 复用 HEAD^2 + --dispatch)、master-build/release 独立触发、各 lane cron 均独立核验无回归,CI 绿(summary failed=0/pending=0);合入前需同步 master(strict,当前 behind)。唯一非阻塞项:ci-janitor.yml 的「master run 永不取消」保护按 event==push&&branch==master 判定,本 PR 后该盾对 master 新的 schedule 信号失效(稳态无影响、过载边缘可自愈),建议单开一个小 follow-up issue 对齐 predicate + 修那条失实注释——不阻塞本 PR。完整八问 review 已贴:#5426 (review)

@ranxianglei

Copy link
Copy Markdown
Owner Author

小问题直接修复

…3295)

Review follow-up on this PR (owner-directed in-PR fix): after dropping master
from ci.yml's push arm, the janitor's "never cancel master" guard only matched
event==push && branch==master, so it no longer covered master's new verification
signal — the :03/:33 schedule runs. Extend the guard to also exempt master
schedule runs (push stays covered for master-build/release, which remain
push-triggered), and correct the now-stale "head's required checks" comment.

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review 结论:可合并,无需追加修复 commit

机制核实(发版不受影响的依据): 发版闸不依赖 master push 臂的自动 run。release-manual / release.yml 的三段机器(scripts/release-ci-gate.mjs)是主动的:--dispatch 对发布 sha 缺 run 的每条 lane 主动 POST workflow_dispatch(#3539 派发前校验 ref 当前头==目标 sha,直推/fallback 两形态均满足);--probe-reuse 直接复用 PR head(HEAD^2)绿 run;--wait 收口。push 臂上的 master 项提供的只是无人消费的自动复检。cron :03/:33 变为 master 常任验证者(≤30min 窗口)属实;release/bugfix 臂保留,#772(bot PR action_required 依赖真实 token push check)不受影响。

残留(不阻塞):

  1. reuse/dispatch 自救支路未在生产实测过(PR 描述已披露)→ 建议合并后走一次端到端小版本发版把它验掉。
  2. ci-janitor.yml:20-22/:117-121 "master push run 永不取消"条款在本 PR 落地后变死代码——按你 PR 描述的意愿另行清理,不混入本 PR,本评审不动它。

配套纪律: 合并后请勿合并 head 从未跑绿 CI 的 release 分支 PR——旧世界有 master push 臂自动补一轮复检兜底,新世界只能靠 dispatch 自救;今天 run 41303228430 生成的 #5454 属此类(已由 owner 关闭)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

评审跟进小修(owner 指示「小问题直接修复」):已在本分支补一个 commit 5a2fff4。

ci-janitor.yml 的「master run 永不取消」保护原按 event==push && branch==master 判定——本 PR 把 master 从 ci.yml push 臂移除后,该保护不再覆盖 master 新的验证信号(:03/:33 schedule run)。改动:

  • predicate 扩为 branch==master && (push || schedule),补上 schedule 覆盖;
  • 保留 push 覆盖(master-build / release 仍是 push-trigger,避免它们变成可被回收的回归);
  • 修正现已失实的注释("head's required checks" → master 的 standing verification)。

本地已验证:YAML 可解析、嵌入 shell 过 bash -n、predicate 真值表核对(push/schedule×master = 豁免,其余仍可回收)。非阻塞项,按 owner 决定并入本 PR,未另开 issue。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) 已按你的指示直接修掉(未另开 issue):本 PR 分支补了 commit 5a2fff4,把 ci-janitor.yml 的 master 保护 predicate 从 event==push&&branch==master 扩成 branch==master&&(push||schedule)——补上 master 新的 schedule 验证信号,同时保留 push 覆盖(master-build/release 仍 push-trigger,不引入回归),并修正那条失实注释。本地已过 YAML 解析 + bash -n + predicate 真值表核对(push/schedule×master=豁免,其余仍可回收)。CI 会在新 head 上重跑。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

收工小结(PR #5426「drop master from the CI push arm」):

  1. 评审 = APPROVE——干净、正确,无 kernel/安全/配置面触碰;预合并门禁(pull_request 臂 + 14 个 required test-shard)、发布路径(release-ci-gate 经 HEAD^2 复用 PR-head 绿 run)、master-build/release 独立触发、各 lane cron 均独立核验无回归。(本账号不能 approve 本人 PR,故以 COMMENT 形式贴出 APPROVE 结论 + 结构化八问。)
  2. 按你「小问题直接修复」指示:在本 PR 分支补 commit 5a2fff4,把 ci-janitor.yml 的 master 保护 predicate 从 event==push&&branch==master 扩成 branch==master&&(push||schedule)——补上 master 新的 schedule 验证信号、保留 push 覆盖(避免 master-build/release 变成可被回收的回归),并修正那条失实注释。本地已过 YAML 解析 / bash -n / predicate 真值表核对。
  3. 现状:新 head 5a2fff4 CI failed=0(pending 13,测试运行中,无失败);合入仍由你把关,合前需同步 master(strict behind)。

@ranxianglei
ranxianglei merged commit b093150 into master Nov 1, 2026
47 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.991-master.b093150 (rolling master tag).

npm install -g billion-context@0.0.991-master.b093150  # 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