Skip to content

feat: /acp explains chain passthrough — verdict panel replaces the armed-idle notice (#1218) - #1229

Merged
ranxianglei merged 1 commit into
masterfrom
2026-09-24_acp-chain-verdict-status
Sep 24, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-09-24_acp-chain-verdict-status

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Problem (#1218)

A conversation judged an external bili chain (content fallback, #1086) is passed through without creating any local session state. /acp then answers unknown plugin conversation, which every client surface renders as the armed-idle notice — "no model request yet; send one, then run /acp again". That is misleading: requests ARE arriving (passed through unprocessed), compression is silently disabled for that conversation, and the user has no way to find out why.

Fix — root cause, not a mask

The judgment already exists server-side (the once-per-session [chain] warn); the status path just never saw it. The warn-once Set in server.ts becomes a bounded per-conversation verdict store in plugin.ts (WARNED_CHAIN_SESSION_CAP = 4096, same FIFO discipline):

  • recordChainVerdict(id, kind, protocol) returns first-verdict (drives the once-per-session warn — semantics unchanged), refreshes at on every passthrough
  • server.ts records under the session id AND the client's own conversation value when they differ — /acp probes arrive keyed by the client's value (same key space resolveConversation uses)
  • handlePluginStatus: no session + verdict for the probed id → 200 with phase: "chain-passthrough", the verdict, and a renderable panel naming the evidence (kind, protocol, last passthrough time) and the escape valve (chainContentDetection=false / BILI_CHAIN_CONTENT=0)
  • Every /acp surface (pi / dsh / opencode) renders panel verbatim → zero agent-side changes needed
  • Unrelated probes keep the pre-existing 404 shape (test asserts no hijack)

Tests

tests/issue1086-chain-self-exemption.test.ts:

  • new #1218 regression test: passthrough POST → no session → /acp probe returns 200 with phase=chain-passthrough, evidence kind, panel containing PASSED THROUGH UNPROCESSED + the escape valve; unknown conversation stays 404
  • T8 FIFO test adapted to the Map-backed store (same bounded-cap assertions)

Local: typecheck ✅ · issue1086 suite 18/18 ×3 runs ✅ · plugin/dsh/pck/instance suites 79/79 ✅ · build ✅

Fixes #1218

…med-idle notice (#1218)

A session judged an external bili chain by the content fallback is
passed through with NO local state, so /acp answered 'unknown plugin
conversation' (rendered as armed-idle 'no model request yet') —
misleading: requests ARE arriving, compression is just disabled for
this conversation (#1218).

The warn-once set in server.ts becomes a bounded per-conversation
verdict store in plugin.ts (kind + protocol + last-seen timestamp):
server.ts records the verdict under the session id AND the client's
own conversation value (the key space /acp probes use), and
handlePluginStatus renders a panel that names the evidence and the
chainContentDetection=false escape valve. Every /acp surface (pi /
dsh / opencode) renders the panel verbatim, so no agent-side changes.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-24_acp-chain-verdict-status (aec6bd3)

Option A — Install from npm PR tag (recommended)

npm install -g billion-context@pr-1229

Each push to this PR publishes a new version under the pr-1229 npm tag.

Option B — Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 收到,开始按 PR Review 规范审查 #1229(方向 → 回归 → 代码 → 测试有效性 → diff 整洁度)。先拉分支核对代码与 CI,稍后给出完整结论。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[acp] 会话被 chain 判定透传时 /acp 仍显示 armed-idle,用户无从得知原因

1 participant