阶段六:提取Engine状态与生命周期边界

This commit is contained in:
Christ committed 2026-08-14 21:09:45 +08:00
1 parent 10ba79c292
commit d38f8d7aaa
9 files changed
+675 -505

No files matched your search

+1 -6
View File
@@ -355,12 +355,7 @@ func TestStopCancelsInFlightReplyHandler(t *testing.T) {
acc.reply = nil
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
acc.mu.Lock()
acc.stopFn = cancel
acc.mu.Unlock()
acc.taskMu.Lock()
acc.runtimeCtx = ctx
acc.taskMu.Unlock()
acc.lifecycle.start(ctx, cancel)
acc.scheduleDebouncedReply(ChatMessage{ChatID: "cancel-chat", SenderUserID: "buyer", Text: "hi"})
select {
case <-handler.started: