Summary
Generated scheduler scripts expand $REMOTE_ROOT without shell quoting. Any LocalContext or SSH configuration whose remote root contains whitespace is split into multiple arguments, so cd, source, marker-file writes, and failure diagnostics target the wrong path and the job is reported as failed after retries.
Reproduction
A minimal Shell + LocalContext submission with remote_root set to a path such as /tmp/dpdispatcher/remote root and a task such as echo hello fails on current master. The generated script contains commands like:
cd $REMOTE_ROOT
echo 0 > $REMOTE_ROOT/<job>_flag_if_job_task_fail
The shell treats the expanded path as multiple words; the task never reaches its intended working directory. The same unquoted expansion is used by source $REMOTE_ROOT/<job>.sub.run, the task script, and the PEP 723 script path appended in dpdispatcher/run.py.
This is consistent with the path-with-spaces failure reported in the older #648 discussion, but the current master code still emits the unquoted expansions.
Expected behavior
Remote roots containing spaces should either execute correctly or be rejected explicitly. Since path values are already accepted and quoted when REMOTE_ROOT is initialized, generated uses should preserve the path as one shell word.
Suggested fix
Use quoted variable expansions such as "$REMOTE_ROOT/..." (or ${REMOTE_ROOT} inside double quotes) at every generated-script use, including the PEP 723 script argument. Add a local execution regression test with a remote root containing spaces.
Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh
Summary
Generated scheduler scripts expand
$REMOTE_ROOTwithout shell quoting. AnyLocalContextor SSH configuration whose remote root contains whitespace is split into multiple arguments, socd,source, marker-file writes, and failure diagnostics target the wrong path and the job is reported as failed after retries.Reproduction
A minimal
Shell+LocalContextsubmission withremote_rootset to a path such as/tmp/dpdispatcher/remote rootand a task such asecho hellofails on currentmaster. The generated script contains commands like:The shell treats the expanded path as multiple words; the task never reaches its intended working directory. The same unquoted expansion is used by
source $REMOTE_ROOT/<job>.sub.run, the task script, and the PEP 723 script path appended indpdispatcher/run.py.This is consistent with the path-with-spaces failure reported in the older #648 discussion, but the current
mastercode still emits the unquoted expansions.Expected behavior
Remote roots containing spaces should either execute correctly or be rejected explicitly. Since path values are already accepted and quoted when
REMOTE_ROOTis initialized, generated uses should preserve the path as one shell word.Suggested fix
Use quoted variable expansions such as
"$REMOTE_ROOT/..."(or${REMOTE_ROOT}inside double quotes) at every generated-script use, including the PEP 723 script argument. Add a local execution regression test with a remote root containing spaces.Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh