Repository navigation
[PR] feat: plugin lanes accept host declaration of exposed bili tools (#3906) - #3907
ranxianglei wants to merge 4 commits into
Conversation
3adb986 to
1c66d99
Compare
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g [email protected]This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3907.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…le (#3884) #3603's single-literal gate (RUN_CODE_TOOL_NAME = "run_code") went stale when DSH 0.2.x moved Code Mode into the dsh-codemode plugin, whose transport is named `code_run` (the reserved name `run_code` belongs to dsh-tools, so the plugin registers its own). On every DSH 0.2.x code-mode session the reachability conjunct failed and the compress surface stayed off forever: nudge ARMED-SUPPRESSED at 42% usage with pendingT1 10x over threshold, zero INJECT, fully silent (#3884). - collect the known omnibus shapes in CODE_MODE_OMNIBUS_TOOL_NAMES (run_code / code_run), provenance-commented per shape; both detection sites match the set - lane-decisions reachability (the reported miss) and ptcNoteMode (proxy-lane exempt note, same-mechanism second site) - matrix: dsh code_run row -> surface on + EMERGENCY twin; existing precision rows (get_weather / acp_status) stay the negative direction - ptc-runcode-tools: code_run -> exempt note on all four wires; bash-only rows pin the negative direction (#3617 bidirectional discipline) Targeted green: typecheck clean; lane-decisions-matrix 66/66; ptc-runcode-tools 16/16; e2e-ptc-runcode-shape 8/8. Full suite = CI.
…ss surface off (#3884) Observability hardening for the allowlist fragility class: when an armed nudge stays ARMED-SUPPRESSED because the lane surface is off for reachability (not user config), the diag line now carries surface=off(no-tools) or surface=off(top-level=[names]) — the next host omnibus rename shows up in bili.log next to the suppression label instead of requiring user archaeology (#3600 and #3884 were both diagnosed from user-reported dumps). No behavior change beyond log text.
1c66d99 to
ffc415f
Compare
(ai: vllm-qwen/qwen3.8-27b) 结论先行:合并冲突已解除(GitHub 实时 八问:
为什么我没有再 push(关键):我本地开始 rebase 时,远端头还是旧的 一个观察(仅记录,未处置):采样到的最近一次 CI 里 判定:冲突已解除,无需我再操作;等 CI 全绿后由人合并即可。 |
The #3884 refactor moved ptcNoteMode off the direct constant onto CODE_MODE_OMNIBUS_TOOL_NAMES, leaving RUN_CODE_TOOL_NAME referenced only inside compress-tool.ts (building that set). The unused-exports gate (#1440 P6) flags it as INTERNAL_ONLY; remove the leading export. No behavior change - nothing outside the module imported it.
(ai: vllm-qwen/qwen3.8-27b) CI auto-fix — resolved the failing 是什么问题 什么原因导致的 影响范围与严重程度 怎么修复的 是否有回归问题 是否破坏缓存 是否改了设计方向 是否引入了新的配置 已在 PR 分支推送修复( |
Closes #3906
Step 1 of the #3884 Step3+ structural direction — owner-approved in the #3884 thread (2026-10-20). Branch is stacked on top of #3885 (the code_run fix it refactors); merging this PR pulls in #3885's two commits as ancestors — either merge order works, but #3885-first is the natural sequence.
What
Plugin lanes accept an optional inbound header
x-bili-plugin-exposed-tools— the host's per-request declaration of which bili tools it actually exposed for this request/preset (comma-separated names; present-but-empty = "exposes none"). When present it is ground truth for the reachability decision: it outranks wire-shape inference entirely, profile default included. When absent, the legacy inference (top-levelcompress/CODE_MODE_OMNIBUS_TOOL_NAMES/ profile default) applies bit-for-bit — owner constraint: a request without the header must not change behavior.Behavior changes (disclosed)
compress(or top-levelcompress) → surface on; else off — even against a recognized omnibus nameWhy
#3600 and #3884 were the same judgment chain failing twice because the host renamed its code-mode omnibus tool (
run_code→code_run). Name-matching can never be complete — every rename is a silent incident until someone reports it. Letting the host declare what it registered makes future renames a non-event. This is the first concrete step of the #3417/#3482 Step3+ ground-truth direction ("reachability truth = host manifest registration state"); host-side adoption (e.g. dsh code-mode presets stamping the header) follows separately and is not blocked by this PR.Tests
Config surface
None — new optional INBOUND header, not a config knob. No new env vars.