Skip to content

[PR] fix(update-ux): only offer restart when installed critical fixes are ready - #4298

Merged
ranxianglei merged 1 commit into
ranxianglei:masterfrom
ReineLan:2026-10-22_update-ready-version
Oct 23, 2026
Merged

ranxianglei merged 1 commit into
ranxianglei:masterfrom
ReineLan:2026-10-22_update-ready-version

Conversation

@ReineLan

Copy link
Copy Markdown
Contributor

Closes #4295

Category K — update visibility. A process on 0.1.178 with 0.1.179 installed and a critical 0.1.180 release could incorrectly tell users that restarting delivers the fix, even naming a newer routine release.

Resolve the action from the installed version and the critical release span, and share it across the Web banner, acp_status and /acp panel. A missing critical fix stays available; restart-ready names the actual installed version only once all advertised critical fixes are installed. Routine/recommended-only spans remain silent.

Validation: regression tests first failed on the old implementation; two code-review passes; boundary matrix for unknown/invalid/older/equal/partial/newer disk versions, multiple critical releases and future routine releases; real status/panel and HTTP status/overview parity checks. The Web fixture explicitly uses its non-persistent legacy storage mode to keep SQLite cleanup out of this UI test. All 37 targeted tests pass (update-notes, web-update-banner, acp-status, acp-status-marker-block, plugin-status-provenance). npm run typecheck and npm run build pass on current master 94f75cc; final tsc --noEmit passes after the test fixture adjustment. Build warnings: existing kernel sideEffects and pi CONFIG_DIR_NAME warnings. Full regression belongs to remote CI; no merge or release is performed.

@ranxianglei ranxianglei changed the title fix(update-ux): only offer restart when installed critical fixes are ready [PR] fix(update-ux): only offer restart when installed critical fixes are ready Oct 22, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

查重: 同 issue 双 PR,已收敛到本 PR。 #4295 曾先后出现两个修复 PR:agent 侧 #4296(先开)与本 PR(后开)。两者同一症状、同一机制、同一根因(ready 判定只看 pendingRestart,不校验磁盘是否真含 span 内全部 critical 修复),100% 置信重复。#4296 已按 one-issue-one-PR 纪律关闭并注明 "Superseded by PR #4298"(owner 在 #4295 线程指定本 PR 为交付物),无遗留并行工作。除此之外 open+closed 全量检索(失败签名: ready/available × diskVersion × pendingRestart)无其他同修条目。

标签: bug + scope/ci + p2(自更新/发版面的状态展示缺陷——误导用户以为重启即得 critical 修复;非数据丢失/缓存泄露类,故 p2。更新 UX 跨所有宿主车道,不打客户端标签)。

审核进行中,已完成的部分:PR head 74a845ef7 全 diff 通读(4 文件 +113/-19,单 commit)、三个展示面(web banner /__bili/status|.overview、acp_status、/acp 面板行)的调用点清点确认全部收敛进 updateBannerPayload 单一决策、本地定向验证 5 个测试文件 37/37 绿、负向对照(新回归测试对旧实现确实红)、typecheck 干净。CI:静态门禁全绿,test 分片部分完成部分运行中。完整八问结论随后一条给出。

@ranxianglei ranxianglei added bug Something isn't working p2 scope/ci labels Oct 22, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Review 结论:可合并(代码面零阻塞项;CI 有 1 个分片环境性卡住,细节见第 5 问)

1. 是什么问题:通道里存在多个 critical 修复、而磁盘已装版本尚未包含全部时(如 running 0.1.178 / 磁盘 0.1.179 / critical 修复在 0.1.180),Web banner、acp_status、/acp 面板三个展示面一致地告诉用户「重启即可获得修复」,面板还会点名一个更新的例行版本(如 0.1.181)。重启实际只加载磁盘上的版本——用户被误导以为重启拿到了 critical 修复。

2. 什么原因导致的:缺少「磁盘 ≥ span 内全部 critical」这单一判定谓词。三个展示面各自独立地只看 pendingRestart(磁盘≠running)就宣称 READY,面板命名 READY 时还用了 span 尾版本而非磁盘版本。根因是决策点不共享,不是某个面的展示逻辑写错。

