Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 83/100
Hướng nghiên cứu
Bắt đầu với test_fetch_keeps_malicious_text_in_one_argument_even_if_validation_is_bypassed trong tests/test_workflow_step_submission.py, sau đó so sánh fixture với _ensure_test_python_on_path() trong tests/extensions/test_extension_agent_context.py hoặc make_python3_path_shim() trong tests/parity_helpers.py. Cập nhật fixture curl giả để xử lý các đường dẫn trình thông dịch có chứa khoảng trắng mà vẫn giữ nguyên cách xử lý đối số. Hoàn tất khi kiểm thử tham số hóa chạy thành công từ một đường dẫn checkout có chứa khoảng trắng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 149k
- Fork
- 13.4k
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 223
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/spec-kit
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage-must-have
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)Có thể đã có người làm @mehdikarimi55 đã nhận 3 ngày trước. Đang mởtriage-must-have
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage-out-of-scope
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage-must-have
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của github/spec-kit
Issue tương tự
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL portsCó thể đã có người làm @himanchalkaushale đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
OWASP/Nettacker#1884 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A-connection-core C-enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
aws-samples/sample-per-model-bedrock#869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Spec: say that included_antigen_sources gates LENS labels; do not merge it into antigen kindsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
fzn0x/watchtower#17 ·