Skip to content

[PR] feat: block dsh auto-review traffic by default (#4634) - #4639

Open
ranxianglei wants to merge 9 commits into
masterfrom
2026-10-25_dsh-autoreview-block
Open

ranxianglei wants to merge 9 commits into
masterfrom
2026-10-25_dsh-autoreview-block

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Part of #4634

What & why

Every dsh auto-review call re-sends a self-contained snapshot of the main conversation (fixed REVIEW_POLICY system + one user blob) and bills it in full:

Since #4438 these requests ride the stateless passthrough lane (no session pollution), but they are still forwarded and billed per call. Owner direction in #4634: block by default, notify through several channels, provide an opt-out, settable from the web.

How it works

config surface

New key dsh.autoReviewBlock (boolean, default true) under the existing dsh section, env twin BILI_DSH_AUTOREVIEW_BLOCK (env > file > default, per-request hot read), documented in CONFIGURATION.md en+zh. Settable from the web config page (raw-file editor path preserves dsh.* keys, no writer change needed).

Why the existing surface cannot express it: the providers table and the compress hierarchy govern upstream routing/compression decisions; this is a traffic-class gate on an identified host-side side lane, which has no home there (the precedent is dsh.authoredCompaction, same section, same pattern).

Compat/migration: nothing to migrate — absent key = old behavior would NOT be preserved (see below); users who want forwarding restore it explicitly.

Behavior change (old → new)

dsh auto-review requests: forwarded upstream and billed per call → answered locally with a zero-usage low-risk verdict (default ON). This is the intended fix of #4634's cost problem, per owner direction. Opt-out: dsh.autoReviewBlock=false or BILI_DSH_AUTOREVIEW_BLOCK=0. Note for users: turning OFF dsh auto-review itself migrates active Auto sessions to full access (danger-full-access) — less strict, not more strict (stated in the panel banner text).

No other wire/session/stats surface changes: main-lane traffic untouched, non-dsh clients untouched, explicit x-bili-plugin-agent: main veto untouched, session state untouched (the block returns before any pipeline stage).

Tests

tests/issue4634-auto-review-block.test.ts (new, 14 tests, both gate directions per #3617):

tests/dsh-persona-fingerprint.test.ts: one module-level BILI_DSH_AUTOREVIEW_BLOCK="0" so that suite keeps pinning the #4438 LANE contract (stateless passthrough forwarding) while this PR pins the new DEFAULT — the two suites cover complementary behaviors instead of colliding.

Labeled incidental fix (same commit, clearly separate concern): pluginadv.desc wording still described the pre-#4438 sub-session isolation ("隔离到独立子会话" / "isolates into a separate sub-session"); corrected to the stateless-passthrough fact (en+zh).

CI note

4 tests in tests/dsh-persona-fingerprint.test.ts (openai/responses/google/cross-lane #4438 contract) are born-red on current master — verified identical failure set on a clean tree without this PR's changes (part of the #4599 born-red cluster; converging on ci-fixes via the sentinel). Not a regression of this PR.

@ranxianglei ranxianglei changed the title feat: block dsh auto-review traffic by default (#4634) [PR] feat: block dsh auto-review traffic by default (#4634) Oct 25, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。检索 open+closed issue/PR(关键词 auto-review / autoReviewBlock / 4634)唯一命中是本 PR 自身;相关条目均非同项——#4634 是原始问题(成本事故)、#4636 是同线程的 D2-1 截断诊断小修(不同机制)、#4640 是根因方向跟踪(车道无界增长/前缀缓存劣化,本 PR 明确声明不覆盖)。

标签:pr / dsh / scope/wiring / p2 —— feat 实现 owner 在 #4634 的拍板(默认拦截 dsh auto-review 流量),主机制是请求管道门控;按「确定性成本问题、会话可用」定 p2,车道无界增长部分归 #4640。

开始独立审核(不复读 PR 描述结论):拉分支核对代码 → 既有行为清单回归审查 → 测试有效性 → CI 状态(含 #4599 继承红核对)。完整八问结论随后补上。

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-25_dsh-autoreview-block (979969d)

Latest build — install this exact version

npm install -g billion-context@0.0.9601-pr.4639.fbe5428

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
979969d billion-context@0.0.9601-pr.4639.fbe5428 build
521a3c8 billion-context@0.0.9445-pr.4639.adbbd43 build
e36f31f billion-context@0.0.9371-pr.4639.eaa8cdf build
adbe821 billion-context@0.0.7815-pr.4639.c9a291c build
ef19bf8 billion-context@0.0.7797-pr.4639.00386d4 build
65070aa billion-context@0.0.7782-pr.4639.fce018a build
1f01f52 billion-context@0.0.7632-pr.4639.fb5a290 build
6396c4a billion-context@0.0.7625-pr.4639.0403ae6 build
54dadf1 billion-context@0.0.7624-pr.4639.d42dcfc build
242c488 billion-context@0.0.7620-pr.4639.dfbf002 build

Download artifact

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

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

独立审核完成(未照抄 PR 描述——以下结论全部对着 diff、代码与本地实测重新验证过)。

审核中在分支上补的提交(已推送,新 head 9c47cc984):

  1. 修掉一处本 PR 自引入的 CI 红:config-surface 门禁会失败——dsh.autoReviewBlock 没有 website/config-reference/*.yaml 种子条目,而原 PR 是手写了 CONFIGURATION.md en/zh 里生成区块内的表格行(该文件头部明说「edit the seed, regenerate」,一跑生成器就把手写的行抹掉,我实测复现)。修法:补种子条目(server.yaml 键条目 + env-only.yaml env 层条目,双语),再用 node tools/gen-config-docs.mjs generate 重生成标记区块。本地两门禁复跑均绿(config-surface coverage OK、check-coverage exit 0)。commit f9b8a781c,独立标注。
  2. 基线刷新:分支原基于 64fc7324c(落后 master 5 提交)。按协议合入 origin/master(bd29924d4)+ origin/ci-fixes(b06b40862)。唯一冲突:error-dump.ts/其测试的 Opt-in raw dumps (ACP_DUMP_BODY) write conversation bodies to disk unmasked with no warning — real credentials landed on disk #4482 banner 上限修复在 master(d515aeae8,经 [PR] fix(release): label-gated head-tree publish for conflicted carve-out ship PRs #4596)与 ci-fixes(995e642ae)是同一修复两种写法——解冲突保留 master 版(解决后与 master 逐字节一致,error-dump 套件本地 14/14 绿)。ci-fixes 带入的 5 个 born-red 测试修正文件在 [PR] fix(ci): master-CI convergence lane — persistent ci-fixes branch (sentinel protocol 2026-10-25) #4635 合入 master 后会从本 PR diff 消失。

本地定向验证(全量判定以 CI 为准):

结构化八问:

  1. 是什么问题:dsh 的自动审查每次工具调用都把主会话整段快照重发计费(稳态 O(历史)),切模型时整个累积量一次性重付(事故实测 ~728K)——owner 定向:默认拦截 + 多通道通知 + 可关开关 + web 可设。
  2. 什么原因导致的:机制在 dsh 侧设计(one-shot llm.stream() 无 sessionId、blob_N ⊇ blob_{N-1} 自我覆盖、每次全额计费);bili 侧 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 直通车道只解决了会话污染,没解决计费——本 PR 在 bili 出站侧把计费停掉。
  3. 影响范围与严重程度:所有开了 auto-review 的 dsh 用户升级后审查请求被本地应答(工具照常执行、agent 行为不变、计费停止);想恢复转发用 dsh.autoReviewBlock=false 或 BILI_DSH_AUTOREVIEW_BLOCK=0。性质是 owner 拍板的降本默认行为变更,不是缺陷修复。
  4. 怎么修复的:复用 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 车道的证据门原样(形状检测 isDshAutoReviewRequest + live stamp 或 sticky 绑定,单一判定处 dshReviewSidecar,与 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 共用同一布尔——不会两处判定漂移);在一切 pipeline 阶段之前本地应答(零内核状态触碰、零上游出站);载荷 = 最小合法低风险裁决 {"risk":"low","decision":"allow"}(零 usage、终端 stop)——形状受 dsh fail-closed 审查器解析器约束(空响应会让 Auto 预设下每次工具调用都被拒,agent 瘫痪在重试里);通知三通道 = tee-log warn(带估算 token 与关闭指引)+ 面板 banner(blocked>0 才出现,含关闭 auto-review 本身的方式与 danger-full-access 更宽松提示)+ /__bili/status.autoReviewBlock。已知边界(google wire 无已知裁决形状 → fall-through 照常转发)已在代码注释与 PR 描述披露,方向安全(宁可不拦也不发畸形响应)。
  5. 是否有回归问题:逐项清点触碰路径的既有行为——非审查流量:dshReviewSidecar=false 不进新分支,零变化;block 关闭 / 未知 wire / 无证据的审查流量:fall-through 到与原路径字节一致(负向测试钉死);主会话 stats/内核状态/ref 账本:不变(测试断言);/__bili/status:纯加字段(加法性,不破既有消费者);面板:新增 banner 默认隐藏;i18n:双语各加 4 键对称,pluginadv.desc 措辞修正(PR 已标注的顺手小修,改后表述与 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 后的实际行为一致)。高危模式逐项过:吞错/阈值漂移/时序/输出格式变化——均无。唯一有意行为变更 = 默认开拦截(旧:审查请求转发并计费 → 新:本地应答零 usage),即本 PR 目的,旧值→新值在此披露。
  6. 是否破坏缓存:否——被拦请求不碰 session/kernel/ref 账本(测试断言);且移除审查流量反而消除其对上游前缀缓存的污染(审查车道稳态 miss O(历史)正是 Massive token cache misses on model switch | 切模型大量token未命中 #4634 分析结论),主会话缓存稳定性净改善。
  7. 是否改了设计方向:没有——沿用既有本地伪造先例(autoModeForge auto mode 状态丢失,会话累计输入了593.44M tokens #2740、bili-authored client compaction: let the host's own compaction flow run, but bili writes the checkpoint #3733 压缩锻造)的同款模式与放置纪律,只是应用到另一条宿主侧车道。
  8. 是否引入新配置:有——dsh.autoReviewBlock(bool,默认 true)+ BILI_DSH_AUTOREVIEW_BLOCK(env 优先,0/false 恢复转发);按请求读取热生效无需重启;CONFIGURATION.md en+zh 已文档化、种子已登记(审核修复项)、Web 配置页原始编辑器可设。env 类别归属:host-side posture(拦宿主发起的流量),在六类许可范围内。

CI 状态(撰写时):新 head 9c47cc984 —— 7 条 e2e 车道已绿(含 e2e-dsh-plugin-lane 真 dsh 客户端),主 CI(test 分片 + 静态门禁)排队中。预期残留红全部为继承性:dsh-persona-fingerprint 4 项(born-red,上文独立确认)+ 存储车道 7 项(#4599 floor 90 待 A/B/C 拍板)——均出自 master,非本 PR 引入。主车道出结果后我补一行结论。

判定:代码、测试、文档面均达标;唯一自引入红(种子登记缺失)已在分支上修掉并本地门禁复绿。主 CI 分片确认除继承簇外无新增红即可合并——继承红归 #4599 收敛轨道(哨兵 ci-fixes + 存储车道待拍板),不阻塞本 PR 自身变更的可合并判定。

ranxianglei pushed a commit that referenced this pull request Oct 25, 2026
…ck-banner test seam (#4639)

The new block landed between the // #2645 and // #2861 seam comments in
WEB_CLIENT; tests/issue2645-pck-banner-escape.test.ts slices exactly that
range and executes it under a $() stub that aliases every element id to one
backing store, so the autoreview block's hide-branch wiped the pck banner's
innerHTML in the harness (CI red: 'escaped ids must land in the banner
markup'). Moved after the #2861 host-plugin banner block — no behavior
change in the real browser (distinct DOM elements), seam content restored.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

主车道 CI 出结果了(最终 head d8b63e679),监控期间又自查出 3 个自引入红——全部已修复并推送:

CI 终态(d8b63e679,28 个红项逐一归类,自引入红归零)

监控期新发现的自引入红(独立标注 commit)

  1. 5a274006d — 新 env BILI_DSH_AUTOREVIEW_BLOCK 漏注册 LIFECYCLE.md → lifecycle-ledger-guard 红;§2 永久面补行;
  2. 29676e407 — autoreview banner 的 JS 被插进 tests/issue2645-pck-banner-escape.test.ts 的两条缝注释之间的切片范围(该测试把切片在别名 $() 桩下执行,所有元素 id 指向同一对象),其隐藏分支清掉了 pck banner 刚写入的 innerHTML → 红;块移出缝外,真实浏览器行为零变化(不同 DOM 元素);
  3. d8b63e679 — tests/issue4438-dsh-review-lane-isolation.test.ts 漏了模块级 opt-out(作者给 persona-fingerprint 补的那 5 行的同类改动漏了这一处),它的两个 e2e 钉的是 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 转发契约,新默认下必然红;按同一模式补上——该文件继续钉转发契约,新套件钉新默认,互补不冲突。

四个 commit(含上条消息报过的种子登记 f9b8a781c)全部无运行时行为变化(文档登记 / 代码位置移动 / 测试环境变量),八问结论维持不变。

判定:本 PR 自身无新增红、无回归,具备合并条件;合并后主车道剩余红全部是 #4599 存量簇(等决策)+ 偶发抖动。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI auto-fix lane 判定(attempt 1/2):无范围内可修项——不 push 任何代码。 Head d8b63e6(run 40162658807)7 个 test shard 红、共 28 项失败,已逐项核对 check 日志,分四类,均非本 PR 代码所致:

  1. 存储簇 21 项(full-mode restart ×4 wire ×3 shard、rollback contract ×3、corrupt index.db ×3、orphan freeze ×3):master 继承红。断言签名与 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floor 90 bisect 出的簇完全一致(outbound body #13 digest drift vs legacy restart,日志含 ledger-aligned refs … restamped=6 … (#4316 PR3/3) + unified shadow DIGEST DRIFT)——根因是 380ef4d(After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 layer-3 ledger restamp),待 owner A/B/C 决策,auto-fix lane 不能动。
  2. storage-render golden (chat) ×3(每 lane 一个 shard):新识别的独立机制,不属于上面簇(修正 floor 6 把它并入存储簇的归并):golden drive 启动即抛(node_modules/acp-kernel/dist is older than kernel/src … (#3325),4ms,drive 未运行)。根因 = CI Windows test lane takes 20+ minutes: every leg does a full rebuild of kernel/pi-subagents dist — the sharding is way | CI windows 测试车道 20+ 分钟:每条腿都全量重建 kernel/pi-subagents dist,分片也太粗 #4360 dist 缓存 × test: rebaseline storage-render goldens after remove-absorb (#3309) #3325 mtime guard 交互:actions/cache restore 保留旧 mtime,pretest hook marker 字节一致走 HIT 路径不刷新 mtime,guard 纯 mtime 比较 → cache 命中的 leg 确定性红。这是 master 级 CI 管道缺陷(影响所有 PR),修复应收敛进 ci-fixes(哨兵统一维护),push 到本 feature 分支会污染 diff。细节与修法建议已报 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599。
  3. flake 4 项:plugin-fork "survive a new proxy process" ×3(断言 diff 为 expected 独有 - refLedgerAligned: true 缺失,重启重载时序竞态,41ms 快失败;两树本地各跑两次均过)+ responses-websocket transport-recovery ×1(mock 上游 bili_throttle_hold 故障注入竞态,26ms 快失败)。两者都不在本 PR 触碰的路径上。
  4. win-22 shard 5 整 job 死亡:日志在 responses-websocket 测试中途截断、无 TAP summary,job 约 5 分钟后判 failed(排队晚启动 4 分钟);日志未见 OOM/超时痕迹,按基础设施 flake 处理,与第 3 类同族。

为何不合 ci-fixes:哨兵已 help-merge(floor 99,head → dcfa2d6);已验证 git diff --stat d8b63e679..dcfa2d630 为空——tree 逐字节相同,再 merge 是纯 no-op,重跑 CI 会确定性复现同样的红(flake 除外)。

八问:

  1. 是什么问题:本 PR CI 红,需判定是否本 PR 自身问题。
  2. 什么原因导致:28 项红全部是继承性/结构性——After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 restamp 簇(待决策)、CI Windows test lane takes 20+ minutes: every leg does a full rebuild of kernel/pi-subagents dist — the sharding is way | CI windows 测试车道 20+ 分钟:每条腿都全量重建 kernel/pi-subagents dist,分片也太粗 #4360×test: rebaseline storage-render goldens after remove-absorb (#3309) #3325 缓存-mtime 管道缺陷(本轮新发现,机制已闭环)、已知 flake 两类、infra 死亡一例;与本 PR 20 文件 diff(零触碰 storage/kernel 路径)无因果关系。
  3. 影响范围与严重程度:不影响本 PR 功能正确性(全部静态门禁绿,含 config-surface/lifecycle-ledger);阻塞合并信号;新发现的缓存-mtime 缺陷影响所有 kernel 缓存命中的 PR leg(每 lane 确定性 1 红)。
  4. 怎么修复的:本轮未修(范围内无可修小项)。转绿路径 = ① owner 对存储簇拍板 A/B/C(建议见 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floor 90)② 哨兵在 ci-fixes 落 mtime 刷新修复(建议已报 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599,HIT 路径 touch dist,约 5 行)③ 重跑吸收 flake。
  5. 是否有回归问题:未做任何改动,无回归。审过的既有行为:本 PR diff 零触碰 storage/kernel/wire 路径,7 个红 shard 的断言签名均与 dsh-auto-review-block 无关。
  6. 是否破坏缓存:不涉及(本次涉事的"缓存"是 CI dist 产物缓存,它是缺陷来源本身,与产品侧前缀缓存无关)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新的配置:不涉及。

判定:verdict comment,不 push。等 owner A/B/C 决策 + 哨兵 ci-fixes 收敛后重跑验证。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI auto-fix lane 最终判定(attempt 2/2,车道关闭):无范围内可修项——不 push 任何代码。 Head dcfa2d6(run 40164524872)7 个红 shard、共 29 项失败,已逐项核对 check 日志,与上一轮(同 tree,git diff --stat d8b63e679..dcfa2d630 为空)的预测完全一致——确定性红精确复现:

  1. After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 restamp 簇 18 项:full-mode restart ×3 wire(anthropic/responses/google)×3 lane + rollback 契约 ×3 + corrupt index.db ×3 + orphan freeze ×3。断言签名不变(digest drift vs legacy restart);根因 380ef4d(After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 layer-3 ledger restamp),待 owner A/B/C 决策(CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floor 90),超出 auto-fix lane 权限。
  2. CI Windows test lane takes 20+ minutes: every leg does a full rebuild of kernel/pi-subagents dist — the sharding is way | CI windows 测试车道 20+ 分钟:每条腿都全量重建 kernel/pi-subagents dist,分片也太粗 #4360×test: rebaseline storage-render goldens after remove-absorb (#3309) #3325 stale-dist 簇 6 项(上轮识别的机制,已报 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599):本轮面从 3 扩到 6——除 storage-render golden (chat) ×3 lane 外,cache 命中 leg 的 full-mode chat wire ×3 也先撞 mtime guard(golden drive: node_modules/acp-kernel/dist is older than kernel/src … (#3325),drive 未启动即抛)。证实波及所有跑 golden drive 的测试,不止 golden 套件。修复应收敛进 ci-fixes(HIT 路径刷新 dist mtime,约 5 行),push 到 feature 分支会污染 diff。
  3. flake 5 项:plugin-fork "survive a new proxy process" ×3(ERR_ASSERTION,与上轮同类竞态)+ 新实例 seq-ledger-pr3.test.ts Windows 临时目录 EBUSY: resource busy or locked, unlink …\Temp\bili-pr3-*\db-*\index.db ×2(win-22 shard 5;job 正常收尾,无上轮的 infra 死亡)。两者都不在本 PR diff 触碰的路径上。
  4. 全部静态门禁绿(config-surface/lifecycle-ledger/kernel-guard 等);本 PR 新增测试无一失败。

为何不合 ci-fixes:ci-fixes tip 仍 a11e170(上轮后未变),merge-tree 内容 delta 对本 head 验证为空——纯 no-op,重跑只会再复现同样的红。

八问:

  1. 是什么问题:本 PR CI 红需判定是否自身引入;本轮为 auto-fix 车道最后一轮。
  2. 什么原因导致:29 项全部继承性/结构性——After model switch / client-side history rewrite, all message identities (content hashes) are replaced: ACP numbers re-m | 切模型/客户端重写历史后,消息身份(内容哈希)全部更换:acp 编号重铸、折叠覆盖大规模重挂、死 ref、churn 区临时膨胀重折 #4316 restamp 簇(待决策)、CI Windows test lane takes 20+ minutes: every leg does a full rebuild of kernel/pi-subagents dist — the sharding is way | CI windows 测试车道 20+ 分钟:每条腿都全量重建 kernel/pi-subagents dist,分片也太粗 #4360×test: rebaseline storage-render goldens after remove-absorb (#3309) #3325 缓存-mtime 管道缺陷(机制闭环、修法已报)、已知 flake + 新 Windows 临时文件锁 flake 实例;与本 PR diff(零触碰 storage/kernel 路径)无因果关系。
  3. 影响范围与严重程度:不影响本 PR 功能正确性;阻塞合并信号;stale-dist 缺陷影响所有 kernel 缓存命中的 PR leg(本轮实测 4 个分片各 ≥1 确定性红)。
  4. 怎么修复的:本轮未修(范围内无可修小项)。转绿路径 = ① owner 对存储簇拍板 A/B/C ② 哨兵在 ci-fixes 落 mtime 刷新修复 ③ 重跑吸收 flake。
  5. 是否有回归问题:未做任何改动,无回归。审过的既有行为:红 shard 断言签名均与 dsh-auto-review-block 无关。
  6. 是否破坏缓存:不涉及(涉事的是 CI dist 产物缓存,它是缺陷来源本身,与产品侧前缀缓存无关)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新的配置:不涉及。

判定:verdict,不 push;auto-fix 车道(2/2)关闭。待 owner A/B/C 决策 + 哨兵收敛 ci-fixes 后重跑一次即预期转绿(flake 除外)。

@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch 2 times, most recently from cca55ec to 809e4ad Compare October 31, 2026 17:08
ranxianglei added a commit that referenced this pull request Oct 31, 2026
…ier)

e209109. All 16 PR-#4634 file changes now byte-verified against the locally built tree.
Repaired files: src/config.ts, src/knobs.ts, src/server/admin.ts, src/server/handle.ts, src/web/client.ts, src/web/i18n.ts, src/web/page.ts, tests/dsh-persona-fingerprint.test.ts, tests/issue4438-dsh-review-lane-isolation.test.ts, website/config-reference/env-only.yaml, website/config-reference/server.yaml
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from 809e4ad to 8ee14d2 Compare October 31, 2026 17:35
ranxianglei added a commit that referenced this pull request Oct 31, 2026
…ments)

Base e209109. All 16 PR-#4634 file changes byte-verified against the locally audited tree
(merge conflict resolution + dropped-line replay + esbuild/type structure gates).
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from 8ee14d2 to e9fceeb Compare October 31, 2026 17:40
ranxianglei added a commit that referenced this pull request Nov 1, 2026
…arlier tree build

src/server/dsh-auto-review-block.ts and tests/issue4634-auto-review-block.test.ts were absent
from previous heads (build imported them => red). All 16 PR files byte-verified.
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from e9fceeb to 6b78cc3 Compare November 1, 2026 00:46
ranxianglei added a commit that referenced this pull request Nov 1, 2026
…arlier tree build

src/server/dsh-auto-review-block.ts and tests/issue4634-auto-review-block.test.ts were absent
from previous heads (build imported them => red). All 16 PR files byte-verified.
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from 6b78cc3 to 242c488 Compare November 1, 2026 00:55
ranxianglei added a commit that referenced this pull request Nov 1, 2026
…arlier tree build

src/server/dsh-auto-review-block.ts and tests/issue4634-auto-review-block.test.ts were absent
from previous heads (build imported them => red). All 16 PR files byte-verified.
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from 242c488 to 54dadf1 Compare November 1, 2026 01:25
ranxianglei added a commit that referenced this pull request Nov 1, 2026
…arlier tree build

src/server/dsh-auto-review-block.ts and tests/issue4634-auto-review-block.test.ts were absent
from previous heads (build imported them => red). All 16 PR files byte-verified.
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from 54dadf1 to 6396c4a Compare November 1, 2026 01:29
…arlier tree build

src/server/dsh-auto-review-block.ts and tests/issue4634-auto-review-block.test.ts were absent
from previous heads (build imported them => red). All 16 PR files byte-verified.
@ranxianglei
ranxianglei force-pushed the 2026-10-25_dsh-autoreview-block branch from 6396c4a to 1f01f52 Compare November 1, 2026 02:07
ranxianglei and others added 2 commits November 2, 2026 00:54
Two small mechanical defects found during review, fixed on the PR branch:

- src/config.ts: the DshFileSettings doc comment was left garbled by a botched
  edit — it carried BOTH the new "Live keys: authoredCompaction, contextTab/
  contextTabLabel, autoReviewBlock" wording AND the stale "(irreversible), so no
  opt-in remains. The one live key is authoredCompaction" text. Drop the two
  duplicated lines so the sentence reads cleanly. Comment-only, zero runtime impact.

- src/web/client.ts: the new autoreview-banner block in loadOverview was nested
  inside the host-plugin if(hns.length>0){...}else{...} else-branch because its
  two closing braces were left at the end instead of right after the hb hide.
  Result: the auto-review banner only rendered when there were NO host-plugin
  notices (suppressed exactly when a high-cost host plugin coexists with blocked
  reviews). Hoist it back to a sibling of the host-plugin block, matching its
  indentation and the "placement outside the seams" comment. Verified: WEB_CLIENT
  still parses (vm.Script); issue2645 / issue2861 / issue4634 suites green.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

APPROVE — 方向对、范围收得住、两条门都钉了测试。我在批准前先顺手修掉了分支上的两处小机械缺陷(commit ef19bf8a9,已在分支上)。
(注:GitHub 禁止 PR 作者对自己的 PR 发起正式 approve 事件——本 token 即作者 ranxianglei,故以本评论作为评审记录,判定为 APPROVE。)

已顺手修(均在 PR 分支,commit ef19bf8a9):

  1. src/config.ts DshFileSettings 注释被一次坏编辑弄乱——同时留着新写的「Live keys: … autoReviewBlock」和旧的「The one live key is authoredCompaction… Leftover removed keys still sit in old」两句,读起来自相矛盾。删掉重复的两行,句子恢复通顺。纯注释,零运行影响。
  2. src/web/client.ts loadOverview 里新增的 autoreview-banner 块,因两个花括号被留在了块尾而非 hb.innerHTML="" 之后,被嵌进了 host-plugin 的 if(hns.length>0){…} else {…} 的 else 分支——后果:只要存在 host-plugin 提示,auto-review 横幅就永远不显示(恰好是在高成本宿主插件与拦截共存时才该显示的场景)。已把两个括号移回,使该块与 host-plugin 块同级(与其缩进及「placement constrained OUTSIDE the seams」注释一致)。验证:WEB_CLIENT 内层 JS 经 vm.Script 解析通过(tsc 不查模板字面量体,所以这处能漏过 CI);issue2645(3)、issue2861(18)、issue4634(14) 三套本地定向测试全绿。

结构化八问:

  1. 是什么问题:dsh auto-review 每次工具调用都把主会话的自包含快照整段重发上游计费——稳态 miss O(历史),切模型时整个累积车道一次性重付(Massive token cache misses on model switch | 切模型大量token未命中 #4634 事故实测 ~728K token / 用户看到的「七八十w」)。本 PR 默认在本地应答这类请求,止住计费。
  2. 什么原因导致的:[Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 起这些请求改走无状态直通车道(不再污染会话),但仍被转发并逐次计费——这是同一机制的成本面,不是缓存 bug,也不是压缩 bug。
  3. 影响范围与严重程度:仅 dsh auto-review 车道。主车道、非 dsh 客户端子代理车道、无证据会话、显式 x-bili-plugin-agent: main veto 一律不碰。属成本止血,p2 级(能用但有明显成本问题、需 opt-out 绕行);「默认拦截」这个方向是 owner 在 Massive token cache misses on model switch | 切模型大量token未命中 #4634 拍板的。
  4. 怎么修复的:复用 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 车道同一证据门(形状识别 isDshAutoReviewRequest + live plugin stamp 或 sticky 会话绑定),命中且开关开启时在任何管道阶段之前 return,本地回一个协议合法的最小低风险裁决 {"risk":"low","decision":"allow"}(finish=stop;openai/anthropic/responses 三种 wire 形状全程零 usage);Google wire 无已知裁决形状 → 返回 null → fall-through 照常转发,绝不发畸形响应(沿用 forged-body 纪律)。
  5. 是否有回归风险:逐项清点触碰路径的既有行为——主车道转发不变 / 无证据会话转发不变 / google 透传不变 / session 状态不变(return 在管道前,sidecar 不计入主会话 stats,测试已断言 stats.requests===0)。高危模式过一遍:无 fail-fast 变吞错、无默认值/阈值/时序/输出格式漂移、无静默失效的重试/缓存策略。唯一语义变化就是目标行为本身(下方披露)。本地定向跑 issue4634/issue2861/issue2645 全绿。
  6. 是否破坏缓存:不涉及——拦截发生在转发之前,主会话前缀缓存不受影响;savedEstTokens 为展示估算(inboundBytes/4),不上线、不进任何去重键。
  7. 是否改了设计方向:不改架构/边界/数据流;是在既有 dsh 侧车道上叠加一个流量门,沿用同段同模式的 dsh.authoredCompaction 先例。
  8. 是否引入新配置:是。dsh.autoReviewBlock(布尔,默认 true)+ env 孪生 BILI_DSH_AUTOREVIEW_BLOCK(env > file > default,每请求热读,无需重启);CONFIGURATION.md en+zh、LIFECYCLE.md、website/config-reference/*.yaml 均已同步;PR 正文带 config-surface 说明段(为何现有 providers/compress 面表达不了它、考虑过哪些既有机制)。

行为变更披露(旧→新):dsh auto-review 请求 —— 旧:转发上游、逐次计费;新:本地以零 usage 低风险裁决应答(默认 ON)。opt-out:dsh.autoReviewBlock=false 或 BILI_DSH_AUTOREVIEW_BLOCK=0。伴随的安全姿态变化:bili 现在恒答 allow,等效于在 Auto 预设下停用 dsh auto-review 的工具审查——这是 owner 指示的止血取舍,PR 正文已如实披露(关闭该插件会把活动 Auto 会话迁到 danger-full-access,更宽而非更严)。

CI 绿(镜像缓存 summary failed=0;e2e 车道 gated/skipped)。两处小缺陷已在分支顺手修掉(ef19bf8a9),不降级判定。可合。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

复审新 head ef19bf8a9(上一轮我推的两处顺手修复之后系统重新触发的这轮):

  • 唯一增量 = 我自己的那个修复提交(src/config.ts -2 / src/web/client.ts +2/-2,即上一条「已顺手修」里的两处);作者侧无任何新改动。
  • 全 PR diff 仍不碰 kernel/ —— kernel 硬规则依旧不适用。
  • CI 镜像缓存该 head:static-gates×2、config-surface-guard、unused-exports、gate、mysql-contract 均 success;e2e 车道按设计 skipped;测试分片在跑、暂无红(mergeable_state: blocked 是等审核,不是 CI 失败)。
  • 本地定向验证(vm.Script 解析 WEB_CLIENT + issue4634/issue2861/issue2645)此前已在本 head 上全绿,无需重跑。

判定不变:APPROVE(可合)。 无新增需修项。

Automatic up-to-date update: master advanced via #5414 (blog pipeline,
6 files, zero overlap with this PR's 16 files) after head ef19bf8.
Merge tree built path-wise (no content conflicts possible).
ee0dcc7
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

复审 head adbe821f9(本轮增量 = 作者把 master 合进了分支,非新功能改动):结论不变,APPROVE(可合)。

可合(待 owner 人工 approve 解除 blocked)。

ci-check added 2 commits November 13, 2026 00:44
# Conflicts:
#	CONFIGURATION.md
#	CONFIGURATION.zh-CN.md
#	LIFECYCLE.md
#	src/server/handle.ts
#	src/web/client.ts
#	src/web/page.ts
…owKey

The #4634 change added the autoReviewBlock live-key + updated the comment
but left the old two-line comment block in place, producing a duplicated
stale comment (it still read 'contextTab + contextTabLabel' without
autoReviewBlock). Zero runtime impact — comment only. Cleaned up in passing
while resolving the master merge conflict on this branch.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Merge conflict resolved & pushed. I merged origin/master (259cd87) into the PR branch 2026-10-25_dsh-autoreview-block and resolved all 6 conflicts. New head: e36f31f0d4 (merge commit 0916a90dd1 + a small in-passing fix e36f31f0d4).

Why merge, not rebase: the PR history is already messy (multiple prior master-merges + a "repair rebase tree" commit that once dropped two files); the author's established pattern is merge-master (done twice); merge is non-destructive and needs only a plain push (no force) and preserves the already-approved history. A rebase risked dropping files again and rewriting approved commits.

The 6 conflicts (all resolved by union — keep the PR's #4634 feature + master's concurrent work):

Verification (this run):

  • Effective diff vs origin/master = exactly the 16 feature files, 607 ins / 10 del — feature-only, no stray merge changes.
  • npm run typecheck clean.
  • 3 targeted feature test files: 32 pass / 0 fail (issue4634-auto-review-block, dsh-persona-fingerprint, issue4438-dsh-review-lane-isolation).

In-passing fix (小问题直接修, separate commit e36f31f0d4): src/config.ts warnRemovedDshAllowKey had a stale duplicated comment left by the original #4634 commit (it still read "contextTab + contextTabLabel" without autoReviewBlock). Removed the 2 stale lines — zero runtime impact.

CI status (honest): the mirror cache is stale — it still shows the pre-merge head (adbe821f92, fetched 2026-11-02, all 30 checks green) and has not yet re-polled the new head e36f31f0d4. I cannot verify the new head's CI live in this run; it is pending. The stale mergeable_state: blocked flag in that same cache should clear once GitHub re-evaluates after this push.


结构化八问

  1. 是什么问题:PR Massive token cache misses on model switch | 切模型大量token未命中 #4634(默认拦截 dsh 自动审查流量)与其 base 分支冲突,merge 状态 dirty,无法合并。
  2. 什么原因导致的:PR 从较旧的 master(merge-base ee0dcc7)分出后,master 线性前进了 25+ 个提交(到 259cd87),其中 6 个文件被双方不同地改动——master 侧做了文档重组(CONFIGURATION.md→docs/configuration.md、LIFECYCLE.md→docs/lifecycle.md)以及自身特性(Unified Announcement Panel Design (Approved): Built-in declarations + local JSON + remote GitHub raw — a single renderer | 公告面统一设计(已批准):内置声明 + 本地 JSON + 远程 GitHub raw,三来源一套渲染器 #5548 统一公告、DSH: If the first request of a session originates from a bypass call, compression for the entire session is permanently | DSH: If the first request of a session originates from a bypass call, compress for the entire session is permanently inv | DSH:会话首个… #5656 single-shot sidecar)对 handle.ts/client.ts/page.ts 的改动,与 PR 的 Massive token cache misses on model switch | 切模型大量token未命中 #4634 特性落在同一批行上。
  3. 影响范围与严重程度:仅影响本 PR 的可合并性(冲突导致 merge 状态 dirty、blocked);无用户侧影响——特性代码本身未变,只动了合并解决。严重度:PR 被卡在无法合并。
  4. 怎么修复的:把 origin/master(259cd87)merge 进 PR 分支(选 merge 而非 rebase:非破坏、只需普通 push、保留已批准历史、契合作者既有的 merge-master 习惯)。6 处冲突全部按「并集」解决——保留 PR 的 Massive token cache misses on model switch | 切模型大量token未命中 #4634 特性 + master 的并发改动;把 PR 的 BILI_DSH_AUTOREVIEW_BLOCK env 行迁进 docs/lifecycle.md(lifecycle-ledger-guard 强制);用合并后的 yaml seed 重新生成 docs/configuration.md + .zh-CN.md。对 master 的有效 diff = 恰好 16 个特性文件(607 增/10 删),纯特性、无合并杂音。
  5. 是否有回归问题:无。typecheck 干净;3 个特性测试文件 32 过 / 0 挂。合并同时保留了 PR 特性与 master 并发改动;唯一超出特性的改动是 config.ts 一处陈旧注释清理(零运行时影响)。
  6. 是否破坏缓存:不涉及。未触碰任何缓存/重试/增量游标/去重键逻辑;合并只解决 6 个文件的文本冲突,特性行为(dsh 自动审查拦截)不变。
  7. 是否改了设计方向:不涉及。无架构/边界/数据流转向,只是把 master 的并发工作与 PR 特性整合到一起。
  8. 是否引入了新的配置:合并本身未引入任何新配置。dsh.autoReviewBlock(文件键)+ BILI_DSH_AUTOREVIEW_BLOCK(env)是 PR 自身特性(已批准)带来的,非本次合并新增;env 行只是被迁进 docs/lifecycle.md 台账以满足 CI 守卫。

判定:冲突已解决并推送,可进入 CI 全局把关;新 head 的 CI 在本轮无法实时验证(镜像缓存仍停在合并前的旧 head),待其跑完确认。

Resolve 2 conflicts in website/config-reference/{env-only,server}.yaml:
master's Japanese-docs work (#6072) added desc_ja to every seed entry at
the same lines where this PR inserts the new dsh.autoReviewBlock /
BILI_DSH_AUTOREVIEW_BLOCK entries. Resolution keeps BOTH: master's desc_ja
lines + the PR's new entries, with desc_ja added to the two new entries
(the generator requires desc_ja on every entry) and the dsh-section desc_ja
updated to list dsh.autoReviewBlock. Regenerated docs/configuration.ja.md
from the seeds (en/zh blocks unchanged).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Merge conflict resolved & pushed. I merged origin/master (243709bef2) into the PR branch 2026-10-25_dsh-autoreview-block and resolved both conflicts. New head: 521a3c8875.

Why merge, not rebase: the PR history already carries two prior master-merges (the author's established pattern); merge is non-destructive, needs only a plain push (no force), and preserves the already-approved history. A rebase risked rewriting approved commits. (Push discipline: re-fetched before pushing — the remote branch was unchanged at e36f31f0d4, so this was a plain fast-forward push, no force.)

The 2 conflicts (both in the config-reference YAML seeds): master's Japanese-docs work (#6072/#6076) added a desc_ja line to every seed entry at the exact lines where this PR inserts its new dsh.autoReviewBlock / BILI_DSH_AUTOREVIEW_BLOCK entries:

  • website/config-reference/env-only.yaml — PR's new BILI_DSH_AUTOREVIEW_BLOCK entry vs master's desc_ja on BILI_DSH_CONTEXT_TAB.
  • website/config-reference/server.yaml (×2) — the dsh section's live-key list (PR added dsh.autoReviewBlock) vs master's desc_ja; and the PR's new dsh.autoReviewBlock entry vs master's desc_ja on dsh.contextTabLabel.

All resolved by union — keep master's desc_ja lines and the PR's new entries. Two mechanical completions the merge forced: the generator hard-requires desc_ja on every entry (tools/gen-config-docs.mjs:114), so I added a desc_ja to the two new entries, and updated the dsh-section desc_ja to list dsh.autoReviewBlock (its desc_en/desc_zh already did). Then regenerated docs/configuration.ja.md from the seeds (en/zh blocks unchanged — the auto-merged en/zh already matched the generator output).

Verification (this run):

CI status (honest): the mirror cache is stale — it still shows the pre-merge head (e36f31f0d4, fetched 2026-11-12) and has not re-polled 521a3c8875 yet. I cannot verify the new head's CI live in this run; it is pending. The stale mergeable_state: blocked in that same cache should clear once GitHub re-evaluates after this push.


结构化八问

  1. 是什么问题:PR Massive token cache misses on model switch | 切模型大量token未命中 #4634(默认拦截 dsh 自动审查流量)与其 base 分支冲突,merge 状态 dirty,无法合并。
  2. 什么原因导致的:PR 分叉后 master 继续前进(现到 243709bef2),其中 master 的日文文档工作(All repository documentation is available in Japanese. | 仓库所有文档都提供日文版本 #6072/[PR] docs: add Japanese versions of repository documentation (#6072) #6076)给每个配置种子条目都加了 desc_ja 行,而这些行恰好落在此 PR 插入新条目 dsh.autoReviewBlock / BILI_DSH_AUTOREVIEW_BLOCK 的同一批行上 → env-only.yaml + server.yaml 两处文本冲突。
  3. 影响范围与严重程度:仅影响本 PR 的可合并性(冲突 → dirty/blocked);无用户侧影响——特性代码本身未变,只动了合并解决。严重度:PR 被卡在无法合并。
  4. 怎么修复的:把 origin/master merge 进 PR 分支(选 merge 而非 rebase:非破坏、只需普通 push、保留已批准历史、契合作者既有的 merge-master 习惯)。两处冲突全部按「并集」解决——保留 master 的 desc_ja 行 + PR 的新条目;给两个新条目补 desc_ja(生成器强制每条必须有 desc_ja),并把 dsh 段的 desc_ja 更新为列出 dsh.autoReviewBlock;用合并后的种子重新生成 docs/configuration.ja.md(en/zh 区块不变)。对 master 的有效 diff = 恰好 17 个特性文件,无 kernel/version。
  5. 是否有回归问题:无。typecheck 干净;3 个特性测试文件 32 过 / 0 挂;3 个静态门禁(config-coverage / config-surface / lifecycle-ledger)全绿;生成器幂等(重跑零漂移)。handle.ts 自动合并已核对正确(PR 的 Massive token cache misses on model switch | 切模型大量token未命中 #4634 本地拦截早退保持在最前、master 的 dshSingleShotSidecar 加在其后,两者都接进 sideIntent/sideLabel)。
  6. 是否破坏缓存:不涉及。未触碰任何缓存/重试/增量游标/去重键逻辑;合并只解决 2 个 YAML 种子的文本冲突 + 重新生成日文配置文档,特性行为(dsh 自动审查拦截)不变。
  7. 是否改了设计方向:不涉及。无架构/边界/数据流转向,只是把 master 的并发工作(日文文档)与 PR 特性整合到一起。
  8. 是否引入了新的配置:合并本身未引入任何新配置。dsh.autoReviewBlock(文件键)+ BILI_DSH_AUTOREVIEW_BLOCK(env)是 PR 自身特性(已批准)带来的,非本次合并新增;本次仅为这两个条目补了 desc_ja 日文行(生成器 i18n 完整性强制)+ dsh 段 desc_ja 列出 autoReviewBlock。

判定:冲突已解决并推送,新 head 521a3c8875;新 head 的 CI 在本轮无法实时验证(镜像缓存仍停在合并前的旧 head e36f31f0d4),待其跑完确认。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

复审 head 521a3c88(本轮增量 = 作者又一次把 master 合进分支,非功能改动):结论不变,APPROVE(可合)。

本轮增量核验

CI(镜像缓存,sha=521a3c88 与当前 head 精确一致)

  • 全部 test 分片 success(含上一轮 flaky 的 node-22 #2129/#5155 两个分片,本轮已绿);static-gates(ubuntu-24 / windows-22)success;mysql-contract success;e2e 车道 gated/skipped。
  • mergeable_state: blocked = 等待人工 approve,非 CI 失败。

八问(相对已批准版本,无功能变更)

  1. 是什么问题:dsh auto-review 每次工具调用把主会话自包含快照整段重发计费(稳态持续消耗 + 切模型一次性重付),默认改为本地以最小低风险裁决应答(零 usage)。
  2. 什么原因导致的:该车道每次重发全量快照,O(history) 稳态 miss,切模型时一次性重付整段累积量(issue Massive token cache misses on model switch | 切模型大量token未命中 #4634「七八十w」)。
  3. 影响范围与严重程度:仅 dsh auto-review 车道(requestAgent!=='main' 且 isDshAutoReviewRequest 且 dsh 证据门);默认拦截、可 dsh.autoReviewBlock=false / BILI_DSH_AUTOREVIEW_BLOCK=0 关闭;属成本优化,非可用性缺陷。
  4. 怎么修复的:命中证据门时本地构造各 wire 形态的最小合法空响应(openai/anthropic/responses;google→null→回退转发,永不畸形),finish=stop 零 usage,早于任何 pipeline 阶段 return。
  5. 是否有回归问题:自批准版本逐字节一致,无回归;上一轮 flaky 的两个 node-22 分片本轮已绿。
  6. 是否破坏缓存:不涉及(本地应答不进上游、不动缓存/retry/增量游标/去重键)。
  7. 是否改了设计方向:不涉及(沿用 [Bug][dsh] 0.1.204: auto-review side request collides with the main session → false native-compaction rebase → aux usage skips #453 clamp → permanent upstream 400 #4438 车道证据门,新增一个默认开关)。
  8. 是否引入了新的配置:dsh.autoReviewBlock(默认 true)+ env BILI_DSH_AUTOREVIEW_BLOCK(env 优先,默认开);PR 正文已带 config-surface 段落并披露行为 旧值→新值(转发计费 → 本地零 usage 应答)。

判定:APPROVE(可合),待 owner 人工 approve 解除 blocked。正式 approve 事件仍因「作者不能批准自己账号的 PR」(GitHub 422) 机械不可用,以本评论为评审记录。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Merge conflict resolved and pushed. The PR branch is now fully up to date with master — no remaining conflict.

What happened this run:

One push hiccup (self-corrected): my first git push origin HEAD landed on a brand-new pr-4639 branch instead of the PR's 2026-10-25_dsh-autoreview-block (the local branch name differs from the upstream ref). I re-pushed with an explicit refspec to the correct branch and deleted the stray pr-4639 remote branch. Net effect: only the intended PR branch moved.

Live status (mirror cache, this run): head 979969d7ef, mergeable_state: blocked — i.e. not dirty (the conflict is gone); blocked reflects the required CI checks still queued/running on the new head plus pending review, not a merge conflict. I did not assert green/red — CI is mid-run.


八问(中文,供人工评审)

  1. 是什么问题:PR 分支与 master 冲突(merge state dirty),无法合并。master 持续前进,多次落在 PR 插入新配置项的同一批热文件(config-reference 种子、knobs、handle.ts)上。
  2. 什么原因导致的:master 的日文文档工作(All repository documentation is available in Japanese. | 仓库所有文档都提供日文版本 #6072/[PR] docs: add Japanese versions of repository documentation (#6072) #6076)给每个配置种子条目补了 desc_ja,恰好压在 PR 插入新条目(dsh.autoReviewBlock / BILI_DSH_AUTOREVIEW_BLOCK)的行上;其后 master 又叠加 BILI_PLUGIN_BYPASS(x-bili-plugin-bypass: 1 Allow forced specification | x-bili-plugin-bypass: 1 允许强制指定 #6220)、纯 SQLite 默认([PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480)、公告策略([notice] The dsh-live-compact plugin is not installed, yet a "dsh-live-compact conflicts with bili compression" notice s | [notice] 没装 dsh-live-compact 插件,却出现「dsh-live-compact 与 bili 压缩冲突」公告 #6508)等,持续在同一批热文件上产生冲突。
  3. 影响范围与严重程度:仅 PR 合并受阻(无法 merge),不影响任何已发布行为;PR 功能本身无回归。
  4. 怎么修复的:把最新 master(e1f31ad9d5)merge 进 PR 分支;唯一冲突(src/server/handle.ts 的 knobs.js import 行)按并集解决(保留 PR 的 dshAutoReviewBlockEnabled + master 的 pluginBypassOverride),其余文件自动合并;配置文档重新生成。
  5. 是否有回归问题:本地 typecheck 干净、105 个定向测试全过(PR 功能 + master 新功能)、生成器幂等;有效 diff 仍是 PR 的 17 个功能文件,无 kernel/、无 version。高危模式(语义漂移/阈值/时序/输出格式)逐项过:无。
  6. 是否破坏缓存:不涉及(纯合并,无缓存/重试/增量游标/去重键逻辑改动)。
  7. 是否改了设计方向:不涉及(PR 功能方向不变;master 侧的纯 SQLite 默认、公告策略等是 master 自己的决策,非本 PR 引入)。
  8. 是否引入了新的配置:本 PR 引入 dsh.autoReviewBlock(默认 true)+ env BILI_DSH_AUTOREVIEW_BLOCK(env>file>default,按请求热读);master 侧新增的 BILI_PLUGIN_BYPASS、requiresScan 等属 master 自身变更。

判定:冲突已解决、分支已与 master 对齐、可合并态(待 CI 与评审通过)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Confirmation — task complete. (Full 八问 detail posted in my previous comment.)

  • Done: merged latest master e1f31ad9d5 into the PR branch; the single conflict (src/server/handle.ts knobs.js import line) resolved by union of dshAutoReviewBlockEnabled + pluginBypassOverride; all other files auto-merged.
  • Verified: typecheck clean; 105 targeted tests pass (PR Massive token cache misses on model switch | 切模型大量token未命中 #4634 feature + master's plugin-bypass / sqlite-default / notices / persist / storage); config-docs generator idempotent (342 entries); effective diff = exactly the PR's 17 feature files (no kernel/, no version).
  • Pushed: fast-forward 521a3c8875..979969d7ef to 2026-10-25_dsh-autoreview-block (re-fetched before push, no force). Self-corrected an initial mis-push to a stray pr-4639 branch and deleted it.
  • Live status: branch fully up to date with master — no merge conflict; mirror cache mergeable_state: blocked (not dirty), CI checks queued/running on the new head, review pending.
  • No design decision needed (all mechanical) — no 🔶 需要决策 escalation.

Nothing further to do this run.

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