Skip to content

ci(lobster): fix flakey test windows cmd shim script resolution#20833

Merged
vincentkoc merged 1 commit intoopenclaw:mainfrom
vincentkoc:vincentkoc-code/lobster-windows-cmd-shim-parsing
Feb 19, 2026
Merged

ci(lobster): fix flakey test windows cmd shim script resolution#20833
vincentkoc merged 1 commit intoopenclaw:mainfrom
vincentkoc:vincentkoc-code/lobster-windows-cmd-shim-parsing

Conversation

@vincentkoc
Copy link
Contributor

@vincentkoc vincentkoc commented Feb 19, 2026

Summary

  • Fix Windows .cmd/.bat shim resolution in Lobster plugin when launching through resolveWindowsLobsterSpawn.
  • Make cmd-wrapper parsing robust for rooted %dp0% / %~dp0% token variants so valid wrappers resolve to Node entrypoints without shell execution.
  • Preserve existing security posture by continuing to reject wrappers that cannot be resolved without shell.

Changes

  • extensions/lobster/src/windows-spawn.ts
    • Harden resolveLobsterScriptFromCmdShim to parse %dp0%-style arguments more flexibly and normalize candidate paths reliably.
  • extensions/lobster/src/lobster-tool.test.ts
    • Add regression test for rooted %dp0% shim format in Windows path handling.

Validation

  • Unit tests updated/covered in extensions/lobster/src/lobster-tool.test.ts.
  • This PR is focused and does not include a full suite run.

Greptile Summary

Fixes Windows cmd shim resolution to handle rooted %dp0% token variants. The updated parser now extracts all quoted strings first, then checks for %dp0%/%~dp0% tokens within them, making it robust to different formatting styles. Includes regression test for rooted token format ("%dp0%\\..\\path"). Security posture preserved - continues to reject wrappers that require shell execution.

Confidence Score: 5/5

  • Safe to merge - focused fix for Windows cmd shim parsing with test coverage
  • The changes are well-scoped, add robustness to path parsing without changing security model, include regression test coverage, and follow existing code patterns
  • No files require special attention

Last reviewed commit: a829c4f

@openclaw-barnacle openclaw-barnacle bot added extensions: lobster Extension: lobster size: S maintainer Maintainer-authored PR labels Feb 19, 2026
@vincentkoc vincentkoc changed the title lobster: fix windows cmd shim script resolution ci(lobster): fix flakey test windows cmd shim script resolution Feb 19, 2026
@vincentkoc vincentkoc marked this pull request as ready for review February 19, 2026 10:31
@vincentkoc vincentkoc merged commit 1faa7a8 into openclaw:main Feb 19, 2026
26 checks passed
kittipond2365 pushed a commit to kittipond2365/openclaw that referenced this pull request Feb 19, 2026
anschmieg pushed a commit to anschmieg/openclaw that referenced this pull request Feb 19, 2026
yneth-ray-openclaw pushed a commit to yneth-ray-openclaw/openclaw that referenced this pull request Feb 19, 2026
vignesh07 pushed a commit to pahdo/openclaw that referenced this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: lobster Extension: lobster maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments