Skip to content

[PR] Stop advertising compress tools on plugin rounds that don't declare them (pi round-1 fix) - #5009

Open
ranxianglei wants to merge 16 commits into
masterfrom
2026-10-28_pi-first-round-surface
Open

ranxianglei wants to merge 16 commits into
masterfrom
2026-10-28_pi-first-round-surface

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #4998

What & why

Round 1 of a pi native session advertises NO bili ACP tools while already carrying the full x-bili-plugin* ownership header set: the pi extension registers compress/decompress/search_context/acp_status host-side in an async before_provider_headers handshake (src/agent/pi.ts registerTools → fetchManifest), which lands AFTER pi has already built that round's payload. Round 2+ carries the tools.

Verified with a local repro of the reporter's method (fake OpenAI-compatible upstream, real pi CLI through this repo's build): request 1's tools array has zero ACP entries, request 2 has all four, headers identical on both requests.

In plugin mode the proxy never injects tools (the host owns the tool table, KDD #7/#162), so a round-1 payload without the tools is legitimate host behavior — but resolveLaneDecisions still turned the model-side compress surface ON unconditionally for pi/omp/opencode via the profile default toolsHostScopedByDefault=false. Reproduced byte-for-byte: round 1 sent the FULL standing compress prompt telling the model to call compress, while its own request had no such tool — the same "advertise what you can't call" defect class that #3177/#3401 fixed for dsh and #4344 for zcode.

Fix

Reachability is now purely OBSERVED per request: compressReachable in src/server/lane-decisions.ts drops the profile-default escape hatch and keeps only the observational terms (declared compress, MCP-dialect mcp__bili__compress, code-mode omnibus tools) plus the headerless zombie clause (#2155/#4372 self-heal probes stay armed). The now-dead toolsHostScopedByDefault field is removed from src/host-profiles.ts (interface + all profiles + ANONYMOUS).

Behavior change (old → new)

  • Plugin rounds whose body declares no bili tools (pi/omp/opencode cold-start round 1; any degraded round where the host stripped the tools): old = full standing compress prompt + nudge eligibility; new = tags-only prompt, no nudge. This is the intended fix: never advertise a tool the model cannot call in THIS request.
  • Healthy steady-state sessions declare their tools every round (opencode always declares its DCP set; pi declares from round 2 on; dsh/zcode were already observational): wire bytes are identical.
  • Cache impact: none beyond what already happens — the round-2 prefix already breaks when the tools array gains the four ACP entries; the prompt delta lands on round 1, which is cache-cold anyway.

Tests (regression pins)

Local verification: typecheck clean, build green, targeted suites green (lane-decisions-matrix + issue4344-mcp-dialect + plugin-nudge-injection + issue1206-thirdparty-scan = 158/158 pass). Full suite via CI.

查重: 无 — 与已关闭的 #1243 / #2708 同家族但机制不同(#1243 = origin 发现竞态、请求头根本未打上;#2708 = 工具注册后被注册表重建丢弃;本条 = 冷启动第一轮"头已打上、工具尚未注册"),详见 issue 首评。
Companion facet: PR #5465 (#5459) moves pi/omp tool registration ahead of round 1 client-side; this PR keeps the server-side invariant — never advertise a compress surface a given request cannot call — independent of client registration timing. No file overlap; merge order independent.

…4998)

Round 1 of a pi native session ships without bili's ACP tools: the pi
extension registers them host-side in an async before_provider_headers
handshake that lands after pi has already built that round's payload,
while the ownership headers are stamped. In plugin mode the proxy never
injects tools (the host owns the tool table), so a cold-start round-1
payload can legitimately lack compress & co.

The lane decision still advertised the full standing compress prompt for
pi/omp/opencode via the profile default toolsHostScopedByDefault=false,
telling the model to call a tool that is not in its own request. Make
reachability purely observational per request (declaredTools contains
compress / mcp__bili__compress / a code-mode omnibus tool), drop the dead
profile field, and keep the headerless zombie clause so #2155 self-heal
probes stay armed.

Behavior change: plugin rounds whose body declares no bili tools now get
the tags-only prompt instead of the standing compress prompt (and lose
nudge eligibility). Healthy steady-state sessions declare their tools
every round and are byte-identical.

Tests: lane-decisions-matrix rows flipped to observation semantics with
positive+negative pairs (#3617); new pi headerless-zombie row; EMERGENCY
row and positive fixtures now co-declare a host tool — a bili-only table
is a side request that #1897 demotes before lane judgment; issue4344
unit/chain updated; plugin-nudge-injection healthy-lane fixtures now
declare tools.
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-28_pi-first-round-surface (2fb120f)

Latest build — install this exact version

npm install -g billion-context@0.0.9226-pr.5009.6c9e74c

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
2fb120f billion-context@0.0.9226-pr.5009.6c9e74c build
9bde264 billion-context@0.0.7398-pr.5009.a1f9e8d build
2371981 billion-context@0.0.7217-pr.5009.3450d0e build
284dec1 billion-context@0.0.7127-pr.5009.7467989 build
ecd067d billion-context@0.0.7037-pr.5009.5061e7c build
d2c3167 billion-context@0.0.6885-pr.5009.919bb4a build
2ec6624 billion-context@0.0.6605-pr.5009.aed6228 build
c840e43 billion-context@0.0.6598-pr.5009.4a2483d build
e33d9cf billion-context@0.0.6584-pr.5009.d264f54 build
d0a37d4 billion-context@0.0.6577-pr.5009.a3b2a38 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5009.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title Stop advertising compress tools on plugin rounds that don't declare them (pi round-1 fix) [PR] Stop advertising compress tools on plugin rounds that don't declare them (pi round-1 fix) Oct 27, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。与已关闭的 #1243 / #2708 同属「插件回合缺 ACP 工具」家族但机制不同——#1243 = origin 发现竞态导致请求头根本没打上;#2708 = 工具注册后被注册表重建丢弃;本条(#4998)= 冷启动第一轮「头已打上、工具异步注册尚未落库」,是第三种独立成因。修复方向与前两条一致(可达性按请求观测、不按 profile 名假设),收敛到同一纪律,不冲突。

标签:底层 bug issue #4998 已带 bug / p2 / pi / scope/wiring,判定合理(仅影响冷启动第一轮、非阻断、后续轮恢复正常压缩),PR 镜像沿用,不重复打。

以下为独立审过 diff 后的结构化结论(未照抄 issue 措辞)。

① 方向关(原 issue 审)

② 回归关(既有行为清点 —— 语义级改动,逐项过)

diff 只动 resolveLaneDecisions 的 compressReachable(删 || !profile.toolsHostScopedByDefault 一项)+ 删 HostProfile.toolsHostScopedByDefault 字段。触碰路径承担的既有行为:

  • dsh / zcode:原本就纯观测(默认 true → 该项恒 false 不贡献),逐字节不变。✅
  • proxy 模式:!input.pluginMode 首项短路,结构性常开,不变。✅
  • headerless 僵尸回合:(pluginMode && pluginHeaderPresent === false) 子句原样保留;matrix 里 pi 与 zcode 两条 twin 都钉住自愈 probe 保持 armed,不变。✅
  • 健康稳态会话(pi 第 2 轮起 / opencode / omp):只要 body 声明了 compress,面就保持开。我核对了 observeDeclaredTools 与 biliToolsDeclaredOnWire("compress")——裸名 compress 在 flat / function / functionDeclarations 三种形状(覆盖 anthropic/openai/responses/google)都被识别,所以只要宿主发出就可观测。✅
  • 唯一有意变更:pi/omp/opencode 的「无工具」回合(冷启动第 1 轮、任何被 strip/drop 的降级轮)从「全量 standing prompt + nudge 资格」→「仅 tags prompt、无 nudge」。这是 PR Behavior change 段已披露的旧值→新值+原因,非意外漂移。✅
  • 关键论证:纯观测模型下「转静默」永远不会错——宿主这一轮没声明 compress,模型这一轮就真调不到,压掉宣告恒正确。唯一会误伤的情形是「宿主经某通道能调 compress 但 proxy 观测漏了」(解析缺口),而上面已核四种 wire 形状全覆盖。高危模式(语义漂移 / fail-fast 变吞错 / 阈值时序 / 输出格式)逐项过,未见修 A 坏 B。

③ 代码关

④ 测试有效性

⑤ diff 整洁度

5 文件全与本 PR 目的相关(2 source + 3 test),无跑题文件、无 lockfile/生成物连带、无版本号变动、无批量空行重排。干净。✅

八问结论

  1. 是什么问题:pi(及 omp/opencode)冷启动第一轮带着完整 plugin 归属头却一个 ACP 工具都没声明,proxy 这时仍向模型宣告「可调 compress」——宣告了一个模型这一轮调不到的工具。
  2. 什么原因:pi 在 before_provider_headers 异步注册 ACP 工具,晚于第一轮 payload 构建,第一轮合法地没工具;而 proxy 用 profile 名默认(toolsHostScopedByDefault=false → 面恒开)判可达性,没看本请求实际声明。根因 = 「可达性由 profile 名假设而非观测」。
  3. 影响范围与严重程度:仅 pi/omp/opencode 无工具回合(典型 pi 冷启动第 1 轮,或被 strip/drop 的降级轮);稳态会话与其它车道零影响。严重度 = 体验瑕疵偏轻——prompt/nudge 提到一个不在工具表的 compress,模型通常不会真去调(它只看工具表),多为无害噪音;非阻断、非数据丢失。对应 Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 的 p2 合理。
  4. 怎么修复:插件模式可达性改纯按请求观测——compressReachable 只留观测项(声明 compress / MCP 方言 mcp__bili__compress / code-mode omnibus)+ headerless 僵尸自愈子句,删 profile 默认逃生门;顺带删掉变死的 toolsHostScopedByDefault 字段,让所有插件车道统一「观测为准」。
  5. 是否有回归:无意外回归。dsh/zcode/proxy/headerless/健康稳态逐字节不变;唯一变更是无工具回合转静默,已披露。高危模式逐项过,未见修 A 坏 B。
  6. 是否破坏缓存:无新增失效。插件模式 standing prompt 变化只落在 cache-cold 的第 1 轮;第 2 轮工具表新增 4 个 ACP 条目时前缀本就会断,叠加不产生额外断点。稳态每轮字节一致,cache hit 不受影响。
  7. 是否改设计方向:轻微正向收敛——pi/omp/opencode 从「声明默认」迁到「观测」,与 dsh/zcode 已有观测模型合一、删一整个字段,让「可达性永远按请求观测」成唯一心智模型;贴合 KDD feat: bili CLI + debug in config + README rewrite #7「宿主拥有工具表」,是简化不是转向。
  8. 是否引入新配置:无。移除一个内部接口字段,不加 env/config/CLI/默认值。

合并判定:代码审查五关(方向/回归/代码/测试有效性/diff 整洁)全过,可合。CI 现状:gate / static-gates / docs-coverage / lane-guard / mysql-contract 全绿、0 失败;ubuntu/windows × node22/24 的全量 test shard 仍在跑(pending 12)。等全量转绿我再补确认,红则定向排查。另注:此改动触及 wire 消息形态(无工具回合的 prompt/nudge 字节)与可达性默认,按 §7.4 属人工合并范畴、不适用 auto-merge——请 owner 拍板合入。

…eachability (#4998)

#4998 made plugin compress-surface reachability observational per request.
Three e2e fixtures model healthy steady-state plugin rounds but never declared
the ACP tools, so their nudge/prompt observables went silent with the surface:

- headroom-output-fallback (#971 pi-header rank scenario): the nudge is the
  test's observable for max-output precedence — the round now declares
  compress + a regular host tool like a healthy steady-state pi round.
- issue2432-dsh-local-compaction (#2432 breaker-vs-nudge): the omp control and
  armed sessions declare their tools per round.
- side-request-isolation (#1699 title-gen): the exact title-gen shape declares
  no bili tools, so its misclassified-as-main-turn control no longer carries
  the ~11KiB standing prompt — pin the new signature instead (main-turn
  rewrite via the tags-only slot, NO standing compress prompt).

A bili-only tools table is a side request #1897 demotes before lane judgment,
so every positive fixture co-declares a regular host tool (same pattern as the
plugin-nudge-injection fixtures).
@ranxianglei ranxianglei added bug Something isn't working p2 pi scope/wiring labels Oct 27, 2026
…ndows runners

PR #5009 CI (windows-latest/node22, leg 2/5) failed the proxy-openai-sse and
proxy-anthropic-sse abort tests after the 3s poll budget elapsed (closed=0),
twice (original run + rerun-failed-jobs); the two lighter siblings
(proxy-responses-sse, proxy-json) passed in the same shard, and this file is
green on both ubuntu legs at this head and locally (standalone 2/2). This PR
does not touch the teardown path (no src changes in the head's second commit;
#4998's lane-decision change is inert for plain-proxy traffic —
compressReachable short-circuits on !pluginMode), so this is async-propagation
latency on a slow Windows runner, not a regression from this PR.

Identical 4-line diff to in-flight PR #4683 (head 9dd31d2); if #4683 merges
first, drop this commit on rebase. Documented flake family: #4599 floors
350/352/358/363/365.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 自动修复完成。通知引用的是旧 head 266b7065d;当前 head 已推进到 53e92044e(两个修复 commit,见下)。

查重: 不重复 —— open+closed issue/PR 检索「wire-exit-matrix / abort teardown / closed=0」无其他条目处理本失败签名;flake 家族已在 #4599 协调总账在档(floors 350/352/358/363/365),在途修复 PR #4683,按在档口径处置、不新立项。
标签: pr + bug + pi + scope/wiring + p2(已设;理由:pi 车道协议接线层的缺陷修复 PR,p2 = 能用但有明确问题且有绕行)。

做了什么(两个独立 commit)

  1. 1c2c6bf7d — 修 7 分片红的自因:Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 把插件车道压缩面可达性改为逐请求观测后,3 个 e2e fixture 仍按旧画像默认行为建模(请求体未声明 ACP 工具),nudge/prompt 观测点随面静默而断言失败。健康稳态 fixture 补声明 compress + 宿主工具(必须共声明非 bili 工具——bili-only 工具表会被 OMP extension injects tools and compression philosophy in helper prompts #1897 在车道判定前降级为 side request);opencode v2 title-gen requests get injected with compression philosophy (misclassified by isTitleGen) #1699 control 断言改为钉新语义(toolless round 不再携带 standing compress prompt)。本地定向 51/51 绿 + typecheck/build 绿。
  2. 53e92044e — 余单红点 test (windows-latest, 22, 2) 判定为在档 flake 家族复发(wire-exit-matrix SSE-abort 时序断言 closed=0,两轮含 rerun 同签名),按在档口径把四个 abort 用例轮询预算统一 3s→6s——与在途 [PR] fix(window): size a child conversation from its parent's runtime-info #4683(9dd31d2)逐字节同 diff,[PR] fix(window): size a child conversation from its parent's runtime-info #4683 先合则 rebase 丢弃该 commit。

结构化八问

  1. 是什么问题:PR 分支 CI 两段红——①7 个 test 分片:3 个 e2e fixture 没跟上 Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 的语义变更而断言失败;②windows(22,s2):客户端中断后上游 socket 销毁的时序断言 3s 轮询预算耗尽。
  2. 什么原因导致:①fixture 按「画像默认开面」的旧语义建模,而新语义是「观测到声明才开面」——真实健康 pi/dsh/opencode 回合每轮都声明工具,只有测试裸 body 踩中;②慢 Windows runner 上 client-abort→上游 teardown 的异步传播超过 3s(测试注释自注 slow runners destroy later),同签名在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 多轮在档;与本 PR 代码零交集——第 2 个 commit 纯测试文件,Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 的 src 改动对 plain-proxy 流量在 !pluginMode 处短路(lane-decisions.ts:271),provably inert。
  3. 影响范围与严重程度:两者均只影响 CI,零生产/用户影响。①fixture 失真不会漏真回归(矩阵测试双向钉住);②偶发于慢 Windows runner,兄弟变体与 ubuntu 双腿全绿佐证。
  4. 怎么修复的:①fixture 对齐新语义(补工具声明 / control 改钉新签名);②放宽观测预算 3s→6s 给慢 runner 余量,断言仍有牙——真出现「socket 永不销毁」回归会在 ~6s 内失败而非被吞。
  5. 是否有回归问题:无。逐项过:proxy 模式(无 plugin 头)可达性恒 ON,行为零变化;插件车道健康稳态会话每轮声明工具 → 出站与旧 head 字节一致(PR 主题行为);测试预算改动不碰任何产品行为/阈值/默认值/输出格式。PR 本身的主题行为变更(pi 首轮 toolless → tags-only prompt)是作者方案且在 PR 正文已披露,非本轮引入。
  6. 是否破坏缓存:否,无缓存/游标/去重键接触。
  7. 是否改了设计方向:否,本轮纯 fixture 对齐 + CI 时序容差;Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 方向不变。
  8. 是否引入新配置:否。

收工判定:head 53e92044e 等 CI 重跑(上一轮 11/12 workflow 已绿,仅余上述 windows leg)。若绿即 ready-to-merge,合并动作留给你;若 windows leg 再以同签名红,我会在下一轮触发时深挖 teardown 传播路径而不是继续放宽预算。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) CI 终局:head 53e92044e 全套 26 success / 1 skipped / 0 fail(含此前两轮红的 test (windows-latest, 22, 2),6s 轮询预算生效)。CI 全绿,ready-to-merge —— 合并动作留给你:#5009 。注:53e92044e(wire-exit 轮询预算 3s→6s)与在途 #4683 的同改逐字节相同,#4683 先合则 rebase 时丢弃该 commit 即可。

ci-check added 4 commits October 28, 2026 09:15
…ge-guard sync)

Conflict in src/host-profiles.ts resolved by union of intent: keep this PR's removal of the dead toolsHostScopedByDefault field (#4998) and adopt master's personaOrderKeyed addition (#4352) in every profile entry + ANONYMOUS.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)
Merge-guard sync done: merged origin/master (b08fbf3, #5016 draining-twin fix) into the branch and pushed c840e43 — branch now contains all of master, local typecheck green; CI on c840e43: 0 failed / 17 lanes still queued-running / 5 success / 8 skipped (mergeable_state blocked on checks only, no longer behind).

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)
Merge-guard sync 完成:本轮「behind」为过期告警(master b08fbf3 已全量含于分支),但核验时发现新 head 11/30 test 分片红 = 继承性失败(master 自身同签名:#5016 的 spawn 套件未登记 LIVE_FILES,tripwire 跑测试前即退)。已按 CI 协调政策 merge origin/ci-fixes(哨兵修复 02ef0d1)并推送 2ec6624;本地 typecheck 绿,CI 在新 head 重跑中(协调记录见 #4599)。分支现 = master + ci-fixes + PR 内容,无额外代码改动。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

新 head 284dec142d 更新(同步车道已合入最新 master——含已合并的 #5188(fork/snapshot 409 修复)+ 最新 ci-fixes;本 PR 的 4 个 fixture 文件该区间零改动):

好消息:#5140 家族已被 #5188 修掉 —— 本轮 run 41067530040 六个 test 分片全部不再出现 plugin-fork.test.ts #5140 冷尾失败,u24-s3/u22-s3(上轮 #5140 + #4788-resident-minimal 双红)转绿。决策单 #5217 对应的家族已实质收敛。

剩余红仅 2 片、逐 job 日志取证全部是在档 Windows-only 继承红(floor 533/535,零交集本 PR diff):

八问要点(完整体例见上一条回复,此处只报增量):①问题 = 两 Windows 分片的既有继承红;②原因 = master/ci-fixes-tip 在档缺陷(#5188 修了 #5140 域,这三例不在其覆盖内);③影响 = 仅 CI 门禁面、Windows-only、运行时零影响;④处置 = PR 侧无可修项(不代修 master 级失败、不开新 issue——三家族均已在 floor 533/535 上报待 owner triage),收敛走哨兵/ci-fixes;⑤回归 = 无,本 PR 车道全绿且 #5140 修复未波及;⑥缓存不涉及;⑦设计方向不变;⑧无新配置。

收工判定:PR 代码 ready-to-merge,硬阻塞从「五家族」收窄到「三个 Windows-only 在档家族」,等其 triage/ci-fixes 收敛后自动转绿。合并留给 owner。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Merge-guard sync done (round 3): master advanced 44067a5bc → e19386182 (+121 commits, incl. #5236 message-timestamps + kernel bump 0.0.173); merged origin/master into the branch cleanly — 156 files, zero conflicts, no design decisions needed — pushed new head 9bde2643a; GitHub API confirms mergeable: true, branch now fully contains master (15 ahead / 0 behind), CI re-running on the new head (blocked = pending checks only).

…flict sync)

Resolves 2 conflicts, both in test files:
- tests/wire-exit-matrix.test.ts: take master's awaitUpstreamTeardown
  helper (from #4683, now merged) over this branch's inline 6s poll loop —
  same intent (slow-runner teardown budget), helper is the converged shape.
- tests/lane-decisions-matrix.test.ts: union — master's extended ROWS type
  (location/onlyWires from #5527) + this PR's omp row pinning observed
  reachability (toolless omp round goes silent, #4998).

Typecheck clean; targeted suites green (lane-decisions-matrix,
wire-exit-matrix, plugin-nudge-injection, issue4344-mcp-dialect: 129/129).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

冲突已解决并推送:head 9bde2643a4 → 2fb120f7eb(merge origin/master c26c31ace 进分支,fast-forward 推送、无 force-push;推送前已 fetch 确认远端 head 无并发推进)。

过程要点(含一个本地环境坑):

结构化八问

  1. 是什么问题:PR 分支落后 master 1243 个提交,GitHub 报 merge conflict(dirty),合入门禁被冲突挡住(非 CI 红)。
  2. 什么原因导致:分支最后一次与 master 同步停在 e193861825(10 月底),此后 master 合入的变更与本 PR 同时改动了 2 个测试文件 → 文本冲突。叠加本地 shallow 克隆导致首轮 merge 的 merge-base 失真(99 假冲突),unshallow 后消除。
  3. 影响范围与严重程度:仅 PR 分支的 mergeable 状态;零生产/用户影响。冲突解决全部在测试文件(一个 helper 收敛、一个矩阵类型/行并集)。
  4. 怎么修复的:merge master 进分支(不 rebase,免 force-push);wire-exit 取 master 的 awaitUpstreamTeardown(语义等价且有 measured-lag 上限,见其 arithmetic 测试行);matrix 取并集,两边意图都保留。
  5. 是否有回归问题:无。本 PR 两个 source 文件(src/server/lane-decisions.ts / src/host-profiles.ts)自动合并零冲突且已核完好——compressReachable 观测语义在位、toolsHostScopedByDefault 零残留;compress cannot be triggered | compress无法触发 #5527 新增矩阵行与本 PR 的 Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 行共存;typecheck + 定向 129/129 绿。
  6. 是否破坏缓存:不涉及(纯合并同步,无运行时代码变更)。
  7. 是否改了设计方向:没有。
  8. 是否引入新配置:没有。

当前实况(本 run 实测,非转述):GitHub API mergeable: True(dirty 已清),mergeable_state: blocked 仅因 checks pending;新 head 的 CI 跑在 run 43139401686 上,镜像缓存口径 0 failed / 4 success / 13 pending / 13 skipped。若全量 shard 转红我再按车道职责跟进;合并动作留给 owner。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

进度汇报(重启后状态确认):本轮工作已在重启前完成并汇报(见上条 floor 99 的完整八问),重启发生在回复发出之后,无未完成动作。

  • 冲突已解决:head 9bde2643a4 → 2fb120f7eb(merge master 进分支,2 处测试文件冲突已解,fast-forward 推送)。
  • 刚复核实况:GitHub mergeable: True;新 head CI 镜像口径 0 failed / 9 pending(较上次 13 pending 有进展,无失败)。
  • 无阻塞、无待决策项;若全量 shard 出现红项,我会在下一轮按车道职责跟进。合并动作留给 owner。

@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

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

查重: 不重复 —— 本 PR 是 #4998 的修复(服务端可达性面),与已关闭的 #1243(origin 发现竞态,请求头根本没打上)/ #2708(工具注册后被注册表重建丢弃)同属「插件回合缺 ACP 工具」家族但机制不同(本条 = 冷启动第一轮「头已打上、工具异步注册尚未落库」);与 #5465(客户端面,pi/omp 从第一轮就声明工具表)零文件重叠、互补。

以下为独立审过 diff 后的结论(未照抄 issue 或前序 review 措辞,八问与判定由我重新推导)。

① 方向关(原 issue #4998)

② 回归关(既有行为逐项清点)

diff 只动 resolveLaneDecisions 的 compressReachable(删 || !profile.toolsHostScopedByDefault 一项)+ 删 HostProfile.toolsHostScopedByDefault 字段(接口 + 5 条 profile + ANONYMOUS)。触碰路径承担的既有行为:

  • dsh / zcode:原本就纯观测(默认 true → !true=false,该项恒不贡献),逐字节不变。✅
  • proxy 模式:!input.pluginMode 首项短路,结构性常开,不变。✅
  • headerless 僵尸回合:(pluginMode && pluginHeaderPresent === false) 子句原样保留;matrix 新增 pi 僵尸行钉住自愈 probe 保持 armed(我核了 harness:先发带头请求建立 sticky metadata.pluginAgent,再发无头请求触发子句,setup 正确)。✅
  • 健康稳态会话(pi 第 2 轮起 / opencode / omp):只要 body 声明 compress 面就保持开。我核了 observeDeclaredTools 覆盖 flat/function/functionDeclarations 三种形状 + mcp__bili__compress + omnibus(run_code/code_run),且 opencode 注册 ACP_TOOLS_OPENAI(含 compress,opencode-native.ts:914-922)、pi/omp 走同一 registerTool 握手 —— 只要宿主发出就可观测。✅
  • 唯一有意变更:pi/omp/opencode 无工具回合(冷启动第 1 轮、被 strip/drop 的降级轮)从「全量 standing prompt + nudge」→「仅 tags-only prompt、无 nudge」。PR Behavior change 段已披露旧值→新值+原因,非意外漂移。✅
  • 高危模式(语义漂移 / fail-fast 变吞错 / 阈值时序 / 输出格式)逐项过,未见修 A 坏 B。surfaceOffDetail 大声日志安全网完好(观测漏了会打 surface=off(top-level=[…]),非黑盒)。✅

③ 代码关

④ 测试有效性

⑤ diff 整洁度

8 文件全与本 PR 目的相关(2 source + 6 test),无跑题文件、无 lockfile/生成物连带、无版本号变动、无批量空行重排。干净。✅

八问结论

  1. 是什么问题:pi(及 omp/opencode)冷启动第一轮带着完整 plugin 归属头却一个 ACP 工具都没声明,proxy 这时仍向模型宣告「可调 compress」——宣告了一个模型这一轮调不到的工具。
  2. 什么原因:pi 在 before_provider_headers 异步注册 ACP 工具,晚于第一轮 payload 构建,第一轮合法地没工具;而 proxy 用 profile 名默认判可达性,没看本请求实际声明。根因 = 「可达性由 profile 名假设而非观测」。
  3. 影响范围与严重程度:仅 pi/omp/opencode 无工具回合(典型 pi 冷启动第 1 轮,或被 strip/drop 的降级轮);稳态会话与其它车道零影响。严重度 = 体验瑕疵偏轻——prompt/nudge 提到一个不在工具表的 compress,模型通常不会真去调,多为无害噪音;非阻断、非数据丢失。对应 Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider #4998 的 p2 合理。
  4. 怎么修复:插件模式可达性改纯按请求观测 —— compressReachable 只留观测项(声明 compress / mcp__bili__compress / code-mode omnibus)+ headerless 僵尸自愈子句,删 profile 默认逃生门;顺带删掉变死的 toolsHostScopedByDefault 字段,让所有插件车道统一「观测为准」。
  5. 是否有回归:无意外回归。dsh/zcode/proxy/headerless/健康稳态逐字节不变;唯一变更是无工具回合转静默,已披露。高危模式逐项过,未见修 A 坏 B。
  6. 是否破坏缓存:无新增失效。插件模式 standing prompt 变化只落在 cache-cold 的第 1 轮;第 2 轮工具表新增 4 个 ACP 条目时前缀本就会断,叠加不产生额外断点。稳态每轮字节一致,cache hit 不受影响。
  7. 是否改设计方向:轻微正向收敛 —— pi/omp/opencode 从「声明默认」迁到「观测」,与 dsh/zcode 已有观测模型合一、删一整个字段,让「可达性永远按请求观测」成唯一心智模型;贴合 KDD feat: bili CLI + debug in config + README rewrite #7「宿主拥有工具表」,是简化不是转向。
  8. 是否引入新配置:无。移除一个内部接口字段,不加 env/config/CLI/默认值。

合并判定:代码审查五关(方向/回归/代码/测试有效性/diff 整洁)全过,可合。CI 现状(镜像缓存实测,head 2fb120f7eb):30 项检查 0 failed / 0 pending(16 success + 14 skipped),mergeable_state: blocked 仅因待人工 review,非 CI 红。另注:此改动触及 wire 消息形态(无工具回合的 prompt/nudge 字节)与可达性默认,按 §7.4 属人工合并范畴、不适用 auto-merge —— 请 owner 拍板合入:#5009

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

Labels

bug Something isn't working p2 pi scope/wiring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pi RPC native package: ACP tools absent on first request to local OpenAI-compatible provider

1 participant