Skip to content

BF-2201: Align setupCommands mount tests with shellWord quoting - #1737

Merged
swu-rob[bot] merged 1 commit into
mainfrom
Muse-Assist/bf-2201-shellword-mount-assertions
Nov 10, 2026
Merged

swu-rob[bot] merged 1 commit into
mainfrom
Muse-Assist/bf-2201-shellword-mount-assertions

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Aligns setupCommands mount display assertions with centralized shellWord quoting 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 exported shellWord() using an allowlist of bare shell tokens (letters, digits, and _@%+=:,./-) and single-quotes all other words. Displayed setupCommands now 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 --mount assertions to expect shellWord() 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 cmd pasting remains unverified.

Review findings — open

  • [medium] server/container-computer.test.ts:1453: mount assertions compare shellWord output to itself.
  • [medium] server/container-computer.ts:1998: single-quote shell quoting breaks paste into cmd.

Testing

Patch updates existing setupCommands assertions to use shellWord; no test-run evidence, deployment verification, or runtime validation is included in the changes. Verification is unverified.

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>
@linear-code

linear-code Bot commented Nov 10, 2026

Copy link
Copy Markdown

BF-2201

Comment thread server/container-computer.ts Resolved
@kody-ai

kody-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

Automatic approval held: The review is not clean.

Comment thread server/container-computer.test.ts Resolved
Comment thread server/container-computer.ts Resolved
@kody-ai

kody-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Automatic approval held

Kody's assessment:

Stricter shellWord quoting changes all setupCommands display output including Windows paths, tests now assert via shellWord itself, prior checks failed and secret-scanner bypass is unverified, so human must inspect.

@swu-rob
swu-rob Bot merged commit 0a88817 into main Nov 10, 2026
28 checks passed
@swu-rob
swu-rob Bot deleted the Muse-Assist/bf-2201-shellword-mount-assertions branch November 10, 2026 03:12
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.

2 participants