skill slash命令bug修复#467
Conversation
| func terminateCommand(cmd *exec.Cmd) error { | ||
| if cmd == nil || cmd.Process == nil { | ||
| return os.ErrProcessDone | ||
| } |
There was a problem hiding this comment.
Medium: on non-Windows this still kills only the direct server process, not its descendants. With this patch runRPC now returns as soon as ctx.Done() fires, so a timed-out MCP server that spawned a helper and inherited stdout/stderr can keep running after the request has already failed. The new hold_stdout_child test only uses a 2s child, so it doesn't catch the leak, but real helpers can outlive the request indefinitely.
| return nil, newExtensionError(extensionspkg.ErrCodeInvalidExtension, "mcp adapter is nil", nil) | ||
| } | ||
| if err := a.maybeRefresh(ctx, false); err != nil && contextError(err) != nil { | ||
| if err := a.maybeRefresh(ctx, false); err != nil && ctx.Err() != nil && contextError(err) != nil { |
There was a problem hiding this comment.
Low: this returns the extension error verbatim whenever the caller context is done, which can preserve the wrong cause. If the caller cancels but the client reports its own DeadlineExceeded (or another wrapped context error), callers here still see the extension's timeout instead of ctx.Err(). The runner normalizes this later, but direct ResolveTools callers do not.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
变更摘要
/skills-select打开 skill picker 并激活技能Entry: /...