Skip to content

Add lint rule rejecting directional SubTree ports#4

Open
L4co77 wants to merge 1 commit into
mainfrom
19906-reject-directional-subtree-ports
Open

Add lint rule rejecting directional SubTree ports#4
L4co77 wants to merge 1 commit into
mainfrom
19906-reject-directional-subtree-ports

Conversation

@L4co77

@L4co77 L4co77 commented Jun 21, 2026

Copy link
Copy Markdown

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. Uses findall on the SubTree element directly, so only the interface declaration is checked — not behavior ports elsewhere.

Sequencing

Must merge after the example_ws migration (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_ws v9.4:

  • Pre-migration content: flags exactly the 41 objectives.
  • Post-migration content: flags 0.

Refs PickNikRobotics/moveit_pro#19906

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
@L4co77 L4co77 marked this pull request as ready for review June 21, 2026 22:01
@L4co77 L4co77 requested review from JWhitleyWork and Copilot June 21, 2026 22:02
@L4co77 L4co77 self-assigned this Jun 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/SubTree interface 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants