Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 83/100
Direção de pesquisa
Comece com test_fetch_keeps_malicious_text_in_one_argument_even_if_validation_is_bypassed em tests/test_workflow_step_submission.py e, em seguida, compare o fixture com _ensure_test_python_on_path() em tests/extensions/test_extension_agent_context.py ou make_python3_path_shim() em tests/parity_helpers.py. Atualize o fixture falso de curl para lidar com caminhos do interpretador que contenham espaços, preservando o comportamento dos argumentos. O trabalho estará concluído quando o teste parametrizado passar a partir de um caminho de checkout que contenha espaços.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 149k
- Forks
- 13.4k
- Merge médio
- 1d 5h
- PRs com merge (30d)
- 223
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/spec-kit
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
triage-must-have
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)Talvez já em andamento @mehdikarimi55 assumiu há 3 dias. Abertatriage-must-have
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
bug triage-out-of-scope
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Mantenedores costumam responder em até 1 dia
-
triage-must-have
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
Todas as issues de github/spec-kit
Issues semelhantes
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL portsTalvez já em andamento @himanchalkaushale assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
OWASP/Nettacker#1884 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
A-connection-core C-enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
aws-samples/sample-per-model-bedrock#869 ·
Mantenedores costumam responder em até 1 dia
-
Spec: say that included_antigen_sources gates LENS labels; do not merge it into antigen kindsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
fzn0x/watchtower#17 ·