Repository navigation
插件车道进仓库:真宿主 CLI × 真模型回归(#3416),远程默认不跑 - #3462
Conversation
scripts/gate/plugin-lanes.mjs + upstream-recorder.mjs: drive dsh/pi/codex/ claude/opencode through native and /bili/ prefix lanes against a real model, asserting on the recorded wire (tools declared, hard nudge-on-wire, fold, marker recall, no unknown-tool loops). ci-gate-plugins.yml is manual-only (workflow_dispatch, no push/PR trigger, skips green without an endpoint secret). Container harness stays out of the repo.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4111-pr.3462.378ca2bThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3462.tgz
npm install -g packageInstall instructions are refreshed on each push. |
The recorder logged every request header verbatim; bili forwards the model API key into this hop on every request, so the key landed in upstream.jsonl on disk. Mask authorization/proxy-authorization/cookie/x-api-key/api-key values, and warn once on stderr if the JSONL cannot be written instead of swallowing it silently.
[bot] 🏷 查重:不重复。 open+closed issue 与 PR 全检索过:相关条目只有 #3416(本 PR 的原始 issue)、#3417(同 bug 家族根因——四条 wire 适配器各带一份车道判定拷贝且已漂移,机制不同,已有独立修复在途)、#3461(真模型压测发现的三个问题,解释了 opencode2 为何不进默认集)。没有别的 #3416 平行实现。 方向审核(对照 #3416):方向对——车道进仓库与被测代码同版本演进、以「模型实际收到的 wire」而非内部日志为真相源,正是治 #3401 那类「日志说 ARMED-SUPPRESSED、gate 全程绿灯」的正解。与原始 issue 字面有两处偏差,分开列:
回归审查:diff 触碰既有产品行为为零——5 个文件全部纯新增(3 个新脚本 + 1 个新 workflow + 1 行 changelog;changelog 条目位置核实在 [Unreleased]→Added 下)。ci-gate-plugins.yml 逐行读过:仅 workflow_dispatch 触发器,无 push/PR 触发器;permissions contents:read;secret 未配时 notice + exit 0(跳过且绿,与描述一致)。无新 bili 配置/env(GATE_* 等只被 harness 脚本消费,README 有文档)。kernel/、update.ts、持久化、wire 协议:零改动。 代码审查要点(断言串全部对照当前 master 源码逐条验证过):
测试有效性:核心断言「nudge reached the model (hard)」有牙且无 OR 兜底——这正是 #3416 的核心诉求;tools-on-wire、pluginAgent claim、fold 开火、折后暗号回忆、unknown-tool 守卫都是真断言。「model invoked plugin tool」是条件软记录(命中才记,不命中不算失败)——属有意设计(模型自主性),其缺失会被 fold 断言兜住。红绿双证基于作者实跑(本沙箱没有真模型端点/宿主 CLI,无法复跑);已确认 #3401 的修复在 master(Unreleased changelog 的 lane-decisions 条目),与「含 #3403 全绿」的说法自洽。 已直接推到分支的两个小修(独立标注 commit,新 head
PR 描述小瑕疵:正文说「仓库其余零改动」,实际还动了 CHANGELOG.md(+1 行,条目内容与位置都没问题,只是措辞不准)。 CI 状态(审时):已完成的全部 check 绿(static-gates、各 guard、docs-sync、gate 分片、build-artifact 等),4 个 test 分片当时仍在跑;新 head 会整体重跑。 结构化八问:
判定:建议合并。 唯一悬而未决:dsh-proxy 车道是否要求合并前补齐——我的建议是不阻塞,另开 follow-up 补矩阵最后一格。合并按你的规矩来。 |
- BILI_ZONE_PORT per native lane (19000+hash): a leftover proxy on the
default 18787 can no longer capture a lane or force a mid-run drift
- BILI_MODEL_INFO_RETRY_MS=1000: the dsh native plugin's boot-time
model-info resolve races the host's provider-adapter registration
("no adapter registered"), and the failure shape eats a 30s cooldown —
longer than a whole short headless turn; 1s retry + a leading cheap
bash tool call per prompt (warmupPrefix) guarantees request #2+ lands
with the x-bili-plugin-context-window header stamped
- t3/t4 retry loop (2x) absorbs tag-echo-only empty replies
…xplicit chunk reads)
…opencode-v1 bin knob - seed mid from the biggest t1 request body on the wire (idle log lines lag the corpus read; a stale line put dsh t2 at 285% usage and the EMERGENCY nudge rode a fail-fast 502 that never forwarded) - t2 retry: up to 3 attempts, require in-band + ok + non-empty + the S07 marker (wrong-marker answers get one cheap retry) - dsh setWindow rewrite all contextWindow entries (multi-model cordis) - opencode v1 bin honors GATE_OC1_BIN (image installs it as opencode-v1; plain 'opencode' resolves to the v2 line whose managed service fights the port and crashes at cli.server-connect)
scripts/gate/README.md becomes the English document (repo docs are English-first); the previous Chinese text moves verbatim to README.zh-CN.md, cross-linked from both headers. Ref #3475.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.513-master.95b39e5 # this exact build
npm install -g billion-context@master # always the newest merged build
|
ai: zhipuai-lb/glm-5.3
插件车道进仓库:真宿主 CLI × 真模型(#3416)
这是干什么的
发版前的本地真模型回归现在能测插件模式了。之前 gate 只测代理模式,#3401 那种「dsh 插件会话里工具明明在 wire 上、nudge/压缩提示却被整关」的回归,gate 全程绿灯(实测:master 含病构建 gate GREEN,exit 0)。
本 PR 把车道脚本放进仓库,和被测代码同版本演进:
scripts/gate/plugin-lanes.mjs——五条车道(dsh / pi / codex / claude-code / opencode),覆盖两条激活路径:x-bili-plugin头、自起代理(port 0),外部不碰代理/bili/URL 前缀,代理由脚本起scripts/gate/upstream-recorder.mjs——垫在 bili 和真模型之间的记录垫片,所有断言从模型实际收到的 wire 上做:内部日志会被抑制类 bug 骗过([bug] #3177 的 DSH compress-surface 抑制在「agent 能看到 bili 工具」的 DSH 环境下误伤:nudge 与 compress 系统提示被永久关闭 #3401 的日志只说 ARMED-SUPPRESSED),wire 骗不了断什么
payload.metadata.pluginAgentacp-compress-obs] shrink N%)、折后暗号回忆、无 unknown-tool 空转x-bili-plugin-context-window头),中窗从实测 usage 自校准到 75-95% 压力带远程默认不跑
ci-gate-plugins.yml仅 workflow_dispatch 手动触发,无 push/PR 触发器;没配GATE_MODEL1_BASE_URLsecret 时跳过且绿scripts/gate/README.md红绿双证(#3416 验收)
测试
车道本身就是测试(真模型、真 CLI)。CI:无影响(新 workflow 无触发器;scripts/ 下无单测)。仓库其余零改动。