Skip to content

Reject invalid GroupAction boolean attributes#982

Open
Old-Ding wants to merge 1 commit into
ros2:rollingfrom
Old-Ding:codex/group-boolean-attributes
Open

Reject invalid GroupAction boolean attributes#982
Old-Ding wants to merge 1 commit into
ros2:rollingfrom
Old-Ding:codex/group-boolean-attributes

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 10, 2026

Copy link
Copy Markdown

Description

Reject non-boolean values for GroupAction XML and YAML scoped and forwarding attributes instead of retaining them as strings and treating them as truthy. Add regression coverage for both frontends and both attributes.

Fixes #970

Is this user-facing behavior change?

Yes. Invalid scoped and forwarding values now fail launch-file parsing with a TypeError instead of silently enabling the option.

Did you use Generative AI?

Yes. OpenAI Codex (GPT-5) was used to trace the parser data flow, implement the validation change, add tests, and review the diff. The contributor reviewed and locally validated the final change.

Additional Information

Local validation:

  • pytest launch_xml/test/launch_xml/test_group.py: 3 passed
  • pytest launch_yaml/test/launch_yaml/test_group.py: 3 passed
  • pytest launch/test/launch/actions/test_group_action.py: 2 passed
  • ament_flake8, ament_pep257, and ament_copyright on all three changed files
  • Python bytecode compilation
  • git diff --check

@mergify

mergify Bot commented Jul 10, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

The XML and YAML frontends can preserve values that fail boolean conversion as strings. Require GroupAction scoped and forwarding attributes to convert to bool so invalid values raise TypeError instead of being treated as truthy.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
@Old-Ding Old-Ding force-pushed the codex/group-boolean-attributes branch from 9c4691e to 34105a3 Compare July 12, 2026 18:40
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.

XML: GroupAction boolean attributes (scoped, forwarding) accept arbitrary strings as truthy values

1 participant