Add lint rule rejecting directional SubTree ports#4
Open
L4co77 wants to merge 1 commit into
Open
Conversation
SubTree ports are always bidirectional. Fail validation when a SubTree definition declares <input_port>/<output_port> instead of <inout_port>, naming the offending ports. Must land after the example_ws migration (moveit_pro#19906); enabling it earlier would red-CI the 41 existing official objectives. Refs PickNikRobotics/moveit_pro#19906
There was a problem hiding this comment.
Pull request overview
Adds a new validation rule to prevent mis-authored SubTree port directions in MoveIt Pro objective XMLs, ensuring SubTree interfaces are declared as bidirectional (<inout_port>) rather than directional (<input_port>/<output_port>), which can silently reappear via legacy XML flows.
Changes:
- Reject objectives whose
TreeNodesModel/SubTreeinterface declares any<input_port>or<output_port>children. - Improve failure output by listing the offending port names in the validation error.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Problem
SubTree ports are always bidirectional, but nothing stops an objective from declaring its SubTree interface with
<input_port>/<output_port>. That mis-authored direction is invisible in the editor (the REST converter normalizes on read) yet leaks through the legacy XML endpoint, and it silently reappears in new objectives.Approach
In
validate_objective, fail when a SubTree definition declares any<input_port>/<output_port>child, naming the offending ports so the author knows what to change. Usesfindallon the SubTree element directly, so only the interface declaration is checked — not behavior ports elsewhere.Sequencing
Must merge after the
example_wsmigration (PickNikRobotics/moveit_pro#19906 → moveit_pro_example_ws#728). Enabling it earlier red-CIs the 41 existing official objectives.Verification
Ran the rule against
moveit_pro_example_wsv9.4:Refs PickNikRobotics/moveit_pro#19906