Repository navigation
[PR] Auto-update staggered window cap: 48 hours → 7 days | 自动更新错峰窗口上限 48 小时 → 7 天 - #5427
ranxianglei wants to merge 7 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10272-pr.5427.1a38864This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5427.tgz
npm install -g packageInstall instructions are refreshed on each push. |
b67efee to
cb7bf43
Compare
(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;影响轻微)。 审核结论(结构化八问)
行为变更披露(强制): 默认错峰窗口上限 48h → 7d(旧值 172800000ms / 远程 验证证据: 本地(新 head b67efee 等价树)定向跑 tests/update-policy.test.ts + tests/knobs-config-precedence.test.ts = 63/63 绿, CI 状态(写此回复时): 新 head b67efee 的 run 刚入队(docs-sync 等全部 queued,fetched_at 09:50Z);mergeable_state=behind(master 前移,非阻塞)。 收工判定: 方向正确、实现闭环(两处常量 + 种子 + 文档 + 测试齐整)、审核发现的唯一实质问题(seed 漂移)已由作者跟进提交修复并经我独立验证消除;预期 CI 转绿后即可合并(合并由人工执行)。 |
cb7bf43 to
c7271f0
Compare
(ai: opencode/qwen3.8-27b) Conflict rebase complete — PR #5427 is mergeable again. What I did this run:
No behavior change was introduced by the rebase itself: the code delta vs master is byte-for-byte the PR's own (constant 中文八问
收工判定:冲突已全部解决并推送( |
[bot] Rebase 后终审完成(head 结构化八问
行为变更披露(强制):默认错峰窗口上限 48h → 7d(内置 172800000ms→604800000ms,远程策略 测试有效性:tests/update-policy.test.ts 显式钉死两个常量( 收工判定:实现闭环、无回归、CI 全绿、diff 干净(12 文件 32+/32−,每行都服务于本 PR 目的)——可合并,合并由人工执行。 |
c7271f0 to
cb7cfd3
Compare
[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):
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. 中文八问(供审核)
收工判定:冲突已解,PR 恢复可合并(仅剩 CI 待跑 + 人工合并),等待 owner 合并。 |
[bot] 🏷 (ai: opencode/qwen3.8-27b) Stale trigger — no action was needed this run. Verified live just now:
中文八问(供审核)
收工判定:冲突不存在(过期告警),CI 全绿,PR 仅剩人工合并一步,等待 owner。 |
cb7cfd3 to
7e3daa9
Compare
[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:
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. 中文八问(供审核)
收工判定:冲突已解,PR 恢复可合并(仅剩新 head 的 CI 待跑 + 人工合并),等待 owner。 |
(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
The PR is ready for you to merge as soon as the in-progress CI shards finish green. (For reference: the prior head 中文八问(供审核)
收工判定:冲突不存在(过期告警),当前 head |
ranxianglei
left a comment
There was a problem hiding this comment.
(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)。
八问:
- 是什么问题:不是缺陷,是产品参数调整——自动更新错峰窗口上限 48 小时偏短,owner 要求拉长到 7 天以获得更平缓的舰队升级爬坡。
- 什么原因导致的:原 48h 是 #3619 的初始设计值;本次按 owner 指令调参,无机制缺陷。
- 影响范围与严重程度:所有走自动更新且未设本地 stagger 覆盖的实例;最坏升级延迟 48h→7d——节奏/体验变化,非缺陷,无用户不可用面。
- 怎么修复的:内置默认常量 + 官方远程策略文件两处同改(远程优先,缺一不可),全部文档/seed/测试同步,ja 文档 rebase 后补位。
- 是否有回归问题:无。prune/不重摇/优先级链/逃生门/fail-open 逐项核实未动;CHANGELOG 仅新增一条 Changed 条目。
- 是否破坏缓存:不涉及(策略 ETag 缓存按 URL 键,文件内容变更走正常 200 刷新,无失效策略变化)。
- 是否改了设计方向:不涉及,纯参数调整,架构/边界/数据流不变。
- 是否引入了新的配置:不涉及,无新键/新 env/新默认项(既有键默认值变更已在上方披露)。
已顺手修:rebase 冲突解决再次吞掉 CHANGELOG 里 handoff 条目与 AGENTS.md 条目之间的换行(两条目被拼成一行,AGENTS.md 条目失去自己的 bullet)+ commit 8251dde(已推同分支;改动仅 CHANGELOG 一个换行,零代码影响,CI 将在新 head 重跑)。
结论:可合并(人工合并门禁照旧)。
[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 结论 + 八问)。 |
[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 绿,仅剩人工合并门禁。 |
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.
…c landed after PR branch)
8251dde to
a06344a
Compare
(ai: vllm-qwen/qwen3.8-27b) Conflict resolved and pushedThe PR conflicted with master (master moved from What I did this run:
Note on CI state (honest): the mirror check cache is stale in this run — last fetched 2026-11-13, still showing the old head 八问
判定:冲突已解决并推送(head |
ranxianglei
left a comment
There was a problem hiding this comment.
(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.
结构化八问
- 是什么问题:把自动更新的错峰(stagger)窗口上限从 48 小时放宽到 7 天——即发现新版本后,本机自动升级的随机延迟窗口上限由 48h 变为 7d。
- 什么原因导致的:非缺陷,是有意行为调整。更长的错峰窗口把自动升级流量摊到更长时间轴上,降低发布期对 registry/CDN 的瞬时集中压力。
- 影响范围与严重程度:影响所有机器的自动升级时机(延迟窗口上限 48h→7d)。属有意行为变更,非缺陷;想立即升级的用户仍有出口:手动
bili update、或min=0+max=0、或ACP_AUTO_UPDATE=0。 - 怎么修复的:内置默认常量
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。 - 是否有回归问题:无。逐项核过既有行为——不重掷(
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 改动。 - 是否破坏缓存:不涉及。无缓存/重试/增量游标/去重键改动。
- 是否改了设计方向:不涉及。仍是同一套错峰机制,只是默认窗口更宽。
- 是否引入了新的配置:无新增配置键。仅既有
update.staggerMaxDelayMs的默认值变更(48h → 7d)。
行为变更披露(旧值→新值):STAGGER_MAX_DELAY_DEFAULT_MS 172800000(48h) → 604800000(7d);auto-update-policy.json default.maxDelay "2d" → "7d"。此为 PR 本意。
[bot] PR #5427(re-rebase 后新 head a06344a → 我修后 d8382df)审核完成:APPROVE / 可合并。stagger 上限 48h→7d 变更全表面(常量/远端策略/文档 en·zh·ja/种子/测试 pin)验证正确、无回归、无 kernel/wire/schema 改动;顺手修 ja 配置文档 env-desc 示例 |
改什么
自动更新发现新版本后的错峰抽取窗口,上限从 48 小时拉长到 7 天(下限 15 分钟不变)。每台实例仍是在窗口内随机抽一个时刻、落盘持久化、到点再升(#3619),只是摊开范围从 2 天变 7 天,坏发版有更长的中途拦截窗口。
动了两处(必须一起,缺一不生效)
STAGGER_MAX_DELAY_DEFAULT_MS:48 * 3_600_000→7 * 86_400_000(src/update-policy.ts)——远程策略文件不可达/未配置时的兜底;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全停;STAGGER_PRUNE_MS(7 天)只清理已过期 7 天以上的旧抽取,不会误删还在等待中的 7 天抽取。文档与测试