Reject invalid GroupAction boolean attributes#982
Open
Old-Ding wants to merge 1 commit into
Open
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
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>
9c4691e to
34105a3
Compare
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.
Description
Reject non-boolean values for
GroupActionXML and YAMLscopedandforwardingattributes 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
scopedandforwardingvalues now fail launch-file parsing with aTypeErrorinstead 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 passedpytest launch_yaml/test/launch_yaml/test_group.py: 3 passedpytest launch/test/launch/actions/test_group_action.py: 2 passedament_flake8,ament_pep257, andament_copyrighton all three changed filesgit diff --check