Skip to content

runner: preserve quoted command arguments - #106

Open
KE7 wants to merge 1 commit into
AMDResearch:mainfrom
KE7:runner-command-quoting
Open

KE7 wants to merge 1 commit into
AMDResearch:mainfrom
KE7:runner-command-quoting

Conversation

@KE7

@KE7 KE7 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Quoted command overrides such as ryzers run "python -c 'print(1 + 2)'" are split by the generated script's unquoted $1, causing errors such as the one reported while reviewing #105.

Parse the override once with shlex.split() and forward individual arguments with "$@". Existing generated scripts are adapted in memory when launched through Ryzers; their files and images are unchanged. Commands that need shell expansion explicitly invoke a container shell.

  • Add CPU-only regression tests and CI for quoting, spaces, Unicode, empty arguments, literal wildcards/metacharacters, explicit shell pipelines, default commands, old scripts and error handling.
  • Document command semantics and correct PyDrake's unsupported ryzers run -it bash example; interactive flags are already enabled by default.

Validation:

  • All 212 documented examples across 64 files: 138 run examples checked through the actual CLI and both script formats with a Docker argument recorder; 74 build examples checked through the CLI parser.
  • Tests pass on Python 3.8, 3.11 and 3.12. The argument regression matrix fails against the original runner.
  • Four actual CPU Docker/CLI launches verify Python arguments and shell pipelines with both script formats. This validates launching, not every package's model execution.

This branch has not been deployed

No deployments
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