Repository navigation
[Bug] /compact reports transport failures as "could not produce a useful summary" #6184
133563825as-ai
started this conversation in
General
Replies: 2 comments 2 replies
|
/compact |
0 replies
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.
Environment
0.1.5-rc.1(installed), verified the same code path onmaster(
packages/compaction/compaction-basic/src/region.ts:277-299)deepseek-official(DeepSeek API)Summary
When the summarization request dies at the transport layer,
/compacttells the user:The real failure is
DeepSeek API stream from https://api.deepseek.com failed(LlmError, codeTRANSPORT).It is only written to the log-only
compaction/end.errorfield; the user never sees it, and is pointed at"summary quality" instead of the network.
This contradicts the documented contract in
packages/compaction/command-compact/README.md:Compaction could not produce a useful summary. ...Evidence
Same args (
/compact,args=""), same session, two failures then one success:command/runcmd-31e9807e-1compaction/startcompaction/enderror="DeepSeek API stream from https://api.deepseek.com failed"(8556 ms)command/donekind=error, "Compaction could not produce a useful summary. ..." (+6 ms)command/done=Compacted 529 history items (~247453 tokens).Scan of all local session logs (real events, not string matching):
error/TRANSPORTfinishes, 59llm/retryevents (40 TRANSPORT + 19 SERVER)/compactcommands in the logs: 2 of the above failures, 3 successesSource
dsh-compaction-basic/lib/index.js:507-511:Every failure that is neither
commitnorSurfaceChangedError— including a transport error — lands on thelast line and is rendered by
dsh-command-compact/lib/index.js:33as the "no useful summary" text.TRANSPORTis a catch-all in the DeepSeek adapter (dsh-llm-deepseek/lib/index.js:1645); an idle timeoutwould be
TIMEOUTand a caller abortABORTED, so this really was an IO error during stream read.Suggested fix
Classify transport-class failures (
LlmErrorwith codeTRANSPORT/TIMEOUT) as their ownManualCompactionErrorCode(e.g.transport), and givedsh-command-compacta message that names thenetwork and tells the user the conversation is unchanged and safe to retry. This touches the closed union in
packages/compaction/compaction/src/types.tsand the semantics indocs/subsystems/compaction.md, so it is asmall but deliberate API change.
Not asking for retries
I understand
dsh-llm-retrydocuments that directctx.llm.stream()consumers remain single-attempt, andthat the automatic paths'
compactionRetries/ overflow retry are about insufficient shrink and an advancedreplacement generation rather than transport recovery. The request here is only about correct failure
reporting, not about adding retries.
Related
(
CONTEXT_WINDOW_EXCEEDEDfollowed by "Compaction could not produce a useful summary").How to reproduce
中文摘要
手动
/compact遇到网络层TRANSPORT失败时,用户看到的是Compaction could not produce a useful summary.,而真因(
DeepSeek API stream from https://api.deepseek.com failed)只写在compaction/end.error里,界面不展示。dsh-compaction-basic/lib/index.js:510的throwManualFailure把「非 commit、非 SurfaceChanged」的一切失败都归成 code
summary,再由dsh-command-compact/lib/index.js:33渲染成那句文案 —— 这与dsh-command-compact/README.md的明文契约冲突(该文案只对应「无法产生有用的摘要」,且「除这些预期情形外的失败会以错误形式呈现,而不会被静默转换」)。
建议:为传输类失败新增一个 code(如
transport),并给出指向网络、提示可安全重试的文案;需要同步
dsh-compaction的 closed union 与docs/subsystems/compaction.md。注:本报告不要求给摘要调用加重试 ——
ctx.llm.stream()直连消费方按设计就是单次尝试。All reactions