Repository navigation
Fix ssh attach script syntax error with compound commands - #9448
lintanghui wants to merge 1 commit into
Conversation
…ith syntax error near ` Automated fix generated by autogit. Closes manaflow-ai#9443
📝 WalkthroughWalkthroughThe SSH PTY attach retry scripts now export retry-state variables on separate shell lines. Regression tests validate POSIX syntax and retry-budget propagation for compound attach commands. ChangesSSH PTY attach shell generation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for tracking this down, @lintanghui! The same ssh attach script syntax error got fixed on main in #9425 the same day, so this one's covered. Your |
) Adds a /bin/sh -n regression test for SSHPTYAttachRetryScriptBuilder with a compound attach command, and checks the loop still exports the retry budget to the command it runs. #9425 fixed the generator and covered noProgressRetryLoopLines; this covers the main retry builder. Salvaged from #9448. Co-authored-by: Tanghui Lin <xmutanghui@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Your |
The persistent ssh attach loop passes the attach environment as an assignment prefix (
VAR=... <command>). A prefix like that is only valid before a simple command; when the caller's command is a compound command the generated script is a POSIX syntax error, which is what brokecmux sshstartup on 0.64.21.Export the three attach variables on their own lines before invoking the command instead, in both the retry script builder and the shared attach loop. Doc comments on both builders note the constraint.
Fixes #9443