Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@mattjohnsonpint
Copy link
Contributor

Checking agent status when subscribing to an event stream should not be blocked by the agent actor's state. We can just go directly to the database.

Additionally, in cases where we do want to talk to the actor, there are a couple more error states to consider.

@mattjohnsonpint mattjohnsonpint requested review from a team and Copilot June 24, 2025 15:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures event subscription does not depend on the actor’s availability by fetching agent status directly from the database, and adds new error conditions when querying the actor.

  • Switch SubscribeForAgentEvents to use direct DB lookup for status
  • Extend GetAgentInfo to handle ErrDead and ErrRemoteSendFailure
  • Bump runtime version and adjust dates in CHANGELOG

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
runtime/actors/subscriber.go Replaced actor call with direct DB lookup for agent status
runtime/actors/agents.go Added new actor error cases (ErrDead, ErrRemoteSendFailure)
CHANGELOG.md Updated to v0.18.1 and fixed release dates for SDK entries
Comments suppressed due to low confidence (1)

runtime/actors/subscriber.go:38

  • Add unit tests for SubscribeForAgentEvents to cover the new direct DB fallback path, ensuring subscriptions succeed when the actor is unresponsive.
	if a, err := getAgentInfoFromDatabase(ctx, agentId); err != nil {

@mattjohnsonpint mattjohnsonpint enabled auto-merge (squash) June 24, 2025 15:48
@mattjohnsonpint mattjohnsonpint merged commit 758e079 into main Jun 24, 2025
33 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/subscriptions branch June 24, 2025 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants