fix(ros2): reject non-positive action server result_timeout#822
Merged
maciejmajek merged 2 commits intoJul 22, 2026
Conversation
Fail closed when create_action_server receives a non-positive or non-numeric result_timeout (bool rejected). Prevents undefined rclpy ActionServer result lifecycle cleanup with invalid timeouts. Signed-off-by: Bartok9 <danielrpike9@gmail.com>
maciejmajek
requested changes
Jul 22, 2026
maciejmajek
left a comment
Member
There was a problem hiding this comment.
Thanks for the contrib! Similarly to the previous PR, the added test will create a burden going forward. Tests should be easy to understand & maintain. Please consider keeping the path untested or rewrite to minimize complexity.
Remove the AST-extract/exec offline test harness for the result_timeout guard. Per maintainer request, keep the validation path untested rather than carry a test that is hard to maintain. The guard itself (TypeError/ValueError on non-positive or non-numeric result_timeout) is unchanged.
Author
|
Thanks @maciejmajek — understood, and agreed. I've removed the offline test harness in 531b51a; the guard now ships untested to keep the test surface minimal and maintainable. The validation itself (TypeError on non-numeric/bool, ValueError on <=0) is unchanged. Appreciate the review. |
maciejmajek
approved these changes
Jul 22, 2026
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.
Summary
result_timeoutatROS2ActionAPI.create_action_serverbefore constructing the rclpyActionServer.boolis rejected explicitly (Falsemust not pass as0).Motivation
result_timeoutcontrols how long action results are retained. Invalid values (≤0 or non-numeric) should fail at the RAI boundary rather than being forwarded into undefined rclpy behavior.Verification
Offline tests extract and execute the guard from source (no
rclpyrequired).result_timeout=900, QoS profiles, send_goal path.Notes
Paths are orthogonal to open Bartok9 TF/service work on
connectors/base.py/service.py/topic.py.Agent-Owner:
sera· Platform: hermes · Claim-TTL: 24h