Repository navigation
[PR] fix: plugin manifest serves top-level promptPack tool descriptions (#3243) - #3247
ranxianglei wants to merge 3 commits into
Conversation
…3243) handlePluginManifest now takes an optional ToolPrompts surface and applies it to the ACP core tool arrays exactly like the wire injector; the admin manifest endpoint resolves it from the global compress settings via resolveCompressSurfaceDetailed. Registered plugin tools previously always carried kernel-default descriptions regardless of compress.promptPack — now they follow the top-level pack. Provider/model-level promptPack still shapes per-request system prompts only (the manifest has no route/model context, #1192 conservative boundary). Regression tests pin lean-pack descriptions on all three wires, unchanged defaults without a pack, and the route-level-only boundary.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3742-pr.3247.e5caba4This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3247.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 open PR 里碰 promptPack 的只有 #1433(lean canary 提案)与 #2537(pi project trust 门控),都不涉及 manifest 工具描述面;已关闭的 #2335/#2337 是反向案例(代理侧 pack 只到工具描述、系统提示词没换),机制与本单相反。本 PR 目标(插件 manifest 从不应用任何层级 promptPack 的 toolPrompts)无并行修复。 审核开始。PR #3247(head |
… timing Observed flake while reviewing #3247: CI run 38683949356, shard 'test (windows-latest, 22, 2)' failed this test with 'first chunk should have flowed through' — the fixed 2s wall-clock sleep expired before the first byte arrived on the loaded runner; rerun of the same job on the same head passed. Replace the fixed sleep with a bounded poll (first byte or 15s deadline); all three assertions keep their teeth (a real non-streaming bug still fails at the deadline).
(ai: vllm-qwen/qwen3.8-27b) Review 结论(独立审核,八问)1. 是什么问题:plugin 模式(pi/omp/dsh/opencode/MCP)下,宿主从 2. 什么原因导致的: 3. 影响范围与严重程度:仅影响配置了顶层 4. 怎么修复的:admin 端点用 5. 是否有回归问题:逐项清点过——① 无 pack 时 manifest 输出逐字节相同(undefined overrides → 6. 是否破坏缓存:不涉及(无缓存/重试/游标/去重键路径)。 7. 是否改了设计方向:没有。只是把 plugin 面缺失的 surface 补齐到与既有 wire 面一致;"manifest 静态、只取顶层"的保守边界保持并文档化。 8. 是否引入了新的配置:没有(无新 env/config 字段)。 验证证据(全部独立重做,未照抄 PR 描述)
行为变更披露(old → new)
判定代码审查通过,diff 干净(现 6 文件,新增行全部与本 PR 目的相关)、测试有牙且覆盖三个关键面(接线 pin / 默认回归 pin / #1192 边界 pin)。本 PR 属默认值/行为变更,按 §7.4 走人工合并层。待新 head |
(ai: vllm-qwen/qwen3.8-27b)
Closes #3243
What
The plugin manifest (
GET /__bili/plugin/manifest, which all native lanes — pi/omp/dsh/opencode/MCP — register their tools from verbatim) served kernel-default tool descriptions regardless ofcompress.promptPack, while each request's system prompt already honored the full global → provider → model pack cascade. Any pack (even top-level) therefore left registered tool descriptions on the default surface while the system prompt switched to the pack's rules — the exact mismatch reported in billion-context-pi#650 (migrated here as #3243).handlePluginManifestnow takes an optionalToolPromptssurface and applies it to the ACP core tool arrays exactly like the wire injector (applyAcpToolOverrides, before the extras merge); the admin endpoint resolves it viaresolveCompressSurfaceDetailed(opts.compress ?? {}).Behavior change (old → new)
promptPacklevel → new = follow the top-levelcompress.promptPack(the pack'stoolPromptsapply to the four ACP core tools on the anthropic/openai/responses wires; absorb/rule/retrieve extras stay untouched, same as the wire injector).promptPack: still shapes per-request system prompts only in plugin mode. The manifest is static and session-independent (hosts fetch it before any request arrives — there is no route/model context at that point), so this stays by design; it is now documented undercompress.promptPackin CONFIGURATION.md + CONFIGURATION.zh-CN.md ("Mode behavior ([Bug][pi] Model-level promptPack config not propagated to compress tool description (only top-level compress.promptPack is honored) | [Bug][pi] model-level promptPack 配置不达 compress 工具描述面(只认顶层 compress.promptPack) #3243)").No new config fields or env vars; no wire/message-shape change (only description text inside existing tool schemas); no persistence change; no
kernel/change.Tests
New
tests/issue3243-manifest-prompt-pack.test.ts(server-level, real manifest endpoint):promptPack: "lean"→ lean descriptions + paramDescriptions served on all three wires (wiring-pin againstresolveCompressSurface({promptPack:"lean"}), not a wording pin); with the fix stashed, test 1 fails (teeth verified via stash A/B).Local targeted runs green: new suite 3/3, adjacent suites (prompt-pack-tool-prompts, compress-prompt-pack, ccr-plugin, wire-contract incl. manifest goldens) 47/47, typecheck clean. Full-suite verdict: remote CI on this head.