Repository navigation
[PR] fix: dsh 0.2.x code-mode omnibus code_run reads as compress-reachable (#3884) - #3885
Conversation
…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.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4649-pr.3885.651d0abThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3885.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。全仓检索 标签:bug · dsh · scope/wiring · p1 —— 缺陷类;DSH 专用;改动落在「客户端工具表 → 压缩面可达性判定」,属协议接线层;DSH 0.2.x code-mode 会话压缩面被永久静默关闭 = 核心承诺失灵 + 上下文只增不减,判 p1。 独立复核(未照抄 issue 结论,按 tag 读码):dsh profile 八问
diff 整洁度:5 文件、约 83 行,全部与本修复直接相关,无跑题文件 / 空行重排 / lockfile 抖动。测试双向断言合规(#3617):正负成对,新增行有牙(code_run 行在 master 上会失败,修后转绿)。 CI 状态:GitHub 出站此刻持续 connection-reset(npm registry 可达、github.com 不可达),暂读不到远程 CI 结果;按瞬时网络故障处理,不作终局判断。本地定向证据(typecheck 干净 + 82/82)已覆盖本 PR 触碰的全部面。 判定:代码可合。因涉及 ACP 工具描述文本这一 wire-adjacent 变更(且跨 2 模块),走 human merge、不进 auto-merge;待远程 CI 转绿即合。网络恢复后我会再核一次 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.
…s gate RUN_CODE_TOOL_NAME (src/compress-tool.ts) and maskUrlForPublish (src/log-mask.ts) are each used only within their own module and imported nowhere; the unused-exports gate classifies both INTERNAL_ONLY. Drop the redundant leading `export` so the gate passes; both stay module-local and behavior is unchanged. Clears the unused-exports check on #3885.
CONFIGURATION.md/.zh-CN.md carried two stale duplicate rows left behind by #3818 (storage.unified shadow->full flip kept the old shadow row) and #3788 (sqliteAutoDownload cooldown text added a new row but kept the old one). The config-docs generator (source of truth: website/config-reference/*.yaml) emits only the current rows, so docs-sync failed on the merge. Regenerated from seeds; removes 2 stale rows per language file. No config-surface or behavior change. Pre-existing on master, surfaced via #3885's merge.
(ai: vllm-qwen/qwen3.8-27b) CI 两处红已在 PR 分支直接修掉并 push( 改动(2 个 commit,均几行级小修):
结构化结论:
判定:两条红线均为可确定性修复的小问题,已就地修好并推送,等远程 CI 在 pushed head 上复跑确认即转绿。顺带说明:这两处的根因都在 master 侧(合入后 master 一并被修复);本地未跑全量 typecheck/test(按仓库纪律交给远程 CI 把关),已用精确门禁命令 + AST 解析通过验证改动本身安全。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.647-master.f9e0d27 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #3884
(ai: vllm-qwen/qwen3.8-27b)
什么坏了(一句话)
所有 DSH 0.2.x Code Mode / PTC 会话的压缩面被永久且静默关闭:nudge 恒 ARMED-SUPPRESSED(issue 实测 12 次,usage 仅 42%、pendingT1 达门槛 10 倍、INJECT 0 次),上下文一路涨到 63% 靠人工兜底。
根因
#3603 的可达性门只认单个字面量
run_code(RUN_CODE_TOOL_NAME)。DSH 0.2.x 把 Code Mode 移入 dsh-codemode 插件后,其 transport 名为code_run(保留名run_code归 dsh-tools,插件不能注册)——门失配,可达性合取式全假 ⇒ 面恒关。与 #3600/#3603 同一条判定链、同一日志形状,只是常量对不上。顺带发现同机制家族的第二处检测点:proxy 车道的
ptcNoteMode()同样只匹配run_code——code_run 客户端的注入工具拿不到 exempt 注记(「bili 工具请直接调用」),在 harness「只许调 omnibus」规则下模型可能拒调 compress,同类静默失效。一并修入本 PR(同一失败域,不拆片)。修法
CODE_MODE_OMNIBUS_TOOL_NAMES(run_code= dsh-tools 内置 / DSH 0.1.x;code_run= dsh-codemode transport / DSH 0.2.x),注释逐条列形态与出处;后续宿主变体按流量证据追加;行为变更披露(旧 → 新)
code_runcode_run两处变更即修复目的本身:从「错误压制」恢复到与其他 omnibus 形态一致的正常状态,不触碰任何其他会话形态。
测试(双向断言,#3617 纪律)
tests/lane-decisions-matrix.test.ts:新增dsh code_run omnibus keeps the surface (#3884)→ 开面(×4 wire)+ EMERGENCY 对偶行;真阴性精度行(get_weather / acp_status → 关面)不变,与新行构成正负对;tests/ptc-runcode-tools.test.ts:新增 code_run → exempt 注记 4 行(四 wire 各一);bash-only 行钉负向;