Reject invalid ExecuteProcess boolean attributes#984
Open
Old-Ding wants to merge 1 commit into
Open
Conversation
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>
|
Tick the box to add this pull request to the merge queue (same as
|
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 invalid string values for the static
ExecuteProcessfrontend attributesshellandemulate_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
TypeErrorinstead of silently enablingshellor 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 passedpytest launch_xml/test/launch_xml: 30 passedpytest launch_yaml/test/launch_yaml: 18 passedpytest launch/test/test_flake8.py: 1 passedpytest launch_xml/test/test_flake8.py: 1 passedpytest launch_yaml/test/test_flake8.py: 1 passed