Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
まず tests/test_workflow_step_submission.py の test_fetch_keeps_malicious_text_in_one_argument_even_if_validation_is_bypassed から始め、次に fixture を tests/extensions/test_extension_agent_context.py の _ensure_test_python_on_path() または tests/parity_helpers.py の make_python3_path_shim() と比較します。偽の curl fixture を更新し、引数の動作を維持しながら、空白を含むインタープリターのパスを処理できるようにします。空白を含むチェックアウトパスからパラメータ化テストが成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
tests/test_workflow_step_submission.py::test_fetch_keeps_malicious_text_in_one_argument_even_if_validation_is_bypassed fails 4 times (one per parametrized suffix) when the spec-kit checkout lives under a path containing whitespace, e.g. ~/Downloads/GitHub Contribution/spec-kit:
E step_submission_verifier.Blocked: cannot download https://...: [Errno 2] No such file or directory: 'curl'
Root cause
The fixture writes its fake curl with a #!{sys.executable} shebang. On macOS the XNU kernel splits the shebang line on whitespace, so an interpreter path like /Users/me/Downloads/GitHub Contribution/spec-kit/.venv/bin/python is parsed as interpreter /Users/me/Downloads/GitHub with argument Contribution/... — execve fails with ENOENT and the test reports "No such file or directory: 'curl'".
GitHub CI never sees this (runner paths have no spaces), but any contributor cloning into a directory with a space in the name — common on desktop OSes — hits it. The repo already solves this exact problem elsewhere: _ensure_test_python_on_path() in tests/extensions/test_extension_agent_context.py and make_python3_path_shim() in tests/parity_helpers.py both route through #!/usr/bin/env sh with shlex.quoted interpreter paths.
Suggested fix
Apply the same established pattern in this fixture: write a #!/bin/sh wrapper that execs the quoted interpreter with -c and the quoted Python payload. With -c, sys.argv[1:] is exactly the argument list curl was invoked with, so the test's assertions (len(args) == 14, args[-1] == url) are unchanged.
Minimal repro of the kernel behavior (outside the test suite):
mkdir -p "/tmp/space test"
printf '#!/tmp/space test/python\nprint(1)\n' > /tmp/script
chmod +x /tmp/script
ln -s "$(command -v python3)" "/tmp/space test/python"
/tmp/script # macOS: [Errno 2] No such file or directory
Observed on macOS 15 (Apple Silicon), Python 3.12.16, spec-kit main at 08252af.
AI disclosure
Issue filed after diagnosis performed with AI assistance: OpenCode running GLM 5.3 Flash (Z.ai), agent mode under human supervision by @mehdikarimi55; reproduction, root-cause analysis (macOS shebang splitting), and verification of the sh-wrapper fix.
- 主要言語
- Python
- スター
- 149k
- フォーク
- 13.4k
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 223
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/spec-kit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
triage-must-have
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)対応中かも @mehdikarimi55 が 3 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug triage-out-of-scope
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
triage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
github/spec-kit の issue をすべて見る
似ている issue
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL ports対応中かも @himanchalkaushale が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OWASP/Nettacker#1884 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
A-connection-core C-enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
aws-samples/sample-per-model-bedrock#869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
fzn0x/watchtower#17 ·