Skip to content

[PR] Auto-update staggered window cap: 48 hours → 7 days | 自动更新错峰窗口上限 48 小时 → 7 天 - #5427

Open
ranxianglei wants to merge 7 commits into
masterfrom
2026-11-01_stagger-7d
Open

ranxianglei wants to merge 7 commits into
masterfrom
2026-11-01_stagger-7d

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

改什么

自动更新发现新版本后的错峰抽取窗口,上限从 48 小时拉长到 7 天(下限 15 分钟不变)。每台实例仍是在窗口内随机抽一个时刻、落盘持久化、到点再升(#3619),只是摊开范围从 2 天变 7 天,坏发版有更长的中途拦截窗口。

动了两处(必须一起,缺一不生效)

  1. 内置默认 STAGGER_MAX_DELAY_DEFAULT_MS:48 * 3_600_000 → 7 * 86_400_000(src/update-policy.ts)——远程策略文件不可达/未配置时的兜底;
  2. 官方远程策略文件 auto-update-policy.json:default.maxDelay "2d" → "7d"——远程默认优先级高于内置,只改常量的话线上实例实际仍按 2d 走。

兼容性

  • 已抽中的时刻按 (dist-tag, 目标版本) 键落盘,升级到本版不重摇:旧抽取照旧到点执行,只有新发现的版本才在 7 天窗口内抽;
  • 逃逸路径不变:手动 bili update 绕过;staggerMinDelayMs: 0 + staggerMaxDelayMs: 0(或 BILI_UPDATE_STAGGER_MIN_MS/MAX_MS)恢复立即升级;ACP_AUTO_UPDATE=0 全停;
  • 优先级不变:本地 config/env > 远程策略 > 内置;
  • STAGGER_PRUNE_MS(7 天)只清理已过期 7 天以上的旧抽取,不会误删还在等待中的 7 天抽取。

文档与测试

  • README.md / README.zh-CN.md、CONFIGURATION.md / CONFIGURATION.zh-CN.md(默认值、环境变量表、窗口合成说明)同步改为 604800000 / 7 days / 7 天;
  • CHANGELOG Unreleased → Changed;
  • tests/update-policy.test.ts 47/47、knobs-config-precedence 16/16、update-integrity/backoff 等全绿;本机 update-channel.test.ts 2 例失败是本机 verdaccio 镜像配置所致,在纯净 master 上同样失败,与本分支无关;
  • 根 tsc --noEmit 干净。

@ranxianglei ranxianglei changed the title 自动更新错峰窗口上限 48 小时 → 7 天 [PR] Auto-update staggered window cap: 48 hours → 7 days | 自动更新错峰窗口上限 48 小时 → 7 天 Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-01_stagger-7d (d8382df)

Latest build — install this exact version

npm install -g billion-context@0.0.10272-pr.5427.1a38864

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
d8382df billion-context@0.0.10272-pr.5427.1a38864 build
a06344a billion-context@0.0.10269-pr.5427.6a58740 build
8251dde billion-context@0.0.9521-pr.5427.9fb73f0 build
7e3daa9 billion-context@0.0.9513-pr.5427.c12878b build
cb7cfd3 billion-context@0.0.9204-pr.5427.c2b526a build
c7271f0 billion-context@0.0.8948-pr.5427.33ca0fb build
cb7bf43 billion-context@0.0.7697-pr.5427.bd94b88 build
b67efee billion-context@0.0.7693-pr.5427.c265336 build
1d4b1ba billion-context@0.0.7690-pr.5427.0a8a329 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei
ranxianglei force-pushed the 2026-11-01_stagger-7d branch from b67efee to cb7bf43 Compare November 1, 2026 09:56
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复。检索 open+closed issue/PR 中 stagger 相关项,仅 #4794(updater "Check now" 只查不装)沾边,机制与症状均不同;本 PR 自身即该改动的唯一在途工作。

标签: pr + scope/other + p3(有意行为变更,非缺陷;自更新域不属于 kernel/wiring/storage/ui/ci/docs 任何一类,归 other;影响轻微)。

审核结论(结构化八问)

  1. 是什么问题: 不是缺陷修复,是有意变更——自动更新错峰抽取窗口上限从 48 小时拉长到 7 天(下限 15 分钟不变),让坏发版有更长的中途拦截时间(Automatic staggered rollout: default random upgrade interval of 15 min – 48 h + GitHub remote policy file (emergency kil | 自动升级撒点:默认 15 分钟~48 小时随机升级 + GitHub 远程策略文件(紧急刹车/按版本调速),给事故留响应窗 #3619 机制的参数调整)。
  2. 什么原因导致的: 无缺陷因果链;产品决策。Automatic staggered rollout: default random upgrade interval of 15 min – 48 h + GitHub remote policy file (emergency kil | 自动升级撒点:默认 15 分钟~48 小时随机升级 + GitHub 远程策略文件(紧急刹车/按版本调速),给事故留响应窗 #3619 的抽取/落盘/到点升级机制本身工作正常,只动窗口参数,且按设计必须两处同改(内置常量 + 官方远程策略文件),本 PR 两处都改了,方向正确。
  3. 影响范围与严重程度: 所有走自动更新、未设本地覆盖的实例——发现新版本后最坏等待从 ≤48h 变 ≤7d(均值约 24h→约 3.5d)。已落盘的旧抽取不受影响(按 dist-tag+目标版本键控,不重摇)。逃逸路径不变(手动 bili update / min0+max0 / ACP_AUTO_UPDATE=0)。属体验级有意变更,无功能损伤。
  4. 怎么修复的: STAGGER_MAX_DELAY_DEFAULT_MS 172800000→604800000(src/update-policy.ts)+ auto-update-policy.json default.maxDelay "2d"→"7d",优先级链(本地 config/env > 远程策略 > 内置)不动,文档四件套与测试同步。审核中发现一个真问题: 首提交 1d4b1ba 手改了 CONFIGURATION.md/.zh-CN.md 里由 website/config-reference/*.yaml 生成的表格块,却没改种子——CI 的 docs-sync job(重新 generate + git diff --exit-code)必红;我在 PR head 上复现了该红(生成器把 4 行翻回 48h)。作者随后已自行补上 b67efee("docs: stagger-7d table rows come from the config-reference seed"),我独立验证过:从新种子重新生成,输出与 PR 提交的文档文本逐字节一致,漂移消除。
  5. 是否有回归问题: 逐项清点既有行为——① prune 语义: STAGGER_PRUNE_MS(7d)只删已过期超过 7 天的旧抽取(src/update-policy.ts:428 now - draws[k] > STAGGER_PRUNE_MS),新窗口内尚在等待的抽取 delta 为负、永不误删 ✓;② 落盘/重摇语义不变(earliest-draw-wins Math.min,键含版本);③ 逃逸路径与优先级链不变;④ 未触碰 wire/配置 schema/持久化格式/kernel/;⑤ 残留 "48h" 引用仅剩 src/duration.ts 文档注释示例(通用时长格式,正确)与 CHANGELOG 历史条目(应保留)。未发现回归。
  6. 是否破坏缓存: 不涉及(不触碰压缩/缓存路径)。
  7. 是否改了设计方向: 不涉及——机制原样,仅默认窗口参数放宽。
  8. 是否引入了新的配置: 不涉及——无新 key/env,仅默认值变化。

行为变更披露(强制): 默认错峰窗口上限 48h → 7d(旧值 172800000ms / 远程 "2d",新值 604800000ms / "7d",内置与远程策略同步);原因:坏发版拦截窗口拉长;代价:新版本最坏落地时间从 2 天变 7 天——issue 正文已明示为 owner 意图,此处正式记录 old→new。

验证证据: 本地(新 head b67efee 等价树)定向跑 tests/update-policy.test.ts + tests/knobs-config-precedence.test.ts = 63/63 绿,tsc --noEmit 干净,generate 幂等。作者提到的 update-channel.test.ts 本机 2 例失败系本机 verdaccio 镜像环境所致(纯净 master 同样失败),与本分支无关;全量判定以 CI 为准。

CI 状态(写此回复时): 新 head b67efee 的 run 刚入队(docs-sync 等全部 queued,fetched_at 09:50Z);mergeable_state=behind(master 前移,非阻塞)。

收工判定: 方向正确、实现闭环(两处常量 + 种子 + 文档 + 测试齐整)、审核发现的唯一实质问题(seed 漂移)已由作者跟进提交修复并经我独立验证消除;预期 CI 转绿后即可合并(合并由人工执行)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict rebase complete — PR #5427 is mergeable again.

What I did this run:

  1. Rebased 2026-11-01_stagger-7d onto master. Master moved while I worked (it advanced 2454 commits past my initial base mid-run), so the final base is the live master tip 58a87962. Both rebase passes together produced the pushed head c7271f09.
  2. Resolved every conflict in commit 1 (all caused by master relocating the config docs from root CONFIGURATION.md to docs/configuration.md after the PR was cut):
    • Root CONFIGURATION.md / .zh-CN.md → kept master's redirect stubs (the real content now lives in docs/).
    • docs/configuration.md + .zh-CN.md → ported the PR's 7 stagger-default edits each to the new location (table rows, autoUpdate prose, update section Default/window-composition/Staggered-rollout text, env table + env description).
    • README.md / .zh-CN.md → union resolution: "15 min – 7 days" wording plus master's new docs/configuration*.md#update link.
    • CHANGELOG.md → kept master's grown [Unreleased] block intact, inserted the PR's entry at the top of the first Changed section.
  3. Commit 2 (website/config-reference/updates.yaml seed) applied clean; ran node tools/gen-config-docs.mjs generate afterwards → zero diff, i18n parity ok — the hand-edited table rows are byte-identical to the seed-derived output, so the docs-sync lane stays green.
  4. Three small labeled follow-up fixes (own commits, same mechanism — stale 48 h wording the PR couldn't have seen at its base):
  5. Verified: npm run typecheck clean; targeted tests/update-policy.test.ts 47/47 pass locally; final branch diff vs master is exactly the PR's intended footprint (12 files, 32+/32−, nothing else). Deliberately left untouched: log-retention's unrelated 48 h target, src/duration.ts's generic duration examples, and the historical Automatic staggered rollout: default random upgrade interval of 15 min – 48 h + GitHub remote policy file (emergency kil | 自动升级撒点:默认 15 分钟~48 小时随机升级 + GitHub 远程策略文件(紧急刹车/按版本调速),给事故留响应窗 #3619 CHANGELOG entry.
  6. Pushed (force-with-lease against the exact pre-push head) and confirmed live: mergeable: true, mergeable_state: blocked (CI running on the new head + human-only merge — no conflict remains). Full-suite verdict rides on the remote CI lanes on c7271f09; the mirror check-cache I read was a stale Nov-1 snapshot, so per-check results will land as the poller refreshes.

No behavior change was introduced by the rebase itself: the code delta vs master is byte-for-byte the PR's own (constant STAGGER_MAX_DELAY_DEFAULT_MS 48 h → 7 days + comments + docs); my extra commits touch documentation/comments only.


中文八问

  1. 是什么问题:PR 分支与 master 文本冲突(merge state dirty),无法合并。
  2. 什么原因导致的:PR(11-01)创建后,master 把配置文档从根目录 CONFIGURATION.md 迁到 docs/configuration.md(owner 指令 2026-11-08)、README 链接改指 docs/、CHANGELOG [Unreleased] 大幅增长——PR 的原始 diff 全部落在旧位置上,产生冲突;属文档搬家型冲突,非代码分歧。
  3. 影响范围与严重程度:仅该 PR 自身的可合并性;修复前无法合并,修复后恢复。无任何运行时行为影响。
  4. 怎么修复的:rebase 到当前 master(期间 master 又前进 2454 个提交,二次 rebase 到最新 tip 58a87962);冲突按「保留 master 结构 + 把 PR 内容移植到新位置」逐处解决;用 gen-config-docs generate 验证重生成零 diff;顺手修掉 3 处 PR 基线之后才出现的旧 48h 表述(JA README、lifecycle 表、测试文件头注释)。
  5. 是否有回归问题:无。代码文件(src/update-policy.ts、knobs.ts、测试、policy json)自动合并零冲突,与 master 的 diff 只有 PR 本意的常量与注释改动;typecheck 干净;定向测试 47/47 通过;未触碰日志保留的 48h 目标、duration 通用示例、历史 CHANGELOG 条目等无关内容。
  6. 是否破坏缓存:不涉及(未触碰任何缓存/重试/游标/去重逻辑)。
  7. 是否改了设计方向:否。
  8. 是否引入了新的配置:rebase 本身未引入新配置。行为变更披露:PR 自身的目的变更 = 自动更新错峰窗口内置默认上限 48 小时 → 7 天(old→new,PR 描述已声明),rebase 原样保留,未新增漂移。

收工判定:冲突已全部解决并推送(c7271f09,base = 当前 master tip),live 状态 mergeable=true;剩 CI 在新 head 上跑绿 + 人工合并,agent 不代合。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot]
(ai: opencode/qwen3.8-27b)

Rebase 后终审完成(head c7271f09,base = master tip 58a87962)——可合并。 本次对冲突解决后的新 head 独立重审:逐行读了 12 文件全量 diff、在 PR head worktree 里重跑文档生成器验证零漂移、定向跑测试 63/63 绿、grep 全树确认无残留旧值引用。CI 30/30 绿(0 failed / 0 pending,fetched 14:34Z),mergeable_state=blocked 仅因人工合并门禁。

结构化八问

  1. 是什么问题:不是缺陷修复,是有意行为变更——自动更新错峰抽取窗口上限从 48 小时拉长到 7 天(下限 15 分钟不变),给坏发版更长的中途拦截时间(Automatic staggered rollout: default random upgrade interval of 15 min – 48 h + GitHub remote policy file (emergency kil | 自动升级撒点:默认 15 分钟~48 小时随机升级 + GitHub 远程策略文件(紧急刹车/按版本调速),给事故留响应窗 #3619 机制的参数调整)。
  2. 什么原因导致的:无缺陷因果链;产品决策。按设计必须两处同改(内置常量 + 官方远程策略文件,远程默认优先级高于内置),本 PR 两处都改了:STAGGER_MAX_DELAY_DEFAULT_MS 172800000→604800000(src/update-policy.ts:51)+ auto-update-policy.json default.maxDelay "2d"→"7d"。方向正确。
  3. 影响范围与严重程度:所有走自动更新且未设本地覆盖的实例——发现新版本后最坏等待 ≤48h → ≤7d(均值约 24h → 约 3.5d)。已落盘旧抽取按 (dist-tag, 版本) 键控不重摇,照旧到点执行。逃逸路径不变(手动 bili update / min0+max0 / ACP_AUTO_UPDATE=0)。体验级有意变更,无功能损伤。
  4. 怎么修复的:常量 + 远程策略文件同步改宽;优先级链(本地 config/env > 远程策略 > 内置)、落盘/不重摇(prune 只删已过期超 7 天的抽取,src/update-policy.ts:428 now - draws[k] > STAGGER_PRUNE_MS,等待中抽取 delta 为负永不误删)、earliest-draw-wins(Math.min,src/update-policy.ts:426)全部原样未动;文档四件套 + JA README + lifecycle 表 + config-reference 种子 + 测试注释同步。
  5. 是否有回归问题:逐项清点——① prune 语义 ✓(见上);② 落盘键控/重摇语义 ✓ 不变;③ 优先级链 ✓ 不变(resolveStaggerWindow 仅注释改动);④ typo guard(拒绝 >1 年延迟)✓ 7d 远低于上限;⑤ 未触碰 wire/配置 schema/持久化格式/kernel/;⑥ 生成器幂等 ✓(PR head 上 gen-config-docs generate 零 diff,en/zh 表行与种子逐字节一致);⑦ 全树 grep 确认 stagger 域内无残留 "48 h"/"172800000"/"2d" 引用——仅剩的 48h 都是无关域(log-retention 保留目标、duration 通用示例、时长解析器测试向量),正确未动。未发现回归。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及——机制原样,仅默认窗口参数放宽。
  8. 是否引入了新的配置:不涉及——无新 key/env,仅默认值变化。

行为变更披露(强制):默认错峰窗口上限 48h → 7d(内置 172800000ms→604800000ms,远程策略 "2d"→"7d");原因:坏发版拦截窗口拉长;代价:新版本最坏落地 2 天→7 天。issue 正文已明示为 owner 意图,此处正式记录 old→new。

测试有效性:tests/update-policy.test.ts 显式钉死两个常量(assert.equal(STAGGER_MAX_DELAY_DEFAULT_MS, 7 * 86_400_000)),外加均匀性/持久化不重摇/优先级/fail-open/安全边界全套——常量被改回 48h 时必红,断言有牙。本地定向 63/63 绿(update-policy 47 + knobs-config-precedence 16);全量判定以 CI 为准,已 30/30 绿。

收工判定:实现闭环、无回归、CI 全绿、diff 干净(12 文件 32+/32−,每行都服务于本 PR 目的)——可合并,合并由人工执行。

@ranxianglei
ranxianglei force-pushed the 2026-11-01_stagger-7d branch from c7271f0 to cb7cfd3 Compare November 11, 2026 22:48
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict re-resolved after master moved again — PR #5427 is back to mergeable.

What happened this run (all verified live, not from memory):

  1. Master moved twice since my last push: 58a8796 → 33104b1 (#6150 compress-at-fold-point removal) → c26c31a (#6260 handoff web-render upgrade). Both landed fresh entries at the top of the CHANGELOG [Unreleased] section — the exact spot this PR also writes — so the PR was flagged dirty again.
  2. Re-rebased onto the live master tip c26c31a. Only CHANGELOG.md conflicted (master's new handoff entry vs the PR entry at the top of the first ### Changed); resolved as a union keeping BOTH entries (PR entry first, same order as last time). All other files auto-merged cleanly.
  3. Fixed a leftover artifact from the previous rebase: a blank line before the second ### Fixed heading in CHANGELOG.md had been silently dropped during the first conflict resolution. Restored in its own labeled commit so the final diff vs master contains nothing but the PR's intended change.
  4. Verified before pushing: final diff vs master = exactly the intended 12-file footprint (stagger 48h→7d + docs); tools/gen-config-docs.mjs generate zero-diff (339 seeds, 254 i18n keys); residue scan for stale 48h values clean (only remaining hits are the unrelated log-retention feature and generic duration-string examples); npm run typecheck clean; targeted tests/update-policy.test.ts 47/47 pass.
  5. Pushed with --force-with-lease pinned to the verified prior head (remote head was untouched by anyone else) → new head cb7cfd3 on base c26c31a.
  6. Live state after push (single read-only API check): mergeable: true, mergeable_state: blocked — i.e. no more conflict; blocked only by pending CI on the new head plus human-only merge. Mirror cache at read time showed 30 checks / 0 failed, which predates this push; CI will re-run on the new head.

No design decisions were needed and none are requested. The code delta is byte-for-byte the PR author's own 48h → 7d default change — the rebase introduces no behavioral drift. Remaining step is yours: merge when CI is green.


中文八问(供审核)

  1. 是什么问题:PR 分支在上一轮落地后,master 又先后合入 [PR] remove: the experimental compressAtFoldPoint feature — fold-point relocation (v1 #5471 + unreleased v2 #5949), #6132 #6150(fold-point 移除)和 [PR] Web Panel: Handoff Documentation and Collapsed Tree Diagram Rendering Upgrade (eWork-Level Rendering, Appendix Sectionin | Web 面板:交接文档与压缩树图渲染升级(eWork 级渲染、附录分节、冻结快照水合) #6260(handoff 渲染升级),两者都在 CHANGELOG [Unreleased] 顶部新增条目,与本 PR 的写入位置重叠,系统再次把 PR 标为冲突。
  2. 什么原因导致的:master 持续前进且新条目恰好落在本 PR 唯一共享的热区(CHANGELOG Unreleased 头部);不是 PR 自身内容有问题。
  3. 影响范围与严重程度:仅影响本 PR 的可合并性(dirty 挡住合并),不影响任何用户可见行为;属于调度阻塞级,无外部影响。
  4. 怎么修复的:rebase 到最新 master tip c26c31a;CHANGELOG 唯一冲突按并集解决(双方条目都保留,PR 条目居上);顺手补回上一轮冲突解决时误丢的一个空行(独立标注 commit);force-with-lease 推送(推送前已验证远端 head 未被他人改动)。
  5. 是否有回归问题:无。最终树与 master 逐文件比对 = 仅 PR 自身的 12 个文件改动;生成器零漂移;typecheck 干净;update-policy 定向测试 47/47;高危模式逐项过——无语义漂移、无阈值/时序/输出格式变化(除 PR 本意的 48h→7d)、无 fail-fast 变吞错。
  6. 是否破坏缓存:不涉及(未触碰缓存、重试、增量游标逻辑)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(本 PR 本身只改内置默认值 48h→7 天,系 PR 作者原意;现有逃生阀 BILI_UPDATE_STAGGER_MAX_DELAY_MS 等配置面未动)。

收工判定:冲突已解,PR 恢复可合并(仅剩 CI 待跑 + 人工合并),等待 owner 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Stale trigger — no action was needed this run. Verified live just now:

  • This "merge state: dirty" flag predates my last push (~07:00). Checked against the live sources in this run:
    • Remote PR head = cb7cfd32be (untouched by anyone else); it already contains the current master tip c26c31ace4 — zero commits behind, so no conflict can exist.
    • Mirror check cache (fetched 07:09, sha-pinned to cb7cfd32be): 30 checks, 0 failed, 0 pending — all test shards (ubuntu/windows × node 22/24), static-gates, kernel-guard, gate, config-surface-guard: success; gated e2e lanes skipped as designed.
    • Single read-only GitHub check: state: open, mergeable: true, mergeable_state: blocked — with CI fully green, the remaining blocker is human-only merge policy, not a technical one.
  • Nothing was pushed or changed this run (nothing to change). The PR is ready for you to merge whenever.

中文八问(供审核)

  1. 是什么问题:系统再次转发「PR 冲突」告警,但属过期检测——告警基于我上一轮推送(07:00)之前的旧状态。
  2. 什么原因导致的:阻塞检测器读取的是推送前的缓存快照;推送后 PR 已恢复可合并,但新一轮告警仍按旧状态触发。
  3. 影响范围与严重程度:无实际影响——纯误报级;分支、代码、CI 均正常。
  4. 怎么修复的:无需修复。本轮只做活体验证:远端 head 未被他人改动、已包含当前 master tip(落后 0 提交)、镜像缓存按 sha 钉死确认 30 项检查全绿、单次只读 API 确认 mergeable=true。
  5. 是否有回归问题:不涉及(本轮零改动)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突不存在(过期告警),CI 全绿,PR 仅剩人工合并一步,等待 owner。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Re-rebased onto today's master (134 new commits) — conflict resolved, PR back to mergeable.

This trigger was a real one: master moved from c26c31a to 99c22d2 while the PR waited (ja-config-doc work #6076, plugin-bypass, announcement policy, and more landed). What I did, all verified live in this run:

  1. Rebased 2026-11-01_stagger-7d onto master tip 99c22d2. One conflict, in website/config-reference/updates.yaml: master's ja-doc work added a desc_ja line to the staggerMaxDelayMs entry carrying the OLD "48h / 2d" wording, colliding with the PR's 7-day lines. Resolved as a union: the PR's en/zh lines (7d / 168h) plus the new ja line with its wording updated 48h → 7d so the ja doc doesn't reintroduce the old default.
  2. New post-base doc sync (labeled commit): docs/configuration.ja.md landed on master after this PR branched, so it still said "48 時間" in 5 prose spots. Ported the PR's 7-day wording into all 5, and committed the generator's regenerated ja table rows (172800000/48 h → 604800000/7 days). The ja doc now has zero stale 48h references.
  3. Verified before pushing: gen-config-docs zero-diff (340 seeds, 12 blocks); repo-wide residue scan for stale 48h/172800000 stagger wording clean; final diff vs master = 13 files, all stagger-related; npm run typecheck clean; targeted tests/update-policy.test.ts 47/47 pass.
  4. Pushed with --force-with-lease pinned to the verified prior head (branch untouched by anyone else) → new head 7e3daa9 on base 99c22d2.
  5. Live state after push: mergeable: true, mergeable_state: blocked — no conflict; blocked only by CI running on the new head plus human-only merge. (Mirror check cache still shows the previous head's all-green snapshot; it will refresh to the new head within a poll cycle.)

No design decisions needed. The code delta remains byte-for-byte the PR author's own 48h → 7d default change; everything else this run is doc-wording sync forced by master's new ja doc.


中文八问(供审核)

  1. 是什么问题:PR 等待期间 master 又前进了 134 个提交(ja 配置文档 [PR] docs: add Japanese versions of repository documentation (#6072) #6076、plugin-bypass、公告策略等),分支落后导致系统再次报冲突。
  2. 什么原因导致的:master 的 ja 文档工作给 staggerMaxDelayMs 条目新增了 desc_ja 行(带旧 48h 措辞),恰好落在本 PR 修改的同一区域;另外 ja 配置文档在本 PR 分叉后才落到 master,天然带着旧措辞。
  3. 影响范围与严重程度:仅本 PR 可合并性(调度阻塞级);若不同步 ja 文档,合并后 ja 文档会残留错误的 48h 默认值描述——属文档一致性缺陷,已在本轮修正。
  4. 怎么修复的:rebase 到最新 master tip 99c22d2;唯一冲突按并集解决(PR 的 en/zh 7 天措辞 + master 新增的 ja 行且措辞同步改为 7d);新增一个标注 commit 把 ja 配置文档 5 处散文 + 2 处生成表格行的 48h 措辞全部同步为 7 天;force-with-lease 推送(推送前验证远端 head 未被他人改动)。
  5. 是否有回归问题:无。最终树与 master 逐文件比对 = 仅 stagger 相关的 13 个文件;生成器零漂移;残留扫描干净;typecheck 干净;update-policy 定向测试 47/47;高危模式逐项过——无语义漂移、无阈值漂移(除 PR 本意的 48h→7d)、无输出格式变化。
  6. 是否破坏缓存:不涉及(未触碰缓存/重试/游标逻辑)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及(配置面未动,仅文档措辞与 PR 本意的默认值变更)。

收工判定:冲突已解,PR 恢复可合并(仅剩新 head 的 CI 待跑 + 人工合并),等待 owner。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Stale trigger — no conflict exists, nothing to fix this run. Verified live, not from memory.

This "merge state: dirty" flag is stale. The conflict it describes was already resolved in the previous run (floor 28, 08:10), which rebased onto master tip 99c22d283f and pushed head 7e3daa973b. I re-verified everything against the live sources in THIS run:

  • No conflict (structurally impossible right now). Remote PR head = 7e3daa973b, untouched by anyone else (local == remote, 0 ahead / 0 behind). Current master = 99c22d283f is an ancestor of the PR head (zero commits behind), so a merge conflict cannot exist. Single read-only GitHub check: state: open, mergeable: true, mergeable_state: blocked — "blocked" here means required checks still running + human-only merge, not "dirty" (conflict).
  • CI on the current head 7e3daa973b (mirror cache, sha-pinned, fetched 08:18 UTC): 30 checks, 0 failed, 12 pending (test shards + static-gates in progress), the rest success/skipped. No red CI to repair.
  • Nothing was pushed or changed this run — there was nothing to change. The branch is already at the current master tip and clean.

The PR is ready for you to merge as soon as the in-progress CI shards finish green. (For reference: the prior head cb7cfd32be was 30/30 green, and this head only adds ja-config-doc wording sync on top, so green is expected — but I'm reporting in-progress, not asserting green, per the live-state rule.)


中文八问(供审核)

  1. 是什么问题:系统再次转发「PR 冲突(dirty)」告警,但属过期检测——该冲突在上一轮(floor 28, 08:10)已解决并推送 head 7e3daa973b。
  2. 什么原因导致的:阻塞检测器读到的是推送前的旧缓存快照;推送后 PR 已恢复可合并,新一轮告警仍按旧状态触发(与 floor 22 同类)。
  3. 影响范围与严重程度:无实际影响——纯误报级。分支、代码、CI 均正常,无用户可见行为受影响。
  4. 怎么修复的:无需修复。本轮只做活体验证:远端 head 未被他人改动(local==remote,0/0)、master 99c22d283f 是 PR head 的祖先(落后 0 提交,冲突在结构上不可能)、单次只读 API 确认 mergeable:true / mergeable_state:blocked(非 dirty)、镜像缓存按 sha 钉死确认 30 项检查 0 失败 12 进行中。
  5. 是否有回归问题:不涉及(本轮零改动、零推送)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突不存在(过期告警),当前 head 7e3daa973b 已基于最新 master tip 且干净,CI 进行中(0 失败 12 待跑)。本轮无修复动作、无推送;待 in-progress 的 CI 分片跑绿后,仅剩人工合并一步,等待 owner。

@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.

(GitHub 不允许 approve 自己账号的 PR,本评论即审核结论:APPROVE / 可合并)

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

APPROVE — 新 head(rebase 到当前 master 后)端到端复审通过。

方向与正确性:改动就是 issue 要的那一件事——自动更新错峰窗口上限 48h → 7d,且两处都改到位:内置默认 STAGGER_MAX_DELAY_DEFAULT_MS 172800000 → 604800000(src/update-policy.ts:50),官方策略文件 auto-update-policy.json default.maxDelay "2d" → "7d"(远程默认优先于内置,只改内置不生效——PR 描述已明说)。同步面完整:knobs 注释、README en/zh/ja、docs/configuration en/zh/ja(rebase 后新落的 ja 文档由 7e3daa9 专门补齐措辞)、lifecycle 表、updates.yaml seed(604800000 / 7d / 168h)、测试钉 assert.equal(STAGGER_MAX_DELAY_DEFAULT_MS, 7 * 86_400_000)。13 文件 41+/41−,无跑题改动,无空行/重排噪音。

回归清点(逐项既有行为):已抽取时刻不重摇(draws[key] = Math.min(draws[key] ?? at, at))与 prune 判定(now - draws[k] > STAGGER_PRUNE_MS,STAGGER_PRUNE_MS=7d;等待中的 draw 时间差为负、永不被 prune)语义不变——窗口拉长不破坏持久化/重摇/清理任何一条;优先级链(本地 config/env > 远程 default > 内置)、overrides 叠加、hold/blocked/pinned、fail-open 回退、min>max 钳制全部未触碰;逃生门不变(手动 bili update 绕过、min0+max0 恢复立即升级、ACP_AUTO_UPDATE=0 全停)。无 kernel/、无 wire/消息形状、无持久化格式、无配置 schema 变更(staggerMaxDelayMs 是既有键,仅默认值变)。

行为变更披露(旧→新):内置错峰窗口上限 48h → 7d(172800000ms → 604800000ms)+ 官方远程策略 default.maxDelay "2d" → "7d"。影响:未设本地 stagger 覆盖的实例,新发现版本的最坏升级延迟从 48 小时变 7 天——这是 issue 明确要的效果(更平缓的舰队爬坡),owner 已在 issue 拍板;已抽中的旧 draw 不受影响,照旧到点执行。

测试:常量钉有牙(回退到 48h 会直接红);本地定向 63/63 绿(update-policy 47 + knobs-config-precedence 16);tools/gen-config-docs.mjs generate 幂等零 diff;CI 30/30 绿(镜像缓存,fetched 2026-11-13T08:49Z)。

八问:

  1. 是什么问题:不是缺陷,是产品参数调整——自动更新错峰窗口上限 48 小时偏短,owner 要求拉长到 7 天以获得更平缓的舰队升级爬坡。
  2. 什么原因导致的:原 48h 是 #3619 的初始设计值;本次按 owner 指令调参,无机制缺陷。
  3. 影响范围与严重程度:所有走自动更新且未设本地 stagger 覆盖的实例;最坏升级延迟 48h→7d——节奏/体验变化,非缺陷,无用户不可用面。
  4. 怎么修复的:内置默认常量 + 官方远程策略文件两处同改(远程优先,缺一不可),全部文档/seed/测试同步,ja 文档 rebase 后补位。
  5. 是否有回归问题:无。prune/不重摇/优先级链/逃生门/fail-open 逐项核实未动;CHANGELOG 仅新增一条 Changed 条目。
  6. 是否破坏缓存:不涉及(策略 ETag 缓存按 URL 键,文件内容变更走正常 200 刷新,无失效策略变化)。
  7. 是否改了设计方向:不涉及,纯参数调整,架构/边界/数据流不变。
  8. 是否引入了新的配置:不涉及,无新键/新 env/新默认项(既有键默认值变更已在上方披露)。

已顺手修:rebase 冲突解决再次吞掉 CHANGELOG 里 handoff 条目与 AGENTS.md 条目之间的换行(两条目被拼成一行,AGENTS.md 条目失去自己的 bullet)+ commit 8251dde(已推同分支;改动仅 CHANGELOG 一个换行,零代码影响,CI 将在新 head 重跑)。

结论:可合并(人工合并门禁照旧)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] PR 复审完成(新 head 7e3daa9,rebase 到当前 master 99c22d2 后):结论 可合并——13 文件 41+/41− 全部是 48h→7d 的常量/策略/文档/seed/测试同步,回归面(不重摇/prune/优先级链/逃生门/fail-open)逐项核实未动,CI 30/30 绿,本地定向 63/63 绿。已顺手修:rebase 冲突解决再次吞掉 CHANGELOG 里 handoff 与 AGENTS.md 两条目间的换行 + commit 8251dde(已推同分支)。GitHub 审核已提交(自账号 PR 不能正式 approve,以 COMMENT 给出 APPROVE 结论 + 八问)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 进度汇报(进程曾两次卡住重启,工作已全部完成,无阻塞):PR #5427 复审已完成——作者 rebase 到当前 master 后的新 head 7e3daa9 端到端审过(13 文件 41+/41−,全部是 48h→7d 的常量/策略/文档/seed/测试同步,回归面逐项核实未动);发现 rebase 冲突解决再次吞掉 CHANGELOG 里 handoff 与 AGENTS.md 两条目间的换行,已顺手修掉并推同分支(commit 8251dde)。GitHub 审核已提交(自账号 PR 不能正式 approve,以 COMMENT 给出 APPROVE/可合并结论 + 八问)。修复提交 8251dde 上 CI 30/30 全绿(镜像缓存 2026-11-13T09:53Z)。当前状态:审核完毕、CI 绿,仅剩人工合并门禁。

ranxianglei and others added 4 commits November 16, 2026 06:10
The rollout-spread window draws ONE random moment per machine inside
[minDelay, maxDelay]. 48 h left only two days of spread; a bad release
was effectively fleet-wide by the time Monday came around. Both places
that define the default change together:

- built-in STAGGER_MAX_DELAY_DEFAULT_MS 48 h -> 7 days (the fallback
  when the remote policy file is unreachable/unset);
- the official remote policy file auto-update-policy.json
  default.maxDelay 2d -> 7d (remote default outranks the built-in, so
  the constant alone would be inert).

Persisted draws are keyed by (dist-tag, target version), so upgrading
to this version does NOT re-roll an already-drawn moment — old draws
fire as drawn; only newly discovered versions draw inside 7 days.
Escapes unchanged: manual 'bili update', zeroed stagger bounds, or
ACP_AUTO_UPDATE=0. Precedence unchanged: local config/env > remote
policy > built-in.

Docs: README/README.zh-CN, CONFIGURATION/CONFIGURATION.zh-CN (defaults,
env tables, window-composition notes) updated to 604800000 / 7 days.
docs-sync regenerates CONFIGURATION*.md from website/config-reference/
*.yaml; hand-edited table rows drift. Move the 7-day default + examples
into updates.yaml and regenerate (output identical to the hand edits).
…ecycle table)

The rebase onto current master picks up two files added after this PR's base (community JA README #6000, docs/lifecycle.md env table) that still state the old 48 h built-in cap; align them with the 7-day default like every other surface.
… 7d)

The assertion below already pins STAGGER_MAX_DELAY_DEFAULT_MS == 7 * 86_400_000; the header coverage map still described the old 48 h default.
@ranxianglei
ranxianglei force-pushed the 2026-11-01_stagger-7d branch from 8251dde to a06344a Compare November 15, 2026 22:18
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved and pushed

The PR conflicted with master (master moved from 99c22d283f → f648217cb8 while the PR sat on the old base). I rebased the PR branch onto current master, resolved the single conflict, and force-pushed.

What I did this run:

  1. Verified live (status-freshness): PR head 8251dde81f, master f648217cb8, merge-base 99c22d283f (the old master) → a real conflict (master was not an ancestor of the PR head).
  2. Rebased 2026-11-01_stagger-7d onto origin/master (f648217cb8). All 7 commits replayed.
  3. Resolved the one conflict in CHANGELOG.md (the only file both sides touched): kept the PR's stagger entry first, then master's three entries (存储 SQLite / handoff web 渲染 / AGENTS.md 瘦身) each on its own line, and dropped a concatenated handoff+AGENTS.md duplicate line (a newline-drop artifact left by a prior rebase). The 7th commit ("restore newline between handoff and AGENTS changelog entries") became a no-op once my resolution landed, so it was dropped as empty.
  4. Verified: net diff = exactly the PR's stagger change (13 files, 40+/39-); no conflict markers; residue scan clean (stale "48h"/"2d" only in the PR's own changelog entry, the unrelated log-retention 48h, the historical Automatic staggered rollout: default random upgrade interval of 15 min – 48 h + GitHub remote policy file (emergency kil | 自动升级撒点:默认 15 分钟~48 小时随机升级 + GitHub 远程策略文件(紧急刹车/按版本调速),给事故留响应窗 #3619 entry, and format examples); gen-config-docs zero-diff; targeted tests/update-policy.test.ts 47/47; typecheck clean.
  5. Force-pushed with lease (confirmed the remote head was still the pin 8251dde81f before pushing) → a06344a8b3.
  6. Verified with git (authoritative): master is now an ancestor of the PR head → no merge conflict.

Note on CI state (honest): the mirror check cache is stale in this run — last fetched 2026-11-13, still showing the old head 8251dde81f and dirty. It did not refresh on the new head a06344a8b3 even after ~3 min, so I could not confirm the new CI run's status live. The conflict itself is resolved per git (authoritative source); CI will run on the new head.


八问

  1. 是什么问题:PR [PR] Auto-update staggered window cap: 48 hours → 7 days | 自动更新错峰窗口上限 48 小时 → 7 天 #5427(自动更新错峰窗口上限 48h→7d)与 master 冲突,merge state = dirty。
  2. 什么原因导致的:PR 分支基于旧 master(99c22d283f),期间 master 合入了多个 PR(存储 SQLite、handoff web 渲染、AGENTS.md 瘦身等),其中 CHANGELOG.md 与 PR 的错峰条目改动重叠 → 文本冲突。
  3. 影响范围与严重程度:仅 PR 合并受阻,不影响任何已发布行为;PR 内容本身(48h→7d 默认值变更)逻辑正确、此前已 CI 绿。严重程度:合并流程阻塞(非功能缺陷)。
  4. 怎么修复的:rebase PR 分支到当前 master,手工解决 CHANGELOG.md 唯一冲突(PR 错峰条目置首 + master 三条各占一行,丢弃前次 rebase 遗留的拼接重复行);第 7 个 commit(恢复换行)因已被解决而变空、自动 drop。
  5. 是否有回归问题:无。净 diff 与 PR 原改动完全一致(13 文件 40+/39-),核心仅 STAGGER_MAX_DELAY_DEFAULT_MS 48h→7d 与 auto-update-policy.json maxDelay "2d"→"7d";无冲突标记残留;目标测试 47/47、typecheck 干净、gen-config-docs 零 diff。
  6. 是否破坏缓存:不涉及(纯默认值 + 文档变更,无缓存/重试/游标逻辑)。
  7. 是否改了设计方向:不涉及(沿用 PR 既有方案,仅解决合并冲突,未改任何代码逻辑)。
  8. 是否引入了新的配置:不涉及(未新增配置项,仅改既有 BILI_UPDATE_STAGGER_MAX_MS 的默认值)。

判定:冲突已解决并推送(head a06344a8b3),PR 已无合并冲突,可合并(待 CI 在新 head 上跑绿)。

@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: opencode/qwen3.8-27b)

APPROVE / 可合并 —(GitHub 不允许 approve 自己账号的 PR,本评论即审核结论。)

Re-reviewed the re-rebased head a06344a8b (6 commits on current master f648217cb8, 13 files 40+/39−) end-to-end, plus one on-the-spot doc fix (below). The stagger-48h→7d change is intact and correct across all surfaces; no kernel/wire/schema/persistence changes; regression inventory clean.

On-the-spot fix (small, non-blocking): docs/configuration.ja.md:2103 — the hand-written env-var reference line for BILI_UPDATE_STAGGER_MAX_MS still showed the duration-string example as "2d" while docs/configuration.md (en) and docs/configuration.zh-CN.md (zh) were both updated to "7d". Ja's example no longer matched its own stated 7-day default. Fixed "2d" → "7d" on that one line. Verified node tools/gen-config-docs.mjs generate stays idempotent (zero diff — the env-desc table is hand-written, outside the <!-- bili:gen --> blocks the generator owns).

已顺手修:ja 配置文档 env-desc 示例 "2d"→"7d"(与 en/zh 对齐)+ commit d8382df

CI: core test lanes green on d8382df7e (0 failed). Two auxiliary checks (mysql-contract, pi-subagents-guard) were still queued at review time (runner contention, started=None) — both are unrelated to this docs-only change and both passed on the identical code at the prior head a06344a8b.


结构化八问

  1. 是什么问题:把自动更新的错峰(stagger)窗口上限从 48 小时放宽到 7 天——即发现新版本后,本机自动升级的随机延迟窗口上限由 48h 变为 7d。
  2. 什么原因导致的:非缺陷,是有意行为调整。更长的错峰窗口把自动升级流量摊到更长时间轴上,降低发布期对 registry/CDN 的瞬时集中压力。
  3. 影响范围与严重程度:影响所有机器的自动升级时机(延迟窗口上限 48h→7d)。属有意行为变更,非缺陷;想立即升级的用户仍有出口:手动 bili update、或 min=0+max=0、或 ACP_AUTO_UPDATE=0。
  4. 怎么修复的:内置默认常量 STAGGER_MAX_DELAY_DEFAULT_MS 由 172800000(48h) 改为 604800000(7d)(src/update-policy.ts:50);远端策略 auto-update-policy.json 的 default.maxDelay 由 "2d" 改为 "7d"(远端优先于内置,两者必须同改);同步更新 en/zh/ja 全部文档、config-reference 种子、测试 pin。
  5. 是否有回归问题:无。逐项核过既有行为——不重掷(draws[key] = Math.min(draws[key] ?? at, at))、剪枝(now - draws[k] > STAGGER_PRUNE_MS,STAGGER_PRUNE_MS=7d,等待中的 draw 差值为负、永不被剪)、优先级链(local > remote > built-in)、overrides 叠加、hold/blocked/pinned、fail-open、min>max 钳制、各逃生出口——均未触碰。无 kernel/wire/schema/persistence 改动。
  6. 是否破坏缓存:不涉及。无缓存/重试/增量游标/去重键改动。
  7. 是否改了设计方向:不涉及。仍是同一套错峰机制,只是默认窗口更宽。
  8. 是否引入了新的配置:无新增配置键。仅既有 update.staggerMaxDelayMs 的默认值变更(48h → 7d)。

行为变更披露(旧值→新值):STAGGER_MAX_DELAY_DEFAULT_MS 172800000(48h) → 604800000(7d);auto-update-policy.json default.maxDelay "2d" → "7d"。此为 PR 本意。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] PR #5427(re-rebase 后新 head a06344a → 我修后 d8382df)审核完成:APPROVE / 可合并。stagger 上限 48h→7d 变更全表面(常量/远端策略/文档 en·zh·ja/种子/测试 pin)验证正确、无回归、无 kernel/wire/schema 改动;顺手修 ja 配置文档 env-desc 示例 "2d"→"7d"(与 en/zh 对齐,commit d8382df);CI 核心 test 绿(2 个辅助 check 排队中、与本 docs-only 变更无关且上一 head 已过)。GitHub review 5913407523 已发,PR 处于人工合并门禁。

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant