Skip to content

Fix launcher option replacement guard - #400

Merged
huangminghuang merged 1 commit into
codex/port-sharded-np-lr-testsfrom
codex/launcher-option-port-fix
Jun 12, 2026
Merged

Fix launcher option replacement guard#400
huangminghuang merged 1 commit into
codex/port-sharded-np-lr-testsfrom
codex/launcher-option-port-fix

Conversation

@huangminghuang

Copy link
Copy Markdown
Contributor

Summary

Fix TestHarness launcher option replacement when an option is followed by another option instead of a value.

What changed

  • Add _is_command_option() to identify command-line option tokens.
  • Guard option-value removal with a bounds check and only remove the next token when it is actually a value.

Why

The port-sharded test changes in PR #369 rely on overriding generated nodeop arguments. The existing replacement logic can treat the following --option as a value and remove it, or read past the end of the command list.

Testing

  • python3 -m py_compile tests/TestHarness/launcher.py
  • git diff --check

Notes

@huangminghuang
huangminghuang merged commit 7144d19 into codex/port-sharded-np-lr-tests Jun 12, 2026
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