Repository navigation
fix: one-click release speed — slim pre-flight, single full-suite pass, stale-run self-heal (#3539) - #3560
Conversation
…s, stale-run self-heal (#3539)
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4238-pr.3560.6263f72This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3560.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 近 30 个 open PR 里没有第二个在做「一键发版提速 / release-ci-gate」这件事,#3560 是 open 的 #3539 的唯一修复 PR。 总体结论:代码质量高、测试有牙、CI 全绿、rebase 干净;但对 load-bearing 发版基建有一处未披露的跨渠道语义变化(bugfix 热修通道的头校验),在我确认它安全或加上防御性 guard 前,不建议直接合并。 按 [PR] 规则我未改代码,只核对+报告。 核对事实(都在 pushed head d13918e 上验过):
结构化八问
两处非阻塞小瑕疵(供参考,不影响判定):① 收工判定:暂不建议合并。 唯一卡点是第 3/5 问那处 bugfix carve-out 合并路径的头校验:请作者确认「carve-out head 分支合并后一定存活且未移动」这一前提是否成立;若不能保证,按第 4 问加个几行的防御性 guard 即可闭环。你拍板后我可以立即补上该 guard(独立标注 commit)+ 复跑定向测试,或直接把上面两处小瑕疵一并修掉。其余部分(两个已更新渠道 + kernel 渠道 + 测试)我已审完,可放行。 |
|
小问题直接修复 |
Review follow-up on #3560 (小问题直接修): the --probe-reuse header claimed the mode "always exits 0", but its latestRunAt() loop throws on an upstream API error and main().catch turns that into exit 1. The design is already fail-safe (the calling step uses continue-on-error:true and the absent/"no" output degrades to "run the local suite anyway"), so this aligns the comment with the code fact rather than changing behavior. No behavior/version change.
(ai: vllm-qwen/qwen3.8-27b) 收到,小问题已直接修掉并推到 PR 分支(增量 commit,未 force、未合并): 已修(1 处 · commit 更正我上一轮的一处误判:review 里我列的「nit①—— 仍待决策(非小问题,未动):bugfix carve-out 合并路径的头校验潜在回归——需你拍板:确认 carve-out head 分支合并后一定存活且未移动,或让我按上轮建议加防御性 guard。这属于 load-bearing 发版基建的语义收紧,不在「小问题直接修」范围,继续等你定。 CI 会在新 head |
|
仍待决策(非小问题,未动):bugfix carve-out 合并路径的头校验潜在回归——需你拍板:确认 carve-out head 分支合并后一定存活且未移动,或让我按上轮建议加防御性 guard。这属于 load-bearing 发版基建的语义收紧,不在「小问题直接修」范围,继续等你定。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.536-master.5406747 # this exact build
npm install -g billion-context@master # always the newest merged build
|
(ai: vllm-qwen/qwen3.8-27b)
Fixes #3539
修什么
一键发版链路里同一套全量测试被重复跑 2-3 遍、前置门单机串行 30-40 分钟、发版分支头移动后旧头 run 继续烧 runner(v0.1.198 实际发生,#3534)。本 PR 按 issue 方向 1+3 实现,方向 2(提前探测 direct/fallback)经评估不做——理由见 #3539 评论。
改动(5 个文件)
scripts/release-ci-gate.mjs(核心):--dispatchdispatch 前先 GET 分支 head,不等于目标 sha 就拒绝 dispatch 并立即报错(原来:照样 dispatch → run 落错 sha → 白烧 runner → gate 硬等 60 分钟超时);RELEASE_RUN_STARTED_AT(取自${{ github.run_started_at }})圈定本次 release attempt,只取消「event=workflow_dispatch + head≠目标 sha + 创建时间晚于 attempt 开始」的 in-flight run;scheduled/push/PR 触发和更早的 run 一律不碰;best-effort,失败只告警不阻塞 gate;--wait新增WAIT_TRACK_HEAD=1跟头模式(fallback 用):分支头移动时自动取消旧头 in-flight run、在新头补 dispatch 缺失 lane,然后继续等绿;--probe-reuse:一次性非阻塞探测「所有 lane 是否都已在 EXTRA_MATCH_SHAS(PR head)有绿 run」,写allLanesReused=yes|no到$GITHUB_OUTPUT,恒 exit 0;CI_FULL_DISPATCH=1:dispatch ci.yml 时带inputs.full=true(full 矩阵而非 core),让发版分支一次拿到完整 lane 集。.github/workflows/release-manual.yml(one-click):npm ci + typecheck + test + build(~30-40 min 串行)→npm ci + typecheck + build(~8 min);全量测试的唯一执行体变成 dispatch 到精确 publish sha 上的分片 CI lanes,gate 等全绿才放行(policy 2026-10-10 不变);RELEASE_RUN_STARTED_AT;release-ci-gate.mjs --dispatch+CI_FULL_DISPATCH=1,完整 lane 集一次跑在分支头上;.github/workflows/release.yml(合并发布):npm test条件化:仅当「所有 lane 已在 PR head 有绿 run 且 master 自 PR head 后未移动(git rev-list --count HEAD^2..HEAD= 0)」时跳过——即 PR-head 树就是当前树,本地重跑可证冗余。人工开的发版 PR(core lanes only)e2e lanes 在 PR head 缺失 → 永不跳过,行为与现在完全一致。Full CI gate 仍无条件挡 publish。tests/release-ci-gate.test.ts:mock 扩展(branches/cancel 路由、list-runs 无 head_sha 过滤形态)+ 7 个新回归测试(head 不符拒绝、stale 取消三条件圈定、无 anchor 时禁用、track-head 跟头+取消+重定位到绿、probe yes/no、CI_FULL_DISPATCH payload)。既有 9 个测试全部原样通过。reference/release.md:one-click/标准流程描述同步。行为变更(旧值 → 新值 + 原因)
npm test(30-40 min)→ 不再本地跑;全量测试改由 CI lanes 在精确 publish sha 上并行跑一遍(gate 仍挡 publish)。覆盖不减(lane 集与 branch protection 同款),墙钟从 ~50-70 min 降到 ~18-25 min(队列空闲时可逼近 15 min 验收线)。npm test:仅在可证冗余时跳过(见上);人工发版 PR 渠道行为零变化。Full CI gate 位置、语义未动。验证
node --import tsx --test tests/release-ci-gate.test.ts→ 16/16 通过(含 7 个新回归);npm run typecheck干净;两个 workflow YAML 解析通过;需要人工 review 的原因
触碰 release workflow(load-bearing infra,§7.4 不可 auto-merge)。