Repository navigation
BF-2201: Align setupCommands mount tests with shellWord quoting - #1737
Conversation
Export shellWord for setup command display strings and use the allowlist quoting rule so Windows bind-mount words are single-quoted in previews. Update container-computer mount expectations to call shellWord instead of hard-coding unquoted mount specs. Co-authored-by: Jay Wedgeworth <jaywedgeworth22@users.noreply.github.com>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
Automatic approval held: The review is not clean. |
|
Automatic approval held Kody's assessment:
|
Summary
Aligns
setupCommandsmount display assertions with centralizedshellWordquoting for BF-2201. Exported helper standardizes how pastable setup commands are quoted for shell use.Changes
server/container-computer.ts: promotes inline quoting logic to exportedshellWord()using an allowlist of bare shell tokens (letters, digits, and _@%+=:,./-) and single-quotes all other words. DisplayedsetupCommandsnow quote mount and other arguments containing whitespace,!, backslash, or other non-bare characters.server/container-computer.test.ts: updates Docker and rootless Podman durable-workspace--mountassertions to expectshellWord()output.User-visible / operational impact
Pasted setup commands may now show single-quoted mount specifications when paths contain Windows separators or other special characters. No runtime container behavior is changed; change affects display text only. Quoting behavior for
cmdpasting remains unverified.Review findings — open
server/container-computer.test.ts:1453: mount assertions compareshellWordoutput to itself.server/container-computer.ts:1998: single-quote shell quoting breaks paste into cmd.Testing
Patch updates existing
setupCommandsassertions to useshellWord; no test-run evidence, deployment verification, or runtime validation is included in the changes. Verification is unverified.