fix: correct publish_message return value when no recipients#2094
Open
lxcxjxhx wants to merge 1 commit into
Open
fix: correct publish_message return value when no recipients#2094lxcxjxhx wants to merge 1 commit into
lxcxjxhx wants to merge 1 commit into
Conversation
Fixes FoundationAgents#2082 Environment.publish_message drops messages to unregistered roles but returns True. This fix returns False when message cannot be delivered to any recipient. Changes: - Changed return value from True to False when no recipients found - Maintains backward compatibility for successful deliveries
Author
|
Hi @better629 @cmodi-meta @Ruyuan37, this PR fixes #2082 by returning False when publish_message has no matching recipients, instead of silently returning True. The Unit Tests CI has passed. Could you please review and approve the Full Tests workflow? Thanks! |
Author
|
Hi @better629 @cmodi-meta @Ruyuan37, This is a gentle follow-up on PR #2094 which fixes issue #2082. The Unit Tests have passed successfully, but the Full Tests workflow is still waiting for approval. Could you please review and approve the Full Tests workflow when you have a moment? This is a small but important fix that improves error handling in the publish_message function by returning False when no recipients match, so callers can detect delivery failures. Thank you for your time! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2082
Problem
Environment.publish_messagedrops messages addressed to unregistered roles and unconditionally returnsTrue, giving the caller no signal that the delivery failed. Whensend_tomatches no registered address, the function logs a warning but still reports success — a producer Role performing a handoff has no machine-readable way to detect the lost message.Solution
Return
Falsewhen no recipients match, so callers can detect delivery failures.Changes
TruetoFalsewhen no recipients are foundTrue)