Skip to content

Preserve debug-only node arguments without mutating caller lists - #4018

Open
sylvesterkaczmarek wants to merge 1 commit into
moveit:mainfrom
sylvesterkaczmarek:fix/debuggable-node-arguments
Open

sylvesterkaczmarek wants to merge 1 commit into
moveit:mainfrom
sylvesterkaczmarek:fix/debuggable-node-arguments

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Nov 29, 2026 •

Copy link
Copy Markdown

Description

Fixes #4016. Always forward debug-only arguments to the debug node, using a new list rather than mutating normal arguments.

Checklist

  • Repository pre-commit checks
  • Regression tests with omitted, empty and nonempty base arguments
  • Tutorials, API migration and GUI screenshots (not applicable)
  • Review another open PR

Validation: all 3 regression cases fail before the fix; 6 targeted tests pass afterward, using mocked Node constructors for the argument assertions. Full ROS integration remains pending CI.

Summary by CodeRabbit

  • Bug Fixes
    • Debug launches now include extra debug arguments when node arguments are omitted, empty, or already provided. Existing arguments are preserved, and supplied argument lists remain unchanged.
  • Tests
    • Added coverage for omitted, empty, and populated argument lists, including verification of argument order and launch order.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

add_debuggable_node now combines extra debug arguments with base arguments without mutating the caller’s list. Tests cover missing, empty, and non-empty base arguments and verify node ordering.

Changes: Debug node argument handling

Layer / File(s) Summary
Argument composition and validation
moveit_configs_utils/moveit_configs_utils/launch_utils.py, moveit_configs_utils/test/test_debuggable_node.py
The function extracts base arguments and creates a combined list when extra debug arguments are present. Parameterized tests check argument preservation, debug arguments, and standard-then-debug node order.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: dlu

Merge Risk: Minimal · up to 7e1b4

This change makes debug-only arguments reach the debug node even when no base arguments are given, and it stops modifying the caller's argument list. The change is small and covered by targeted tests, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Preserve debug-only node arguments without mutating caller lists" matches the main change. The raw summary says add_debuggable_node now builds a new list for the debug node's arguments inst…
Linked Issues check Passed Issue #4016 requires two behaviors. (1) The debug node must receive extra_debug_args when no base arguments are given. (2) Caller-owned argument lists must not change. In launch_utils.py at head, `arg…
Out of Scope Changes check Passed The whole-PR diff against the merge base 5399d29 changes only moveit_configs_utils/moveit_configs_utils/launch_utils.py (the add_debuggable_node argument handling) and adds a regression test in moveit…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "Preserve debug-only node arguments without mutating caller lists" matches the main change. The raw summary says add_debuggable_node now builds a new list for the debug node's arguments instead of appending extra_debug_args to the caller's existing list in place. The PR objectives describe the same fix, which forwards debug-only arguments through a new list and leaves caller-owned arguments unchanged. The title is specific and concise, has no file lists or vague terms, and is a single sentence.

Full details: Linked Issues check

Explanation

Issue #4016 requires two behaviors. (1) The debug node must receive extra_debug_args when no base arguments are given. (2) Caller-owned argument lists must not change. In launch_utils.py at head, arguments = kwargs.pop("arguments", None) followed by if extra_debug_args: arguments = [*(arguments or []), *extra_debug_args] covers both. With no base arguments, the debug node receives ["--debug"]. With a base list, the code builds a new list and does not call += or append on the caller's list. The standard node is created before the pop, so it still receives the original arguments object, which is no longer mutated. The added parameterized test in test_debuggable_node.py checks the omitted, empty, and nonempty base cases. The test uses mocked Node constructors, as the issue environment describes. Remaining CI integration is not a requirement of the issue.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base 5399d29 changes only moveit_configs_utils/moveit_configs_utils/launch_utils.py (the add_debuggable_node argument handling) and adds a regression test in moveit_configs_utils/test/test_debuggable_node.py. Both changes serve issue #4016. No unrelated changes were found in the inspected diff.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5399d29 and 7e1b4ca.

Files selected for processing: 2

  • moveit_configs_utils/moveit_configs_utils/launch_utils.py
  • moveit_configs_utils/test/test_debuggable_node.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.

@mergify

mergify Bot commented Nov 29, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

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.

add_debuggable_node drops debug-only arguments and mutates caller lists

1 participant