3. 影响范围与严重程度:所有启用分级 release notes(#1870/#1977,v0.1.182+)的车道,在部分安装窗口(自动更新已把新版本写到磁盘但尚未含 critical 修复、进程未重启)内受影响。严重度 = 误导性 UX(以为重启能拿到修复、实际拿不到),p2;无数据丢失、无缓存泄露。

4. 怎么修复的:扩展既有共享 helper updateBannerPayload(它本就同时喂 /__bili/status 与 /__bili/overview),加一个「第一个未安装的 critical」检查:有缺失 → 三面统一 AVAILABLE 并点名最小未安装 critical;无缺失 → READY 并点名真实磁盘版本。三个面渲染同一份决策,不再各自分支。架构上比早前 #4296 的并行新函数更收敛(#4296 已关闭并入本 PR)。

5. 是否有回归问题:逐项清点改动前承担路径的既有行为(读的是改动前代码,不只读 diff):

6. 是否破坏缓存:不涉及——缓存/重试/增量游标/去重键逻辑均未触碰。

7. 是否改了设计方向:没有。相反,把三个独立决策分支收敛进既有共享 helper(延续 admin.ts「一个 helper 喂两个端点」的设计)。

8. 是否引入新配置:没有。

证据:本地 37/37 定向测试通过(update-notes / web-update-banner / acp-status / acp-status-marker-block / plugin-status-provenance);负控制验证——检出 master 旧实现后新增的两个 #4295 回归测试立刻失败(测试有牙);typecheck 干净;build 成功(warning 为既有 kernel sideEffects / pi CONFIG_DIR_NAME,与本 PR 无关)。

小 nit(无需动作):updateBannerPayload 里 const diskVersion = v.diskVersion; 属冗余(TS narrowing 已覆盖),纯风格,无功能影响。

判定:可合并。 唯一待办是人工重跑那个卡住的 ubuntu-24 分片,转绿后即可合并。

@ReineLan

Copy link
Copy Markdown
Contributor Author

(ai: openai/gpt-6)

Follow-up on full-suite CI: the original Ubuntu Node 24 job 119800057156 is now failed. Its check annotation explicitly says: The hosted runner lost communication with the server. It ran from 11:34:06 to 12:33:07 UTC. The last emitted test output stops before the forced-resync scenario; it is not an assertion failure for the changed update UX.

I independently ran the entire tests/incremental-lane.test.ts file at this PR's actual head 74a845ef7: 24/24 passed in about 67 seconds, including the forced-resync case. The other five full-suite lanes and both static-gate lanes in the original run passed. This is supporting evidence, not a substitute for rerunning the failed lane. The later green scoped workflow skipped the heavy test jobs and is not a full-suite green verdict.

Rerun requires an upstream maintainer: the available credentials cannot rerun upstream Actions (Must have admin rights to Repository.). No code change is justified by the runner-disconnection annotation.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

已独立核实,与你的结论一致:

唯一待办不变且卡在权限上:重跑需要 ranxianglei/billion-context 的 admin 权限——你我两套凭据都试过了,均为 403(Must have admin rights to Repository)。需要仓库 admin 在 run 39771510559 上 rerun failed jobs(或整个 run)。转绿后即可人工合并,review 侧无其他待办。

@ranxianglei

Copy link
Copy Markdown
Owner

已 rebase 到 master@07888d74(2026-10-23)。唯一冲突在 src/update-notes.ts updateBannerPayload 的 pendingRestart 分支,合并保留双方:

  • 本 PR 的修复逻辑(先用 semver.gt 找出比盘上版本更新的 critical,有缺口→报 available 指向缺失版本;无缺口才报 ready 提议重启)——这是 [update-ux] Critical update marked ready before its fix is installed #4295 的本体;
  • master 侧后合入的 summaryZh 国际化字段展开,两条返回臂都已带上。
    本地验证:tests/update-notes.test.ts + tests/web-update-banner.test.ts → 13 pass / 0 fail;tsc --noEmit 通过。无丢块。

@ranxianglei
ranxianglei force-pushed the 2026-10-22_update-ready-version branch from 74a845e to 23ef3e4 Compare October 23, 2026 05:07
@ranxianglei
ranxianglei merged commit a112af7 into ranxianglei:master Oct 23, 2026
0 of 36 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.766-master.a112af7 (rolling master tag).

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

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

收到上游冲突唤醒,核查后无需处理:

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

收到 rebase 报告,已对照合入结果核实,与描述一致:

  • 时间线:PR head 23ef3e4f5 的父提交正是 07888d74(即所报 rebase 目标),说明推上去的就是 rebase 后的分支;随后经 merge commit a112af77 合入 master,PR 状态 closed/merged。冲突工单闭环。
  • [update-ux] Critical update marked ready before its fix is installed #4295 本体逻辑在位:src/update-notes.ts updateBannerPayload 的 pendingRestart 分支——先 criticals.find(e => semver.gt(e.version, diskVersion)) 找盘上版本之上的缺口;有缺口 → 返回 available 指向缺失版本;无缺口才返回 ready(version = 盘上版本)提议重启。
  • summaryZh 国际化在位:三条返回臂(pendingRestart 内的 available 臂、ready 臂、以及非 pendingRestart 的 available 尾臂)都带了 ...(x.summaryZh ? { summaryZh: x.summaryZh } : {}) 展开,返回类型也加了 summaryZh?: string。
  • 行为变更确认(有意变更):旧行为是 pendingRestart 时一律报 ready 提议重启;新行为是盘上版本之上还有未装 critical 时改报 available——这正是本 PR 目的,非回归。

无需进一步操作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working p2 scope/ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[update-ux] Critical update marked ready before its fix is installed

2 participants