Repository navigation
Conversation
Render the automation worker launch line for the pane's shell once the pane exists. PowerShell gets the call operator and a literal single-quoted path, cmd keeps double quotes, and POSIX shells keep single quotes and the LUVUS_TASK_ID prefix. Share shell classification with the manual task runner. Closes RizRiyz#507
Split the configured shell on both path separators instead of using Path::file_name, which ignores backslashes on Unix. Panes still use POSIX syntax on Unix; this only lets the classification test cover Windows shell paths on Unix CI.
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.
Summary
Scheduled automation workers now start when the pane shell is PowerShell (
pwshor Windowspowershell). Before this change the worker pane printed aParserError, the run stayedrunningforever, and with the defaultoverlap: skipevery later occurrence wasskipped. cmd and POSIX shells behave as before.Closes RizRiyz#507
What
src/app/board.rs:WorkerShell(Posix,PowerShell,Cmd). It classifies the pane's shell by executable name, case-insensitively, with or without.exeand a path. Unix panes always usePosix; an unrecognised Windows shell keeps the POSIX form, asmanual_agent_runner_linealready did.automation_agent_launch_linenow validates and returns anAutomationWorkerLaunch(executable, task, automation and run ids). The line is rendered intask_startonce the worker pane exists, because its syntax depends on that pane's shell:& 'C:\…\luvus.exe' __automation-worker t1 a1 r1. The call operator is required; the path is a literal single-quoted string, so$and backticks don't expand, and every quote character PowerShell recognises (including typographic ones) is doubled."C:\…\luvus.exe" __automation-worker t1 a1 r1, unchanged.LUVUS_TASK_ID=t1 '/…/luvus' __automation-worker t1 a1 r1on Unix, unchanged. Git Bash on Windows keeps the form without the prefix, as before.[A-Za-z0-9_.-]stay bare; anything else is quoted for the shell.manual_agent_runner_lineuses the same classification. Its output is unchanged.shell_quoteis removed. Its only remaining caller, a Unix-only test, usesWorkerShell::Posix.quote.current_exe) directly, as before.Why
automation_agent_launch_linealways sent"<exe>" __automation-worker …on Windows. PowerShell parses a leading quoted string as an expression, so the next token fails:It fails before any agent starts, so it affects every agent, and nothing reports the failure. The run and its ORCH task stay
running, andoverlap: skipturns every later occurrence intoskipped("previous run is still active"). Manual tasks already used&for PowerShell inmanual_agent_runner_line; scheduled workers didn't.Screenshots
The same scheduled Claude automation in both cases:
{"shell": "pwsh"},--every 60, workspace mode,read-only, isolatedLUVUS_HOME, PowerShell 7.6.6.Before, on
main(0062178): the worker pane rejects the launch line with aParserError.Before: the run history shows the later occurrences skipped because the first run is still "active".
With this PR: the worker pane runs
& '…luvus.exe' __automation-worker t3 a1 r3and Claude answersOK.With this PR: three consecutive occurrences finished.
CLI output, before and after
Verification
Windows 11, rebased on
0062178.cargo fmt --all --check(Rust 1.99.0, the current stable used by CI)cargo clippy --all-targets -- -D warnings(Rust 1.99.0, Windows)app::board:worker_shell_classifies_configured_windows_shellsautomation_worker_line_uses_the_powershell_call_operator(paths with spaces,',$, backticks, typographic quotes, ids that need quoting)automation_worker_line_for_cmd_quotes_without_call_operatorautomation_worker_line_for_posix_shells_single_quotes(with and without theLUVUS_TASK_IDprefix)manual_runner_line_matches_the_shell_familyautomation_commands_use_reviewed_headless_access_profilesupdated for the new return type; all 79app::board::testspass after the rebase.LUVUS_HOMEand named sessions. The production server was not touched.{"shell": "pwsh"}, Claude,--every 60: r1, r2 and r3succeeded, tasksdone, nothing skipped.{"shell": "cmd"}, Claude,automation run: r1succeeded, launch line unchanged.mainreproduced the bug (r1 stuckrunning, r2 and r3skipped).cargo test --locked: not run in full on this Windows checkout, which has about 25 pre-existing failures on unmodifiedmain. CI covers the full suite on Ubuntu and macOS.Notes
claude.exe). Agents installed as npm.cmdshims, such as Codex, fail to start for a separate reason tracked in On Windows, ORCH and scheduled workers cannot start agents installed as npm .cmd shims RizRiyz/luvus#508.powershell.exe) and POSIX shells on Linux/macOS are covered by unit tests only; the live run used PowerShell 7.6 and cmd.%VAR%inside the executable path can still expand. That was already the case before this change.