Resolve Windows .cmd and .bat shims in the harness-config audit's server-command check

オープン 初心者向け
#20,960 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
shell
領域
tooling

調査の方向性

plugins/harness-config/skills/audit/scripts/audit-engine.sh の裸のコマンド分岐と、audit-engine.test.sh の関連チェックを読みます。#19808 は lib/prerequisites.mjs で先例として引用されています。Windows ホストと .cmd shim を偽装するテストを追加し、監査でそれに対して command-resolves が報告され、コマンドを解決するホストがない場合は引き続き command-missing:<server> が報告されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Context

Item 1 of #20519, split out because #20933 closes #20519 with changes for items 2-5 (item 2 still had three open review regressions at filing) and none for this item. The harness-config audit's C/server-command check resolves a stdio MCP server's bare command with command -v "$cmd" (plugins/harness-config/skills/audit/scripts/audit-engine.sh, the bare-command branch). Git Bash does not resolve .cmd or .bat shims through command -v, so a server launched through a shim (for example dnx, which where.exe resolves to dnx.cmd) is reported command-missing though it starts.

Proposed work

  • In the bare-command branch, on a Windows host ($OSTYPE msys or cygwin), also try command -v "$cmd.cmd", "$cmd.bat" and "$cmd.exe" (or where.exe) before reporting command-missing. Precedent: #19808 made lib/prerequisites.mjs probe the same way.
  • Keep the Linux and macOS paths unchanged.

Acceptance criteria

  • On a Windows host, a stdio MCP server whose command resolves only as <name>.cmd on PATH yields command-resolves, covered by a test in audit-engine.test.sh that fakes the shim and the host type.
  • A bare command that resolves on no host still yields command-missing:<server>.

Refs: #20519, #20933

🤖 Generated with Claude Code

主要言語
Shell
スター
22
フォーク
2
平均マージ
3時間 4分
マージ済み PR(30日)
941

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

melodic-software/claude-code-plugins のほかの issue

melodic-software/claude-code-plugins の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。