Repository navigation
[Bug][0.1.5-rc.2 + 0.1.6-alpha.2] Web 发送链静默挂起:prompt 类 unary RPC 无 deadline,传输挂起时 echo 永不退场(#2060 的翻转面) #7210
coffee-man666
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Bug Report:Web 发送链静默挂起——#2060 去 deadline 后的翻转面
deepseek-ai/deepseek-harness环境
@deepseek-ai/dsh0.1.5-rc.2(npx 安装,web profile)dsh.profile.bundlesclient slot),但下述发送链四级全部是宿主自有代码路径,不涉及对宿主代码的任何修改现象(GUI 实测复现 2 次)
页面静置约 13–17 分钟后,同标签页再发消息:
session.v3.jsonl.zstd的 mtime 停在上一轮完成时刻;promptError不触发),回合不启动,也没有 Stop 可按;即用户输入「三重静默丢失」:气泡滞留 + 无报错 + 宿主零痕迹。
根因(源码级;发送链四级,任何一级都没有 deadline)
dsh-client-connectioncreateWebConnectionRpc().call():一元请求走fetch(POST /api/<channel>/<endpoint>),仅当调用方传入 signal 才透传,无内建超时。传输层挂起(空闲后连接死掉、渲染进程饱和等)时 promise 永不结算。dsh-client-ui-conversationmintAttempt():new AbortController()裸构造,无任何超时臂;Enter 发送把这个永不触发的 signal 经sendSession→session.prompt→rpc.call一路传到底。dsh-api-session-controllerbeginSubmission()/prompt():用户气泡是beginSubmission的本地 echo;retireFailedSubmission仅在 RPC 返回错误/抛异常时退场,promptError同理。挂起 = echo 永不退场、错误态永不进入。ConnectionRecoveryConfigSchema只覆盖 SSE generation 握手(generationReadyTimeoutMs默认 15s)与重连退避,对一元请求无效——SSE 侧已重建新 generation 时,在途的一元 fetch 仍挂着。与 #2060 的关系
#2060 报告的是 30s 固定超时误杀发送(
signal timed out (internal));其修复方向(session.prompt/subagents.prompt归类 caller-signal-only、去掉固定 deadline,cf. @zoahdev 的fix/prompt-user-paced-no-deadline)解决了误杀,但把失败模式翻转成了无限静默挂起。@setieroth 在 #2060 的实测(超大 session 拖饱和渲染进程、空闲后下一条消息无回音、重启恢复)已经描述了本帖的触发面,并建议在 caller-signal-only 之外对发送类 RPC 再加一层保护——本帖补上这层缺失的证据与参考实现。版本核对(0.1.6-alpha.2 未修复)
npm pack 逐包 diff(0.1.5-rc.2 本机安装 vs 0.1.6-alpha.2 registry 产物):
dsh-client-connection:createWebConnectionRpc().call()与ConnectionRecoveryConfigSchema逐字相同;dsh-api-session-controller:prompt()/beginSubmission/retireFailedSubmission逐字相同;dsh-client-ui-conversation:mintAttempt()逐字相同,全包无任何 deadline 逻辑;dsh-host-webserver:lib/index.js字节级相同。参考修复(已在下游产品 bundle 落地,未改宿主源码)
客户端 boot 时包装全局
fetch:POST /api/*+ 请求体信封{"type":"client-request"}精确识别一元请求;对宿主侧的建议(bundle 侧做不了的部分):
promptError可见。All reactions