Skip to content

Reject invalid ExecuteProcess boolean attributes#984

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

Reject invalid ExecuteProcess boolean attributes#984
Old-Ding wants to merge 1 commit into
ros2:rollingfrom
Old-Ding:codex/execute-process-boolean-attributes

Conversation

@Old-Ding

Copy link
Copy Markdown

Description

Reject invalid string values for the static ExecuteProcess frontend attributes shell and emulate_tty.

Both attributes are consumed directly as booleans. The frontend previously allowed failed XML conversions and YAML string values to pass through unchanged, causing any non-empty string to be treated as true. This change requires an actual boolean conversion and adds regression coverage for both attributes in the XML and YAML frontends.

Is this user-facing behavior change?

Yes. Valid XML boolean values and YAML booleans continue to work. Invalid strings now fail launch-file parsing with a TypeError instead of silently enabling shell or TTY emulation.

Did you use Generative AI?

Yes. OpenAI Codex (GPT-5) was used to audit the frontend 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/test/launch: 279 passed
  • pytest launch_xml/test/launch_xml: 30 passed
  • pytest launch_yaml/test/launch_yaml: 18 passed
  • pytest launch/test/test_flake8.py: 1 passed
  • pytest launch_xml/test/test_flake8.py: 1 passed
  • pytest launch_yaml/test/test_flake8.py: 1 passed

The shell and emulate_tty frontend attributes are static booleans. Prevent XML and YAML parsers from preserving invalid strings, which would otherwise be consumed as truthy values.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
@mergify

mergify Bot commented Jul 11, 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

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.

1 participant