Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/releases/v0.9.11.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
An issue that changed while an actor slept rides with the wake, not in a second turn.
A message in a room the spot does not read no longer stops it, and an issue that changed while an actor slept rides with the wake.

- **News from another room no longer stops the spot.** The core names the rooms that have a new message. When it named one the spot does not read, such as the team room, while a turn was running, the spot exited. It now ignores that room and the turn goes on.
- **A tick of an actor carries the issues that changed.** An actor is suspended between wakes and reads the open issues only once it runs. The wake the core ordered read the rooms before its turn and the issues after it, so an issue that had changed while the actor slept was found when the turn was over and started a second turn a few seconds later, with the whole prompt and tool list again. The ordered wake now reads the issues with the rooms, before its turn: the change is a fact of that turn.

Upgrade: chart `oci://ghcr.io/triageagent-dev/charts/tria-spot` 0.9.11, image `ghcr.io/triageagent-dev/spot:0.9.11`.
Expand Down
6 changes: 5 additions & 1 deletion internal/supervisor/supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,11 @@ func (s *Supervisor) saveCursors() {

// pollRoom reads one room. It returns the edges and whether the cursor moved.
func (s *Supervisor) pollRoom(ctx context.Context, room string) ([]edges.Edge, bool) {
rs := s.rooms[room]
rs, ok := s.rooms[room]
if !ok {
// The core names every room with news. The spot reads only its own.
return nil, false
}
if s.now().Before(rs.disabled) {
return nil, false
}
Expand Down
15 changes: 15 additions & 0 deletions internal/supervisor/supervisor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1777,6 +1777,21 @@ func TestAPersonsMessageDuringATurnIsHandedToIt(t *testing.T) {
}
}

// The core names the rooms with news, among them rooms the spot does not read.
func TestARoomTheSpotDoesNotReadDuringATurnIsIgnored(t *testing.T) {
h, trig, g := midTurn(t)
defer h.stop()
h.post("bus", say("alice", "alice", "@example-spot and also the cart"))
trig.say(triggers.Pending{Rooms: []string{"team", "agents", "bus"}})
h.waitFor("the bus message to reach the running turn", func() bool { return len(g.injected()) == 1 })
g.set(func() { g.gated = false })
close(g.release)
h.waitIdle(2)
if h.status().State != "idle" {
t.Fatalf("state %q", h.status().State)
}
}

func TestAMessageTheTurnDoesNotTakeWakesTheAgentAfterIt(t *testing.T) {
h, trig, g := midTurn(t)
defer h.stop()
Expand Down