Skip to content

[PR] Restore the emergency channel (raw_publish/skip_ci_gate) + fix the four feature regressions introduced by this revert (A | 恢复紧急通道(raw_publish/skip_ci_gate)+修掉这次回退带回来的四处功能损失(A–E) - #5447

Merged
ranxianglei merged 1 commit into
masterfrom
2026-11-01_restore-emergency-channel
Nov 1, 2026

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

一句话

#5446(恢复老流程)已经合并了,这个 PR 不推翻它:老的正常路径(npm ci → typecheck → build → 全量 CI lane 绿了才发)完整保留,在其之上把今天 #5430 的紧急通道加回来,并修掉回退时顺手弄丢的四处功能。最终效果 = 老流程 + 紧急按钮并存。

改动内容(单文件 .github/workflows/release-manual.yml)

已验证

验证方式(合并后)

  1. 不勾任何项直接 Run:走老路径,npm ci+typecheck+build+全量 CI 绿了才发布——和 [PR] Restore the old CI release manual. | 恢复老的ci release manal #5446 预期一致。
  2. 勾 raw_publish、version 留空 Run:应直接 publish(日志有 EMERGENCY CHANNEL/NUCLEAR 审计行);再连点一次第二版也不卡(这就是 E+[PR] Emergency channel fix: after the first emergency release, the second one is no longer stuck. | 紧急通道修复:第一次紧急发版之后,第二次不再被卡死 #5445)。

…5430) on top of the reverted flow, with four regressions fixed

#5446 ('恢复老的ci release manal') restored the classic pre-flight npm ci +
typecheck + build and dropped today's emergency buttons. Owner decision
(2026-11-01, incident): keep BOTH — the old full-CI normal path AND the
emergency channel. This restores release-manual.yml from 1115455 (the last
state that had the channel, i.e. #5430-era workflow) and adds back the single
line #5446 kept: npm ci inside the Pre-flight gate. Net effect vs master:

A. skip_ci_gate + raw_publish inputs, Raw emergency publish step and all the
   if-conditions that wire them — back. Emergency = deps download + build +
   publish, zero CI, no master push, tag + GitHub Release + version-sync PR.
B. Full CI dispatch again carries CI_FULL_DISPATCH=1 — direct releases
   dispatch the COMPLETE lane set at the publish sha, not ci.yml's CORE
   default (the #3539 windows/node24 gap #5446 reopened).
C. Bump version syncs the plugin manifests via scripts/sync-codex-plugin-version.mjs
   and Verify bump diff accepts them again (#4449).
D. job timeout-minutes: 90 is back — a wedged release run can no longer pin
   the one-click-release concurrency group for hours.
E. Drift guard keeps its pending-bump state (#5376) instead of hard-failing
   whenever master leads npm by one patch.

Plus the #5445 fix folded in: on the raw_publish path a master/npm version
skew (the state right after emergency publish #1, before its version-sync PR
merges) logs a loud audit warning instead of exit 1 — back-to-back emergency
publishes work. The duplicate-publish guard (npm version already exists) stays.

Verified: YAML parses; inline scripts of Drift guard / Raw emergency publish /
Bump version pass bash -n.
@ranxianglei ranxianglei changed the title 恢复紧急通道(raw_publish/skip_ci_gate)+修掉这次回退带回来的四处功能损失(A–E) [PR] Restore the emergency channel (raw_publish/skip_ci_gate) + fix the four feature regressions introduced by this revert (A | 恢复紧急通道(raw_publish/skip_ci_gate)+修掉这次回退带回来的四处功能损失(A–E) Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-01_restore-emergency-channel (2c93c08)

Latest build — install this exact version

npm install -g billion-context@0.0.7713-pr.5447.447d979

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
2c93c08 billion-context@0.0.7713-pr.5447.447d979 build

Download artifact

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

落地提醒:本分支的 Pre-flight gate 仍缺依赖安装行(继承 #5444 删掉的 npm ci)——npm run typecheck/build 之前没有任何步骤装 node_modules,单独合入会让常规一键发版在裸 runner 上再次 tsup: not found(exit 127,已有实测 run 41299003460)。

修法在 #5448(与本分支同 base 3411b1a62,hunk 互补、可干净套用):要么本 PR 落地后紧跟 rebase 合入 #5448,要么直接把那一行带进来。细节见 #5450 的核对报告。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。本 PR 是 #5430 紧急通道(曾合入、后被 #5446 回退)的重做,并把已关闭未合的 #5445(第二次紧急发版被 drift guard 卡死)一并收进来。相关链:#5430(原通道)/ #5446(回退老流程)/ #5445(被取代)/ #3539(全矩阵派发)/ #4449(manifest 同步)/ #5376(pending-bump)。基于含 #5446 的 master(f248a9ef3),单文件 302 行,无冲突。

审核方式(独立性):没照抄 issue 结论。我独立读了回退后基线文件(f248a9ef3,379 行)与完整 diff,逐条推演 raw / 正常 / fallback 三条路径的门控,核对了脚本依赖(scripts/release-ci-gate.mjs、scripts/sync-codex-plugin-version.mjs 均在 PR head 存在),用 python 解析了 YAML(22 步 OK)、对全部 20 个内联 run 块跑了 bash -n(均过)。

A–E 逐项核实

  • A 紧急通道:两勾选项 + Raw emergency publish 步骤齐全;发布本身正确——关键点是 Bump version 步骤在 raw 模式下仍会执行、把工作区 package.json 改成目标版本,所以 npm run build+npm publish 发的是对的号。但收敛机制有真实缺陷,见发现 1。
  • B 全量派发:确认承重——release-ci-gate.mjs:305 仅当 CI_FULL_DISPATCH==="1" 才把 ci.yml 从 CORE 提到 FULL 矩阵。加回 direct 路径正确。这是有意行为变更(direct 路径 CORE→FULL,CI 变多),即 B 本意,非回归。
  • C manifest 同步:脚本存在;白名单精确到具体文件(.agents/.claude-plugin/plugins/codex 各 manifest),正确。
  • D timeout-minutes:90:加回,正确。
  • E pending-bump:逻辑正确(tree==nextPatch(npm) 且 目标==tree 且 tag 不存在 → 跳过 bump 提交直接发);[PR] Emergency channel fix: after the first emergency release, the second one is no longer stuck. | 紧急通道修复:第一次紧急发版之后,第二次不再被卡死 #5445 的二次放行(raw 分支只 warning 不拦截)也在。正常路径不受影响(tree==npm 时整段跳过,同基线)。

发现(按严重度)

  1. [p2 · 功能] raw 路径的版本同步 PR 是空的,无法收敛 master。 根因:raw 模式下 Bump version 只改工作区文件(package.json/lock/manifests)、从不 git commit(Commit and push 被 if: raw_publish != 'true' 跳过),于是 git push origin "HEAD:refs/heads/emergency-sync-…" 推的是干净的 master 提交,与 base 同一 sha —— GitHub 要么拒建("nothing to compare")要么建出空 PR,合并它什么都不改。后果:每次紧急发版后 master 落后 npm,下一次普通一键发版会被 drift guard 拦死,直到人工手 bump;而步骤摘要与正文都写"合并这个 version-sync PR 即可收敛 master",与实际不符。

  2. [p3 · 整洁/披露] 约百行 train-mode / backport-reconcile 死代码。 train 桩(if:false)、Commit and push 里的 train 推送分支、整段 Reconcile backport-labeled PRs(if: steps.train.outputs.name != '')、fallback PR 的 train intro——因 steps.train 桩恒空,全部不可达。注释说"保留桩让引用保持惰性",但留的是完整实现而非最小桩,且 PR 正文完全没提这部分。属惰性代码(无功能回归),不阻塞;建议要么只留最小桩、其余删掉,要么至少在正文披露。

结构化八问

  1. 是什么问题:把 [PR] Restore the old CI release manual. | 恢复老的ci release manal #5446 回退时连同丢掉的紧急发版按钮 + 四处功能(B/C/D/E)加回来,做成"老流程 + 紧急按钮并存"。
  2. 什么原因导致:[PR] Restore the old CI release manual. | 恢复老的ci release manal #5446 回退到老流程时,B/C/D/E 随紧急通道一起被删;本 PR 在其上补齐。
  3. 影响范围与严重度:只动一键发版工作流一个文件。正常路径恢复成正确的全量 CI 行为;紧急路径发布可用,但发版后的自动收敛坏了(p2,有人工绕行:手 bump master)。
  4. 怎么修的:A 加两勾选 + raw 直发步骤(下依赖→build→publish→打 tag→Release→开收敛 PR,零 CI 不碰 master);B direct 派发补 CI_FULL_DISPATCH;C bump 时跑 manifest 同步脚本 + 放宽白名单;D 加 job 超时;E drift guard 识别 pending-bump 合法态。
  5. 是否有回归:正常路径逐门核对无回归;唯一漂移是 direct 路径 CORE→FULL(是 B 预期)。fail-fast 未被吞、阈值/时序除 D 外无漂移。新引入一处:空同步 PR(发现 1)。
  6. 是否破坏缓存:不涉及(纯发版基建,无运行时缓存)。
  7. 是否改设计方向:新增"核按钮"旁路车道与正常流程并存,方向合理;但顺带把已退役(2026-10-25)的 train-mode 脚手架复活成惰性代码,偏重。
  8. 是否引入新配置:两个新 workflow_dispatch 输入 skip_ci_gate / raw_publish(均布尔、默认 false、UI 勾选,非 env/config 键)。默认都不勾 = 走老路径,向后兼容。

判定:方向对、A–E 主体成立、正常路径干净无回归;但紧急通道收敛机制有真缺陷(空同步 PR),会让每次应急发版后卡住普通发版且工具文案误导。建议先修掉发现 1(或明确降级为手动收敛并改文案)再合并;发现 2 死代码可顺手精简。全量 test lane 在跑(in_progress),本 PR 未改源码,与其无直接关系。

要我直接在这个 PR 分支上把发现 1 的修法①(补 commit)落地、并顺手删掉发现 2 死代码吗?因为是你的发版基建、又刚回退过一次的高敏区,我没擅自动手,等你拍板走哪个方案。

@ranxianglei
ranxianglei merged commit 9ddc5d1 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.989-master.9ddc5d1 (rolling master tag).

npm install -g billion-context@0.0.989-master.9ddc5d1  # 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.

abebatista pushed a commit to abebatista/ranxianglei-billion-context that referenced this pull request Nov 1, 2026
…ncing

Today's audit of the raw_publish emergency path (ranxianglei#5430/ranxianglei#5447) found two
silent bookkeeping bugs in 'Raw emergency publish': the Bump version step
stages the bumped package.json/changelog/manifests but never commits them
(the commit lives in 'Commit and push to master', which the raw path
skips), so in the raw workspace:

1. git tag v$VER pointed at a tree that still carried the OLD version —
   later bugfix-lane cuts-from-tag read the stale version from the tree
   and misfire their strict-newer/already-live guards;
2. git push HEAD:refs/heads/emergency-sync-... pushed a branch byte-
   identical to master -> empty diff -> GitHub rejects the auto sync PR
   with a 422 -> master never converges -> the next NORMAL one-click
   release aborts on the drift guard.

Fix: commit the staged bump in-place right after npm publish, before any
tag/branch push. The tag then points at a version-consistent tree and the
sync PR carries a real mergeable diff (branch name still matches neither
release.yml gate, so merging publishes nothing). On the pending_bump path
the tree is already bumped, nothing stages, and the guarded commit
no-ops with a notice.
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