Skip to content

fix: relax validation for Agent handlers - #1139

Merged
octonato merged 1 commit into
mainfrom
octonato/allow-more-than-one-cmd-handler
Nov 13, 2025
Merged

octonato merged 1 commit into
mainfrom
octonato/allow-more-than-one-cmd-handler

Conversation

@octonato

Copy link
Copy Markdown
Contributor

No description provided.

"No method returning akka.javasdk.agent.Agent.Effect, akka.javasdk.agent.Agent.StreamEffect found")
}

"reject Agent without command handler" in {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this removed? It must have one command handler?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed because there is already another test checking it.

The one just above this is: "reject Agent without Effect method"

"There must be one public method returning Agent.Effect")
}

"reject Agent with multiple command handlers" in {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't the problem that the validation is also including private methods? There should be one, and only one public (or package private) command handler. The LedgerAgent has private methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, you are right. I will fix this them.

@octonato
octonato force-pushed the octonato/allow-more-than-one-cmd-handler branch from a336650 to 1456722 Compare November 13, 2025 12:36

@patriknw patriknw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@octonato
octonato merged commit c3e6260 into main Nov 13, 2025
1 check passed
@octonato
octonato deleted the octonato/allow-more-than-one-cmd-handler branch November 13, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants