Skip to content

[PR] ci: cancel superseded master-build artifact runs - #3156

Open
ranxianglei wants to merge 5 commits into
masterfrom
2026-10-14_ci-queue-optimization
Open

ranxianglei wants to merge 5 commits into
masterfrom
2026-10-14_ci-queue-optimization

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Queue-slot hygiene follow-up to #2637.

What: master-build.yml was the only always-on master workflow with no concurrency block — two rapid merges stack two artifact builds, and both hold a runner slot to completion even though only the newest commit's artifact is ever consumed. Adds the same per-ref group + cancel-in-progress: true every e2e lane and the main CI already use.

Audit note: I initially read 8 e2e workflows as missing cancel-in-progress — false positive from a too-narrow grep window (the flag sits two comment lines below the group). They were already correct and are untouched.

Deliberately NOT touched:

  • release*.yml — release runs must never cancel each other (release-bugfix/release-manual already pin cancel-in-progress: false)
  • ci.yml path filters — 重新打开默认全量 ci #3085 explicitly reverted hot-file gating; full-matrix-per-PR is policy
  • pages.yml — already grouped; site disabled pending repo Pages enablement

Every e2e lane and the main CI have per-ref concurrency with
cancel-in-progress since #2637, but master-build.yml has no concurrency
block at all — two rapid merges stack two artifact builds and both hold
a runner slot to completion even though only the newest commit's
artifact is ever consumed.

Same slot-hygiene pattern as the rest: group by ref, cancel the
superseded run.

Deliberately NOT touched:
- release*.yml — release runs must never cancel each other
  (release-bugfix/release-manual already pin cancel-in-progress: false)
- ci.yml path filters — #3085 explicitly reverted hot-file gating;
  full-matrix-per-PR is policy
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-14_ci-queue-optimization (ffd453c)

Latest build — install this exact version

npm install -g billion-context@0.0.6202-pr.3156.5aa214d

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
ffd453c billion-context@0.0.6202-pr.3156.5aa214d build
9988d1e billion-context@0.0.6114-pr.3156.b4cecb7 build
9668ffe billion-context@0.0.6022-pr.3156.e092aa1 build

Download artifact

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

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

PR 已核对完毕(分支 2026-10-14_ci-queue-optimization,单 commit a3e35a3f1,与 master 无落后)。结论:可合(待剩余 test 矩阵 lane 转绿,合并由你操作):#3156

结构化八问

  1. 是什么问题:master-build.yml 是 master 上唯一没有 concurrency 块的常驻工作流——连续两次快速合并会叠两条构建各占一个 runner 槽位跑完,而只有最新一次构建的产物会被消费。
  2. 什么原因导致的:CI 排队与执行时间优化:不降低质量的前提下大幅节省(数据+方案清单) #2637 给所有 e2e lane 和主 CI 加了同 ref 取消机制时,master-build 这条独立的常驻产物 lane 没有被覆盖,被取代的 run 没有任何机制去取消它。
  3. 影响范围与严重程度:仅 CI 资源面——两次快速合并浪费一个 runner 槽位(约数分钟的 install+build+publish),不影响任何用户、npm 产物或发布流程。属资源浪费级,非功能缺陷。
  4. 怎么修复的:加顶层 concurrency: group: master-build-${{ github.ref }} + cancel-in-progress: true,与 e2e lane/ci.yml 自 CI 排队与执行时间优化:不降低质量的前提下大幅节省(数据+方案清单) #2637 起的既有模式逐字一致——新 run 启动时取消同 ref 上在跑的旧 run。
  5. 是否有回归问题:逐项审过 master-build.yml 既有行为——
    • rolling master dist-tag:最终指向不变(无论串行还是取消,最后生效的都是最新构建);
    • npm 发布原子性 + 版本号唯一(0.0.<run_number>-master.<sha7>,run_number 单调且允许空洞,Design: PR artifact publishing — stop dist-tag growth with single rolling tag + monotonic 0.0.x-pr versions #1385):被取消的 run 只是没发出版本,不存在半发布或 E409 冲突,重跑逻辑不受影响;
    • release 合并不受影响:发布步骤全部 gate 在 is_release == 'false',release 走的是未改动的 release.yml;
    • release-bugfix/release-manual 保持 cancel-in-progress: false ✓,pages.yml 已有分组 ✓,ci.yml path filter 未动 ✓;
    • 有意行为变更(按规范披露,旧→新):旧——每次非 release 合并都必然发布其精确版本并在对应 PR 下留「📦 Merged Build Published」评论;新——若该 run 被后续合并的 run 取消,其精确版本不会发布、对应 PR 不会收到评论。rolling tag(文档化的消费路径)不受影响。PR 描述已披露此取舍("only the newest commit's artifact is ever consumed"),判定为有意变更而非回归。
  6. 是否破坏缓存:不涉及(未触碰缓存/重试/游标/去重逻辑)。
  7. 是否改了设计方向:不涉及——是把 CI 排队与执行时间优化:不降低质量的前提下大幅节省(数据+方案清单) #2637 的既定模式补到最后一个漏掉的 lane,无架构转向。
  8. 是否引入了新的配置:不涉及。

独立核查记录(不引用 issue 侧结论,自己重做的):

  • 全量清点 .github/workflows/ 全部 24 个工作流的 concurrency 配置:确认 master-build 是唯一的「master push 常驻且无 concurrency」lane(advisories.yml 有 advisories/** path gate,dist-tag-cleanup 是 workflow_dispatch,release* 按设计不动);issue 里「8 个 e2e workflow 误报缺失」的 audit note 属实——它们都已有 group + cancel-in-progress: true;
  • diff 恰好 7 行新增 0 行删除,单文件,每行都与目的相关;YAML 解析通过,concurrency 位置(on: 之后、permissions: 之前)合法;
  • CI(head a3e35a3f1):39 个 check run,0 失败;build-artifact、lane-guard、version-guard、config-surface-guard、kernel-guard、pi-subagents-guard、docs-sync、lock-sync、unused-exports 及全部 fake-upstream e2e lane 已绿;ubuntu/windows × node 22/24 的全量 test 矩阵仍在跑——本次 diff 不触碰任何运行时代码,预期转绿,若变红我会跟进报告。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 收尾更新:39 个 check run 全部完成,38 绿、1 红——唯一失败是 test (windows-latest, 24, 2) 全量测试矩阵的一个 shard,已定位,与本 PR diff 无关的已知 Windows 假红:

处置建议:对失败的 job 点一次 Re-run failed jobs 即可,预期转绿后合并;flake 本身的修复归 #3152,不在本 PR 范围内。其余八问结论维持上一条回复不变——可合。

@ranxianglei ranxianglei changed the title ci: cancel superseded master-build artifact runs [PR] ci: cancel superseded master-build artifact runs Oct 26, 2026
ci-check added 3 commits October 26, 2026 14:17
master window commits 293ae65/de5e03659 bumped kernel/package.json to
0.0.165 without regenerating the lockfiles; lock-sync re-resolution then
rewrites the stale recorded versions (root 0.0.163, kernel 0.0.164) and
fails. Pure recorded-version sync via npm install --package-lock-only;
no dependency or semantic change.

This branch has not been deployed

No deployments
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