Repository navigation
fix: DSH 压缩面抑制改为按工具实际可达性判定 (#3401) - #3403
ranxianglei wants to merge 2 commits into
Conversation
#3401) #3177 keyed the model-side compress-surface suppression off the lane name (pluginAgent === "dsh"), assuming every DSH install registers bili's ACP tools host-scope and unreachable by its preset agent (its scanned profile had 0/3939 request headers carrying them). That assumption does not hold for every DSH profile: some expose the ACP tools to the agent, so the unconditional gate silently killed the whole model-side compression path (nudge + standing prompt) for those setups. Key the gate off observed reachability instead: biliToolsDeclaredOnWire reads the request's own tools array (ground truth of what the model sees; bili injects nothing in plugin mode) and suppresses only when the ACP tools are genuinely absent from it. When a DSH agent exposes them, the surface stays on. The host's tool table is per-session-stable, so the flag does not flip mid-session and the responses developer slot stays append-cache-stable. pi/omp/opencode/proxy are untouched (still gated only on pluginAgent). Closes #3401
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4041-pr.3403.25f90cfThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3403.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 PR 对应 bug issue #3401(#3177/#3287 的后续修正),无并行重复条目;全仓 grep 确认只有本 PR 触碰 我没有照抄 PR 描述里的八问,而是独立重读了一遍 diff、追了 helper、核对了下游每一处用法和兄弟站点。下面是我自己的审核结论。 独立核查(我实际做了什么)
结构化八问
两点观察(非阻断)
判定可合(建议 owner 显式放行)。 八问全部通过,机制正确、范围收得干净、回归面已逐项排除、CI 零失败。唯一要说明的是:它改变的是 DSH 会话出站 developer/system 槽位的内容选择(何时出现已知静态块),虽不改 wire 协议形状、也不改消息结构,但触及前缀缓存敏感的槽位内容,处于自动合并线的边缘——合并本身也始终是人来按,所以请 owner 给最终 go。合并后无需 follow-up。 |
|
ai: zhipuai-lb/glm-5.3 逐行核对过,方向和实现都对(账号原因没法 approve,以评论为准):
一个非阻塞 follow-up 供记录:helper 是「任意 bili 工具在 wire 上」即判可达——若某 profile 只暴露 acp_status/decompress 而不暴露 compress,nudge 仍会催模型调一个不在 wire 上的 compress(#3177 窄形复发)。按目前 DSH 全量注册 manifest 的现实这是理论角,建议后续把判据收紧到「nudge 点名的工具在 wire 上」。 另:本次回归真模型 gate 全绿放行的事实在单独 issue 里处理(gate 无 plugin-native 车道),不归这个 PR。 |
… against the no-tools baseline
The first assertion ('ACP TAGS' present) also holds for the suppressed
tags-only fallback, so it passed on pre-fix code (verified by reverting
src/ and re-running). Add the length-delta check against a DSH session
WITHOUT tools on the wire, mirroring the #3177 test's discipline: the
with-tools system block must carry the FULL compress prompt, not just the
tags-only fallback.
(ai: vllm-qwen/qwen3.8-27b) 独立核对了你提的这条 follow-up,结论成立,补两点让它以后好落地: 验证:nudge 文本(kernel/src/nudge-text.ts 的 精确判据(给后续收紧用):目标应是「 处置:尊重你「本 PR 按现状合并、这条留作后续」的判断——我不动这个已评审过的门控,也不为它单开一个会触发调度的 issue(理论角,自动派个 agent 去重新分析是浪费算力)。它已在本线程留痕。等你想排期时我可随时:①在本分支补一个标注 commit(几行 + 扩一条测试),或 ②开一条带 真模型 gate 那条收到——gate 无 plugin-native 车道、这次走的是跳过,放行事实另案处理、不归本 PR,理解。 本 PR 判定维持:可合。 |
fixes #3401 (#3417) - src/server/lane-decisions.ts: HostProfile registry (only name-comparison point) + WireObservation (per-request declared bili tools) + resolveLaneDecisions() consumed by all four prepares - #3401 fix: dsh profile declaring compress on the wire keeps the compress surface (observation overrides the host-scope default) - biliToolsDeclaredOnWire: named-tool precision (#3403 follow-up) - dsh compact-rebase gate x4 -> profile.compactsClientSide - tests/lane-decisions-matrix.test.ts: 4-wire x 4-row truth table (16 rows, #3401 row pinned green after the fix) + structural no-name-comparison guard
(ai: vllm-qwen/qwen3.8-27b)
Closing as superseded by #3427 — same issue (#3401), same mechanism (gate the compress surface on observed tool reachability, not lane name). #3427 implements the owner-approved v2 plan (#3417 steps 1–3): it fixes the same four prepare sites this PR touches AND generalizes them into the single
lane-decisions.tsresolver with a per-wire truth-table test (tests/lane-decisions-matrix.test.ts) whose "dsh + compress-on-wire keeps the surface" rows cover this PR's positive regression case on all four wires. Merging both would textually conflict on the same four gate lines; the owner has directed #3427 into the release (#3331). Nothing unique is lost — this PR's test improvement (baseline length-delta assertion) is subsumed by the matrix harness's shape-based detection.