fix(codex): reconcile cold connections without resuming queued goals
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.a-wan.net/alan/pipelines/internal/protocol"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLateHarnessCompletionCannotReleaseNextChatTurn(t *testing.T) {
|
||||
h := newChatHub()
|
||||
room := newChatRoom(context.Background(), "ses_turn")
|
||||
defer room.cancel()
|
||||
room.running = true
|
||||
room.nativeTurnID = "new"
|
||||
room.turnDone = make(chan struct{})
|
||||
h.rooms[room.sessionID] = room
|
||||
h.emitRoom(room, protocol.ChatEventFrame{SessionID: room.sessionID, Kind: protocol.ChatEventStep, Step: &protocol.ChatStep{Status: protocol.ChatStepEnded, TurnID: "old"}})
|
||||
if !room.running {
|
||||
t.Fatal("old terminal frame freed next turn queue")
|
||||
}
|
||||
h.emitRoom(room, protocol.ChatEventFrame{SessionID: room.sessionID, Kind: protocol.ChatEventStep, Step: &protocol.ChatStep{Status: protocol.ChatStepEnded, TurnID: "new"}})
|
||||
if room.running {
|
||||
t.Fatal("matching terminal frame did not finish turn")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user