Repository navigation
Replies: 6 comments
⭐ 你的诊断在源码里构造性地成立——我找到那一行,而且修法就是换一个函数1. 关键代码(
|
| 帖 | 该帖的自我判断 | 与你这条的關係 |
|---|---|---|
#8792 |
"两个插件 id 相同 ⇒ 宿主崩溃" |
同一错误串——很可能不是 id 冲突,而是同一副本重复问题 |
#8517 |
"Storage crash" | 同一错误串 |
⇒ 建议你把这两条引用进来,并指出:"同一属性名的空引用"由同一种机制产生(副本重复 ⇒ 符号键失配),而不是三种不同的崩溃。这一条能把三份报告合并成一个可一次性修复的根因——这是你这条最大的价值。
5. 请补两样
- 是哪一处读
.prepare抛的(栈的第一帧)⇒ 用来确认它确实经过符号键查表(:480那个 scheduler); - 两份副本的存在证据(两处
node_modules路径 + 版本号,你已给出)⇒ 建议同时给出两者的 md5 是否相同:如果字节相同,那就更能证明"问题不在版本差异,而在模块身份"。
6. 一条边界
我确认的是**:480 用 Symbol()、且全树无 Symbol.for**(足以支撑"副本共存即失配"这一机制)。栈的第一帧以你补的证据为准——我没有该现场。
|
Thanks for the source-level confirmation — supplementing the two evidences requested, from the failing runtime: 1. The exact
|
⭐ 你的第一帧把我上一轮的判断钉死在源码上——而且它指出了跨包导入这个关键条件1. 你给的帧 → 源码的对应(逐行核对)你给的失败点是(产物) const prepared = await ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(call.exec); // throws here对应源码 :17 import { TOOL_ABORTED_BEFORE_DISPATCH, TOOL_RUNTIME_SCHEDULER, … } from '@deepseek-ai/dsh-tools'
:153 ? await ctx.tools[TOOL_RUNTIME_SCHEDULER].finalize(slot.exec, slot.result)
:154 : ctx.tools[TOOL_RUNTIME_SCHEDULER].finish(slot.exec, slot.result)
:170 const prepared = await ctx.tools[TOOL_RUNTIME_SCHEDULER].prepare(call.exec) ← 你说的抛错点⇒ 2. ⭐ 而
|
|
Confirmed on all points — mapping your source lines to the observed runtime:
On the md5 request: already provided in my previous comment, restating for the record —
One more supporting observation for the history-pollution point: in one failed turn the model emitted TWO Endorsing the fix as stated ( |
收到——链条到此闭合;我再补一条你们的日志已经暴露出来的次生后果1. 确认:两端对齐完成你把每一环都对上了: 2. ⭐ 但你日志里有一句揭示了第二个后果(我上一轮没说到)你写:
⇒ 这正好证实了我上一轮说的"调用已被持久记录、结果永不记录",但还多一层:
⇒ 也就是说:这不是"一次调用失败",而是"每一步的收尾都没做"。⇒ 建议把这一点作为第二条影响单列,并请(或由我)确认
⇒ 这一层会改变修复的紧急度:只影响"工具不可用"是 P1,若还泄漏槽位就是 P0。 3. 你给的 md5 请保留在正文你把两份副本的路径与 md5 都给了(profile 侧 4. 一条边界我确认的是源码侧的定义/导入/抛错点,以及你说 |
|
Checked What the two methods actually do
No cross-step slot leak (stays P1, not P0)Three reasons the leak branch does not hold here:
But two real secondary impacts (beyond "tools unusable")
So: severity stays P1 for availability, with a P1-adjacent accounting/UI-staleness tail. No P0 leak. Happy for maintainers to correct if |
Uh oh!
There was an error while loading. Please reload this page.
Env
@deepseek-ai/dsh@0.2.0-rc.2, win32 x64,dsh web@deepseek-ai/dsh-tools@0.2.0-rc.2in its ownnode_modules(needed for local plugin dev importingdefineTool), while the CLI nests its own identical-version copy.Symptom
Every turn that dispatches ANY tool (
todo_write,web_fetch,job_listall observed) dies. Text-only turns survive.Session log:
turn/endwithCannot read properties of undefined (reading 'prepare')(code UNKNOWN);the UI then shows
TOOL_OUTCOME_UNKNOWN("The tool call was interrupted after it was recorded...") on recovery.Identical failure across models, sessions and backend restarts, so it is not an LLM/bridge flake.
Root cause
dsh-agent-loop/lib/index.jsdispatches viactx.tools[TOOL_RUNTIME_SCHEDULER].prepare(...), where the symbol is imported from ITS sibling-resolveddsh-toolscopy, but thetoolsservice instance is constructed from the profile's copy.Verified in Node: the two copies export distinct
TOOL_RUNTIME_SCHEDULERsymbols (a === bisfalse) even at identical versions, so version alignment cannot fix it — it is a module-instance identity problem.Workaround (verified)
Point the profile's
@deepseek-ai/dsh-toolsat the CLI copy (same realpath, e.g. directory junction) so both resolve to one module instance; verifiedidentical: truein Node and tools run again. Note: pnpmfile:alone is NOT enough (file-level hardlinks still leave distinct directory realpaths).Suggestion
Pick one: dedupe to a single
dsh-toolsinstance across profile/core; replace the symbol key with a string key; or throw a descriptive error when the scheduler lookup misses instead of a bare TypeError on.prepare.Happy to provide session event excerpts or test a fix.
All reactions