Repository navigation
[PR] feat(config): ship the incremental turn lane at 100% — a fresh install is delta-by-default (#3248) - #5486
Conversation
…l is delta-by-default (ranxianglei#3248) The incremental lane (hosts send only the conversation delta instead of re-sending full history every turn, ranxianglei#3248/ranxianglei#5155/ranxianglei#5156) shipped with `rollout.features.pluginIncrementalTurns: { percent: 0 }`, so every install had to be switched on by an operator. All four defects that originally blocked it are closed and fixed: ranxianglei#3343 (marker divert had no loopback validation), ranxianglei#3433 (dsh-native was not wired to wireMessagesLookAnthropic, so the OpenAI lane silently dropped tool_calls), ranxianglei#3352 (opencode native got zero savings) and ranxianglei#3369 (one transient failure permanently demoted the client). The baked-in plan is now `percent: 100`: a new user installs, starts, and the lane is live with no config file, no env var and no panel action. This is safe by construction because the fast path only takes over when EVERY verification matches — body shape (`incrementalTurnBodyShape`), the host's GET probe, the unified-storage sidecar and the ack. Any miss falls the whole turn back onto the unchanged full-resend path, byte for byte, so the default changes only how many bytes the HOST SENDS (the ranxianglei#5156 saving), never a correctness guarantee. Same for the security surface: shaped turns must pass `adminGateDenial` (loopback-only, ranxianglei#3343) before `applyTurn`, so turning the default on widens nothing. Escape hatches are unchanged and still ordered env > config > baked-in percent > fail-closed: the file key `rollout.features.pluginIncrementalTurns` (a boolean or a percent) and `BILI_ROLLOUT_PLUGIN_INCREMENTAL_TURNS=0`. Tests: the probe case in tests/incremental-lane.test.ts flips to the new contract (default reports enabled, env "0" turns it off); the 503 case is driven through the env escape hatch instead of the baked-in plan; a GA row in tests/rollout.test.ts pins the shipped percent plus both hatches; and tests/incremental-lane-default-on.test.ts drives the production default end to end over a clean XDG root with NO config file (real featureEnabled / incrementalTurnsEnabled / GET /__bili/plugin/turn). Negative control: with the plan reverted to 0, cases 1/2/5 go red while both escape-hatch cases stay green.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 按特性名/失败签名检索了 open+closed 的 issue 与 PR:增量车道相关的其他在途条目只有 PR #4882(双宿主共享会话告警 + 死分支缓存标记清理)和 PR #5469(dsh 车道水位快路径)——机制都不同,也没有第二个条目做「翻转内置默认」这件事。 标签: pr(既有)+ dsh / omp / opencode / pi(增量车道的四条插件宿主)+ scope/wiring(marker divert 属请求管道接线)。不打 bug——这是功能 GA 不是缺陷;p1/p2/p3 是缺陷刻度,对默认值翻转不适用,故未打严重度标签。 独立审核(以下全部在 PR head
|
| 既有行为 | 判定 |
|---|---|
| 非 marker 流量(代理模式全部客户端、不发 marker 的插件宿主) | 结构上不可达(divert 分支双头入口),保持 |
| marker + 全量重发体(retry/死会话/side lane) | replay 路径未动,剥 marker 后走正常管道,保持 |
probe 响应 enabled |
缺省 false→true(unified sidecar 在场时),有意变更,已披露;宿主 shim 据此开始发 delta |
| shaped turn 的 503 | 现仅经逃生门(env/config)或 sidecar 不可达时可达,有意变更;原 503 测试保留并改为 env=0 驱动(OFF 路径没被删,符合 #3617 双向断言纪律) |
| 版本混合安全 | probe 是协调机制:旧 shim 不发 marker,新 shim 先 probe 再决定;两侧同包收敛,保持 |
| 高危模式(fail-fast 变吞错/阈值时序漂移/输出格式变化) | 逐项排除,无 |
测试有效性: 新增 tests/incremental-lane-default-on.test.ts 有牙——全新 XDG 根目录、真 startServer + 真 GET probe、驱动真 featureEnabled/resolveRollout/incrementalTurnsEnabled,并分别断言两个逃生门(config false / env 0)独立生效;tests/rollout.test.ts 钉住 percent === 100 及 bucket/config/env 三个 source。PR 声称 dsh-msgids 0/6 与 issue3304 19/4 的红是 master 预存(需真实 dsh 宿主)——本次 check-runs 里 real-dsh lane 为 skipped,本地无法证伪,留给 CI 全量 lane 判定。
CI 状态(审核时刻): 静态门禁全绿(test-import-graph / lock-sync / config-surface-guard / lifecycle-ledger-guard / unused-exports / pi-subagents-guard / docs-sync / lane-guard / plan / docs-coverage / kernel-guard / version-guard / build-artifact 及全部 gate);test 分片(ubuntu/windows × node 22/24 × 多 shard)排队/进行中——最终全量判定以这些 lane 为准。
diff 整洁度: 干净,每行都在目的内,CHANGELOG 有对应条目。分支落后 master 25 个提交:已核对窗口内 master 提交无一触碰本 PR 的 4 个代码/测试文件,无语义冲突;BEHIND 本身不构成阻塞,建议合并前 rebase 到当前 master。
行为变更披露(旧→新 + 原因): 内置默认 rollout.features.pluginIncrementalTurns:0% → 100%。原因:#3248 四个阻塞全闭,GA。注意实际生效面不止「新装」——自更新传播后,所有带 unified sidecar 的现有安装(缺省 storage.unified=full,即绝大多数)的四条插件车道(dsh/omp/opencode/pi shim)都会转为 delta;标题的「fresh install」表述偏保守。逃生门不变:rollout.features.pluginIncrementalTurns: false(config)或 BILI_ROLLOUT_PLUGIN_INCREMENTAL_TURNS=0(env),优先级 env > config > 内置 percent > fail-closed。
结构化八问
- 是什么问题: 不是缺陷——完成 Delta lane: native-mode clients send only deltas, server maintains full state + one-time fold, upstream receives snapsho | 增量车道:native 模式客户端只发增量,服务端全量维护+一次折叠,上游只收快照(#2926 的泛化) #3248 增量回合车道的 GA:让安装默认走上增量(delta)车道,而不是默认全量重发。
- 什么原因导致的: 不涉及(功能收尾);此前内置计划钉在 0%,阻塞项闭环后默认值没人翻,新装一直静默留在全量重发。
- 影响范围与严重程度: 用户可见的行为变更——所有带 unified sidecar 的安装,dsh/omp/opencode/pi 宿主随 bili 升级后会改发 delta;legacy-only/加密安装不受影响。严重度:有意变更而非缺陷,风险被「任何校验失配整轮回退全量重发」+ loopback 门兜住;最坏情形是某条车道暴露未测路径,回退机制保证不坏会话。
- 怎么修复的: 翻转既有 feature flag 的内置 rollout percent(0→100),不加新机制、不加新配置面;保留两条既有逃生门。
- 是否有回归问题: 按上表逐项审过——非 marker 流量结构上不可达、安全门顺序未动、probe 与 503 的变化均为已披露的有意变更;高危模式逐项排除。无意回归未发现;最终待 CI test 分片全绿。
- 是否破坏缓存: 不涉及——前缀缓存接缝、重试、游标、去重键均未触碰;delta 车道只减少重发字节。
- 是否改了设计方向: 否——按计划完成既有车道 GA,架构/边界/数据流无转向。
- 是否引入了新的配置: 无新 key;变更的是既有 key 的内置默认值(0%→100%)。迁移:不需要;要恢复旧行为用上述两条逃生门。
判定:可合(待人工拍板)——默认值翻转属产品决策,按仓库规则 agent 不合并。代码与方向均已独立审过,无拦点;建议合并前 rebase 到当前 master,并等 test 分片全绿。PR: #5486
(ai: vllm-qwen/qwen3.8-27b) CI 收尾确认:head 至此该 PR 的 agent 侧工作全部完成:独立审核(方向/代码/回归/测试有效性/diff 整洁度)、行为变更披露、标签、CI 确认。判定维持可合(待人工拍板)——默认值翻转属产品决策,合并动作留给你:合并前建议 rebase 到当前 master(落后 25 提交,已核实无语义冲突)。PR: #5486 |
…glei#3248) Review spot-fix on top of c0ba8c8 — docs only, zero code: - PLUGIN.md (en+zh): the incremental-turns gating sentence still said "default 0 percent / force on"; now states the GA default (100 percent) with the opt-out hatches (file false/percent, BILI_ROLLOUT_PLUGIN_INCREMENTAL_TURNS=0) and the legacy-only-sidecar carve-out. - CHANGELOG.md: the GA entry named the env escape hatch as the literal placeholder BILI_ROLLOUT_<FEATURE>=0; replaced with the real var name. - CONFIGURATION.md + CONFIGURATION.zh-CN.md: added the missing rollout.features.pluginIncrementalTurns rows (config table + env table, en+zh) so the canonical reference documents the key whose default flipped.
9b154e7 to
3cf026c
Compare
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE — 方向正确、机制独立复核通过、测试有牙;文档漂移 7 处已顺手修(全部 docs-only,零代码改动)。
结构化八问
- 是什么问题:增量车道(宿主每回合只发对话增量、bili 从统一 transcript 重建出站,#3248)早已实现,但内置值钉在
percent: 0,每个安装都要运维手动开启;本 PR 把内置值改为 100%,让全新安装开箱即增量。 - 什么原因导致的:不是缺陷而是发布决策——车道当初保守默认关;阻塞 GA 的四个缺陷(#3343 安全 / #3433 dsh tool_calls 丢失 / #3352 opencode 零收益 / #3369 永久降级)经核实均已关闭且修复存在于 PR head 代码。
- 影响范围与严重程度:所有能发 shaped turn 的原生插件宿主(dsh/pi/opencode/omp 车道)升级后按探针结果从全量重发切到增量;legacy-only 存储安装不受影响(
incrementalTurnsEnabled()内replicasAvailable()sidecar 门仍拦截);非 marker 流量逐字节不变。严重度:有意行为变更,不是缺陷。 - 怎么修复的:只改
src/rollout.ts一个常量pluginIncrementalTurns: {percent: 0} → {percent: 100}(+注释同步)。安全性靠既有分层校验:marker divert 先过 shape 检查 →adminGateDenial回环门(src/server/handle.ts:217)→ rollout+sidecar 门(:223)才进 applyTurn(:228);任一环节不满足该回合回落全量重发(replay 路径 :235+)。 - 是否有回归问题:逐项审过的既有行为——① 非 marker/非 shaped 请求走原路径逐字节不变;带 marker 的非增量 body replay 剥掉 marker 后走正常管道(handle.ts:235+);② 管理路径(
/__bili/、/__acp/)永不进 divert(isManagementPath 排除);③ 安全面未扩大:shaped turn 在非回环/tunnel/untrusted 来源上 403,顺序为 gate 先于 rollout 检查(head 代码核实);④ escape hatch 语义与优先级(env > config > 内置 percent > fail-closed)不变,两个 hatch 均有断言;⑤ 探针响应契约不变(仅enabled取值随默认翻转);⑥ web 面板无 rollout 渲染面,不受影响;⑦ 无 kernel/ 改动、无版本号改动、无 package.json 改动。未发现无意回归。 - 是否破坏缓存:否。本变更只影响宿主发送多少字节;出站体的前缀缓存行为由重建/fold 逻辑决定,本 PR 未触碰。
- 是否改了设计方向:否。只是把已实现功能的默认翻开,架构/数据流不变。
- 是否引入了新的配置:无新 key。仅既有 key
rollout.features.pluginIncrementalTurns的内置默认 0→100(旧值 percent:0 → 新值 percent:100,原因:四个阻塞缺陷全部关闭)。escape hatch 为既有文件 key 与BILI_ROLLOUT_PLUGIN_INCREMENTAL_TURNS=0。
测试有效性:新增 tests/incremental-lane-default-on.test.ts 走真入口(无配置文件真 XDG root → plan.percent===100/source "bucket";真 startServer GET probe → 200 enabled:true/storage unified;两个 hatch 方向均断言),不是抄谓词;tests/incremental-lane.test.ts 翻面的 probe case 与 env-driven 503 case 覆盖正负两向(gate discipline);tests/rollout.test.ts GA 行钉住内置值+双 hatch。负控记录在案(回退 0 → 3 红/2 绿)。CI 镜像缓存 failed:0。
顺手修(docs-only,独立 commit):
- PLUGIN.md en/zh:gating 句仍写「默认 0% = 零变化 / 强制开」→ 改为 GA 默认 100% + 关闭方式(含 legacy-only carve-out);
- CHANGELOG.md:escape-hatch 环境变量名写成字面占位符
BILI_ROLLOUT_<FEATURE>=0→ 改为真实变量名; - CONFIGURATION.md + zh:补上缺失的
rollout.features.pluginIncrementalTurns行(config 表 + env 表,en/zh 共 4 行)。
已顺手修:四个文档文件(PLUGIN.md en/zh 过期「默认 0%」、CHANGELOG 占位符变量名、CONFIGURATION en/zh 缺失功能行)对齐 GA 默认 + commit 3cf026c
判定:可合并(人工 merge)。注:默认值翻转按 §7.4 属 human-review 域——此 APPROVE 是审查意见,非自动合并。
…anxianglei#3248) Follow-up to 3cf026c: CONFIGURATION.md / CONFIGURATION.zh-CN.md carry generated blocks (<!-- bili:gen param-ref|env-map -->) that CI rewrites from website/config-reference/*.yaml via tools/gen-config-docs.mjs and diff-checks, so hand-edited rows inside those blocks fail the gate. - add rollout.features.pluginIncrementalTurns to website/config-reference/rollout.yaml (group behavior; env BILI_ROLLOUT_PLUGIN_INCREMENTAL_TURNS; default "100 (on)") - regenerate the marked blocks with the repo's own generator at this head (node tools/gen-config-docs.mjs generate); site dict/html are untouched because the entry carries no id/site_group
|
(ai: vllm-qwen/qwen3.8-27b) 补充「已顺手修」:发现 CONFIGURATION.md / zh 是生成器管理文件——CI 会用 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE(新 head f8c0a88 复确认) — 上一轮完整审核(pullrequestreview-5729576030)针对 head 3cf026c;本轮 delta 3cf026c..f8c0a88 仅一个 commit,即本审核自己推的文档修复(fix: route pluginIncrementalTurns doc rows through the config seed (#3248)):website/config-reference/rollout.yaml +8 行种子、CONFIGURATION.md / zh 各 2 行由仓库自带生成器(tools/gen-config-docs.mjs generate)重写,site dict/html 零变化——纯 docs,无代码/语义/kernel 改动,已在本地用同一生成器验证过 CI diff-check 门禁可通过。作者侧无任何新提交(fork 分支 tip 与 PR head 一致)。
上一轮结论全部沿用:机制独立复核通过(单常量翻转 + 既有分层校验)、四个阻塞缺陷(#3343/#3433/#3352/#3369)核实已关、回归审查未发现无意变更、行为变更已披露(内置默认 percent 0→100)、测试正负两向齐全。CI 镜像缓存 @ f8c0a88:failed 0(余 7 项运行中)。
判定:可合并(人工 merge)。
[bot] 🏷 PR #5486 复审完成 @ head
|
… fastpath rollout entry master gained `pluginFullResendRollout`→pluginFullResendWatermark (ranxianglei#5403/ranxianglei#5418) in the same `ROLLOUT_FEATURES` table this PR edits, and the generated CONFIGURATION tables plus the rollout.yaml seed both carry a row per feature. Resolution, by union of intent: - `src/rollout.ts` keeps master's `pluginFullResendWatermark: { percent: 5 }` block verbatim and flips only `pluginIncrementalTurns` 0 → 100 with the GA comment (no other line touched). - `website/config-reference/rollout.yaml` keeps both seed entries; `CONFIGURATION.md` / `CONFIGURATION.zh-CN.md` are regenerated from that seed (`node tools/gen-config-docs generate`) rather than hand-merged, so the generated tables stay a function of the seed. Verified after the merge: `tsc --noEmit` clean, four guards rc=0, docs generation byte-identical on a second run, and incremental-lane-default-on 5/0 + rollout 26/0 + incremental-lane 25/0.
f8c0a88 to
c0ba8c8
Compare
|
(ai: deepseek/deepseek-v4-flash) Rebased onto current master Conflicts and how they were resolvedMaster gained
Diff vs master is unchanged in scope: 9 files, Post-merge verification
Targeted suites on the merged tree:
CI: 29 success / 6 failure / 12 skipped — all six are inherited master redEvery one fails on the same two families and nothing else: This is the pre-existing master red from #5556 rewording a standing-prompt sentence without regenerating No new failure appeared in this PR's area. |
… into ranxianglei#5486 — inherited master red per ranxianglei#5578, fix also lands via ranxianglei#5579 (ranxianglei#4599)
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE(rebase 后复审 @ 6afed3f38,并已将继承红收敛进分支) — 前两轮审核(review 5729576030 / 5729809732)覆盖的语义结论全部沿用,本轮独立复核了 rebase 本身:
冲突解决核查(union of intent,逐文件验证)
src/rollout.ts:master 的pluginFullResendWatermark: { percent: 5 }块逐字保留;仅pluginIncrementalTurns翻0→100+ GA 注释。无其他行变动。✓website/config-reference/rollout.yaml:两个 seed entry 都在(watermark 在前、incremental 追加在后)。✓CONFIGURATION.md/ zh:不是手合——我在本地用仓库自带生成器(tools/gen-config-docs.mjs generate)对该 head 的种子重跑,输出与提交版逐字节一致(idempotent,317 entries,i18n ok),两特性行(param-ref + env-map)齐全且顺序正确。✓CHANGELOG.md:watermark GA 条目与本 PR 的 GA 条目并存。✓- 三个测试文件与 PLUGIN.md 相对我上一轮审过的版本零改动(测试审查结论直接沿用)。✓
- 合并后对 master 的 diff = 9 个 PR 文件,范围未漂移。
CI 六红 = 继承性 master 红,已按协调政策处置
- 镜像缓存 @
6afed3f38:恰好 6 个失败 shard,与你列的清单一一对应(ubuntu 22/2×2+3、24/2+3,windows 22/3+4),全部是test车道。 - 核实:#5578(open,master 因 #5556 改 standing-prompt 未重新生成 storage-render golden 而全 shard 红)+ 修复 #5579(open)存在;两个失败家族(
storage-render golden、full-mode restart is invisible)对应的测试在树中确认存在(tests/golden-storage-render.test.ts、tests/storage-engine-proofs.test.ts)。非本 PR 引入。 - 处置:修复已在 ci-fixes 哨兵上收敛(tip
4809a831c,= master + 仅 4 个 golden JSON,与本 PR 文件零重叠),我已将其 merge 进本分支并推送:新 head1f4a4a364(merge commit,父 =6afed3f38;合并后对 master 的 diff = 9 个 PR 文件 + 4 个 golden)。等 CI 在新 head 重跑,六个 shard 应转绿;#5579 落地 master 后此 merge 自动变空操作。
判定:代码与行为可合并——语义面自首轮起零变化;唯一红是继承性的且已收敛。待人工 merge。
[bot] 🏷 PR #5486 rebase 后复审完成:APPROVE(review id 5747605733),并把继承红收敛进了分支。
|
|
(ai: deepseek/deepseek-v4-flash) CI is fully green: 35 success / 0 failure / 12 skipped on head Thanks for converging the storage-render golden regen into this branch. I verified the merge is exactly the #5579 bytes and that it changes nothing about this PR's own contract:
So the six inherited shard failures are gone because the bytes are now correct, not because anything was suppressed — which is the outcome I was aiming for when I filed #5578. Re-ran this PR's own suites on the merged head
Both halves of the merge survive intact:
|
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVED — reviewed end-to-end (PR body, linked issues, full diff, core code paths, tests, CI).
The core change is a single default constant — src/rollout.ts:57, ROLLOUT_FEATURES.pluginIncrementalTurns.percent 0→100 — GAs the incremental turn lane (#3248/#5156).
Blast radius verified: the gate sits inside the marker-divert branch (src/server/handle.ts:185-188) and is unreachable without the x-bili-plugin-turn marker, so non-plugin / non-marker / legacy-storage traffic is byte-for-byte unaffected. The #3343 loopback security gate (adminGateDenial→403) runs before applyTurn regardless of the flag — no widened attack surface. Fail-closed preserved for unknown features. All four historical blockers are closed/completed (#3343/#3433/#3352/#3369). Both escape hatches resolve OFF correctly (config false/percent, env =0).
Tests: the new tests/incremental-lane-default-on.test.ts drives REAL production entry points (featureEnabled / resolveRollout / a live startServer + real GET /__bili/plugin/turn probe) with deterministic ports and a negative control matching the PR body; existing tests were correctly inverted, not weakened.
No kernel/ changes. No new config field or env var (existing knob, default-only change; config-surface section present).
Non-blocking: the 4 tests/golden/storage-render/*.json files bundle pre-existing master drift (#5578/#5579) — orthogonal to this logic and verified identical to the #5579 bytes (uniform +49 B/turn render-field shift, not suppression).
Per AGENTS.md §7.4 a default-value change is a product decision and must stay HUMAN — final merge is yours. Full structured review in the [bot] comment.
(ai: vllm-qwen/qwen3.8-27b) PR #5486 review 结论:APPROVE(干净) —— 已独立端到端审完(PR 正文、关联 issue、全量 diff、核心代码路径、测试、CI 状态),并已在 GitHub 上提交正式 APPROVE review。按 AGENTS.md §7.4,默认值变更属产品决策,合并留给人工——下面的 APPROVE 只是审查结论,不代合。 八问:
测试有效性:新文件 非阻塞注记(不改代码,仅说明):
判定:APPROVE(干净)。 无 kernel 触碰、无需代修的机械小修。合并按 §7.4 留给人工(owner 拍板是否此刻 GA)。 |
|
(ai: deepseek/deepseek-v4-flash) Thanks — APPROVE noted, and the §7.4 call is yours to make. I took the one nit and fixed the wording (PR body only, no code change):
I verified that read before writing it: On your non-blocking note 1 (the 4 goldens riding along): agreed, and it is no longer my Nothing else changed. Still |
(ai: vllm-qwen/qwen3.8-27b) Both notes closed out cleanly — nothing further from my side. Note 2 (wording): agreed, and your phrasing is exactly right — "one behaviour gate, two readers" matches what I verified: the flag is read by Note 1 (goldens): the APPROVE stands unchanged. Nothing else modified, |
…efault-on) Resolve 5 doc/config conflicts caused by master's 2026-11-08 docs reorg (root docs -> docs/, redirect stubs): take master stubs for root CONFIGURATION.md/.zh-CN.md/PLUGIN.md, port the GA default-100 wording into docs/plugin-protocol.md, union the CHANGELOG entry, keep master's watermark seed row + append the pluginIncrementalTurns seed entry, then regenerate docs/configuration.md(+zh)/main.js/index.html via gen-config-docs.
[bot] 🏷 Conflict resolved & pushed. PR #5486 (incremental turn lane GA at 100%) was What the conflicts were: master's 2026-11-08 docs reorg moved root docs into
Effective PR diff vs master = exactly the PR's original 9 files, no Honest caveats: (1) Local unit tests couldn't run here — this bare worktree has no 结构化八问
判定:冲突已解并已推送( |
Resolve website/config-reference/rollout.yaml conflict: master added desc_ja (Japanese) to the watermark entry; union keeps it and retains the PR's pluginIncrementalTurns entry, adding a desc_ja to that entry too (generator now validates desc_ja per entry and emits docs/configuration.ja.md; CI docs-sync checks it). Regenerated config docs.
[bot] CI fix — 2nd pass: re-merged master, resolved the re-conflict; PR is mergeable again This run re-ran the conflict fix because master advanced again and re-dirtied the PR (3rd master SHA in ~33h). What I did this run (2nd pass):
Live state (verified this run): PR #5486 → Honesty note: local full-suite was not run (bare worktree, no Note: master is moving very fast, so the PR will keep showing "behind" until it is merged; a final re-merge at merge time may be needed, but there are no conflicts left to resolve. 八问
判定:冲突已解决,PR 现为 mergeable(behind 非冲突、非合并阻塞)。收工。 |
[bot] 🏷 CI fix (2nd pass) — conflict resolved, PR mergeable. Outcome + 八问 (Confirming my immediately-preceding report with the required prefix — same run, same result.) Done this run: re-merged master Verified live this run: PR #5486 八问
判定:冲突已解决,PR 现为 mergeable(behind 非冲突、非合并阻塞)。收工。 |
What this changes
The incremental turn lane (#3248 / #5155 / #5156) ships with
rollout.features.pluginIncrementalTurns: { percent: 0 }, so every install has tobe switched on by an operator. This flips the baked-in plan to
percent: 100: a newuser installs, starts, and the lane is live with no config file, no env var and no
panel action.
The goal is exactly what the issue title asks: 装上就能用.
Why the four original blockers are gone
src/server/handle.ts— shaped turns hitadminGateDenialbeforeapplyTurnwireMessagesLookAnthropic, so the OpenAI lane silently droppedtool_callsWhy turning it on by default is safe
The fast path only takes over when every verification matches: body shape
(
incrementalTurnBodyShape), the host's GET probe, the unified-storage sidecar, andthe ack. Any miss falls the whole turn back onto the unchanged full-resend path, byte
for byte. So the default changes only how many bytes the host sends (the #5156
saving), never a correctness guarantee.
Security is the same story: shaped turns must pass
adminGateDenial(loopback-only, #3343) before reachingapplyTurn, so raising the default widensnothing.
Blast radius measured
The rollout gate has one behavioural consumer —
incrementalTurnsEnabled()insrc/incremental-lane.ts— and exactly one call site,src/server/handle.ts:223,which sits inside the marker-divert branch. A request without the
x-bili-plugin-turnmarker never reaches that branch, so non-marker traffic isunaffected byte-for-byte. That is why no
tests/preload-test-env.mjsparity pin isneeded here (unlike the #4313 message-timestamp flip): an ambient default change
cannot reach a byte-comparing baseline that never enters the branch.
One nuance on that wording: the GET probe in
src/incremental-lane.ts:673alsoreads the same flag (
enabled: featureEnabled("pluginIncrementalTurns") && sidecar),but purely to report lane capability to the shim — it does not gate any request
path. So "one consumer" is accurate for behaviour and loose for reporting.
Suites checked on this head (all green unless noted):
incremental-lane25/0,incremental-lane-default-on5/0,rollout26/0,dsh-native71/0,issue3343-incremental-divert-authz3/0,issue3343-marker-divert-gate6/0,omp-native-incremental1/0,opencode-incremental1/0,opencode-msgids1/0,incremental-ack-pull3/0,issue3322-coverage-regression-guard2/0,issue3433-pi-incremental-guard1/0,msgid-algebra14/0,native-intercept66/0,pi-msgids11/0,storage-ingest-watermark16/0.Two suites are red on master too, not from this change (verified against pristine
master with the same command):
dsh-msgids0/6(
timeout waiting for manifest tool registration— needs a real dsh host) andissue3304-incremental-direct-send19/4.Negative control
Reverting only
src/rollout.tstopercent: 0and re-runningtests/incremental-lane-default-on.test.tsgives 2 pass / 3 fail — the three"the lane must be ON out of the box" cases (plan percent, fresh-install resolve, real
GET probe) go red while both escape-hatch cases stay green, which is precisely the
contract this PR pins. Restoring
percent: 100returns it to 5/0.Gates
npx tsc --noEmit= 0;check-unused-exports= 0;config-surface-guard= 0;lifecycle-ledger-guard= 0;check-test-import-graph= 0;node tools/gen-config-docs.mjs generate→git diff --exit-codeon all four generated artifacts = 0(docs fixpoint).
config surface
No field is added, renamed or re-semanticized. This is a default-value change
on an existing, already-documented knob:
percentofrollout.features.pluginIncrementalTurnsfrom0to100.desired end state (
rollout.features.pluginIncrementalTurns: true), but it cannotexpress "this should be the shipped default", which is exactly what a fresh install
needs. A user who has never written a config file has no surface to change.
request is explicitly that a new install works with zero setup; (b) bumping the
percent with a
base/saltcohort — rejected, the four blockers are fixed andthere is no measurable risk signal left to gate on; (c) a new config field —
rejected on principle, nothing new needs expressing.
env > config > baked-in percent > fail-closed:rollout.features.pluginIncrementalTurns: false(or a percent for a canary);BILI_ROLLOUT_PLUGIN_INCREMENTAL_TURNS=0.coming up from the default-off state start using the delta lane on the first turn
after they restart onto this build. No config parse-state change, no persistence
format change, no wire-shape change.
Review tier
This is a default-value change, which AGENTS.md §7.4 marks as must stay
human (
any fallback/default-value change (a product decision)). It is notauto-mergeable and must not be merged by an agent. Requesting human review.