Repository navigation
fix: plugin-lane absorb tool follows base config so manifest and gate agree (#1359) - #1369
Conversation
… agree (#1359) The plugin manifest advertised absorb under its static constants while per-session adjudication resolved the merged route/model name, so a renamed absorb.toolName made the advertised tool 400 (same silent-loss class as #1345, wider trigger surface: one base-level rename suffices). - resolveAbsorbSettings(): single source of truth for raw->resolved absorb, shared by applyCompressSettings and the plugin-lane base stamp. - server.ts: in plugin mode the whole absorb block follows the BASE config (advertise + adjudicate the same name); provider/model absorb.* overrides stay proxy-lane-only. Proxy mode unchanged (still honors the merged name). - plugin.ts: manifest advertises the resolved name via absorbToolsFor(), which builds byte-identical wire shapes at the default name. - config.ts: load-time per-field divergence warning (findAbsorbPluginDivergences), mirroring the #1360 ccr diagnostic. - docs (en+zh): document lane governance for absorb.toolName. - tests/absorb-plugin.test.ts: regression coverage (plugin manifest follows the resolved name and the gate agrees; proxy still honors the merged override; default shapes byte-identical; divergence diagnostic fires/stays silent). Fixes #1359
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1369Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1369.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 PR #1369 审查结论(fix: plugin-lane absorb tool follows base config,修 #1359) ① 方向关 ✅ — #1359 根因:manifest 用静态常量 advertise,而 per-session gate( ② 回归审查(逐项既有行为):
③ 代码审查:
④ 测试有效性: ⑤ diff 整洁度:8 文件全为 src/docs/test,无 lockfile/dist/生成物, 本地 + CI 验证(我实跑):
结论:可以合并。 根因修得干净、不变量结构保证、测试有牙、CI 含真实 codex e2e 全绿。唯一建议(非阻塞):把「proxy lane 注入工具名 静态默认→合并名(属修复)」这一行补进行为变更披露表,避免 “Proxy mode unchanged” 被误读为字节级不变。 一句话中文摘要:修复了 absorb 工具在 plugin lane「manifest advertise 静态名 vs gate 按合并名裁决」导致改名后 400 的分叉(顺带把 proxy lane 注入 schema 也对齐到合并名),通过让两 lane 各自的 advertise/gate/inject 同源解析实现,测试有牙且 CI 含真实 codex e2e 全绿,可以合并。 |
|
深审通过(独立验证,零改动): 设计核验(#1359 是 #1345 的同类病,修法对齐):
实测:absorb-plugin 10/10(250 行新测试,含改名端到端+分歧警告断言)。 合并无阻塞。 |
[bot] 🏷 收到,感谢独立深审确认——与我的结论一致(根因同源解析、默认名字节级不变、测试有牙、CI 含真实 codex e2e 全绿)。 我此前提的两条均为非阻塞观察:
按系统规则合并是人工操作,我不代合;方便时你直接 merge #1369 即可(fix PR,合入即落 master,不涉及发布流程)。审查侧我这边无遗留项。 |
What
The plugin manifest advertised the
absorbtool under its static constants (acp_absorb/absorb/gemini_absorb/absorb_responses) while per-session adjudication (src/absorb.ts:52) resolves the merged route/model name viaeffectiveAbsorbConfig. Wheneverabsorb.toolNamewas renamed at any level, the host registered the static name from the manifest but the/__bili/plugin/toolgate expected the renamed name → the advertised tool 400s and the absorb surface is unusable on the plugin lane. Same silent-loss class as #1345 (CCR); wider trigger surface — one top-level config line reproduces it, no provider/model override needed.Fix
In plugin mode the whole
absorbblock follows the base config — advertise the base name, adjudicate the base name, so the two can never diverge. Provider/modelabsorb.*overrides stay proxy-lane-only (proxy mode still injects and adjudicates the merged name exactly as before). This mirrors the lane-governance decision landed for CCR in #1360.src/compress-settings.ts— newresolveAbsorbSettings(): single source of truth for raw→resolved absorb, shared byapplyCompressSettingsand the plugin-lane base stamp so both resolve identically.src/server.ts— at each prepare site + the forward path, plugin mode now stampsloopConfig.absorbfrom the base config; the injected tool array and the system-prompt section follow the resolved name. Proxy mode unchanged.src/plugin.ts— manifest advertises the resolved name via newabsorbToolsFor(name)(byte-identical wire shapes at the default name).src/config.ts— load-time per-field divergence warning (findAbsorbPluginDivergences), mirroring the fix(ccr): plugin-mode sessions execute the base ccr block exclusively #1360 CCR diagnostic.CONFIGURATION.md/CONFIGURATION.zh-CN.md— document the lane governance.tests/absorb-plugin.test.ts— regression coverage.Behavior change (old → new)
absorb.*overridesWhy: the plugin manifest is built from base config at registration time and cannot see per-session route/model merges. Making both advertisement and execution follow the base guarantees they agree. Consequence: a user who renames
absorb.toolNameat provider/model level expecting plugin-mode agents to pick it up will now get the base name on the plugin lane (the rename still applies to plain-proxy clients) — identical semantics to CCR after #1360.Related, out of scope here
The V2 native opencode plugin (
src/agent/opencode-v2.ts:116) registersABSORB_TOOL_OPENAIstatically — the same divergence class on a separate registration path. Not touched by this manifest fix (consistent with #1360, which also left it). Flagged for the owner to decide whether to track separately.Pre-flight
npm run typecheck— cleannpm test— 2656 tests, 2645 pass, 0 fail, 11 skipped (gated e2e/registry suites)npm run build— successtests/absorb-plugin.test.ts: 10/10 pass (plugin manifest follows the resolved name and the gate agrees; proxy still honors the merged override; default shapes byte-identical; divergence diagnostic fires/stays silent)Fixes #1359