[Bug]: `create-new-feature.sh` rejects the feature descriptions `-n`, `-e` and `-E`, which the Python script accepts
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 82/100
Direção de pesquisa
Leia scripts/bash/create-new-feature.sh por volta da linha 93, onde a descrição é truncada, e compare com o comportamento do Python em scripts/python/create_new_feature.py. Comece executando a reprodução no issue ou os testes de paridade em tests/test_create_new_feature_python_parity.py. O trabalho estará concluído quando bash aceitar descrições como -n e -e e produzir a mesma saída que o Python; o comportamento de argumentos vazios também será registrado como uma lacuna de paridade relacionada.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Bug Description
scripts/bash/create-new-feature.sh:93 trims the description with FEATURE_DESCRIPTION=$(echo "$FEATURE_DESCRIPTION" | sed -E ...). When the description is exactly an echo option word (-n, -e, -E, or a combination such as -neE), bash's builtin echo treats it as an option and prints nothing. The script then exits 1 with "Feature description cannot be empty or contain only whitespace". The Python twin, scripts/python/create_new_feature.py, accepts the same input and creates 001-n. The two variants therefore disagree.
Steps to Reproduce
From a fresh clone, after uv sync, save the script below and run uv run python -I repro.py from the repository root. It copies both script variants into a temporary project and runs them with --json --dry-run.
import shutil, subprocess, sys, tempfile
from pathlib import Path
repo = Path(tempfile.mkdtemp())
for sub, files in [("bash", ["common.sh", "create-new-feature.sh"]),
("python", ["common.py", "create_new_feature.py"])]:
d = repo / ".specify" / "scripts" / sub
d.mkdir(parents=True)
for f in files:
shutil.copy(Path("scripts") / sub / f, d / f)
for desc in ["-n", "-e", "-E", "-neE"]:
for name, cmd in [
("bash", ["bash", ".specify/scripts/bash/create-new-feature.sh"]),
("python", [sys.executable, ".specify/scripts/python/create_new_feature.py"]),
]:
r = subprocess.run(cmd + ["--json", "--dry-run", desc], cwd=repo,
capture_output=True, text=True)
out = (r.stdout or r.stderr).strip()
print(f"{desc:5} {name:6} rc={r.returncode} {out[:80]}")
Expected Behavior
Both variants should treat the description as text and produce the same branch name (for example 001-n). The bash script's own comment at scripts/bash/create-new-feature.sh:220-221 says it uses "printf instead of echo, so a name of "-n"/"-e"/"-E" is text, not options". tests/test_create_new_feature_python_parity.py asserts that the variants produce identical output (for example lines 444 and 752).
Actual Behavior
-n bash rc=1 Error: Feature description cannot be empty or contain only whitespace
-n python rc=0 {"BRANCH_NAME":"001-n","SPEC_FILE":"/tmp/tmpimfdrmab/specs/001-n/spec.md","FEATU
-e bash rc=1 Error: Feature description cannot be empty or contain only whitespace
-e python rc=0 {"BRANCH_NAME":"001-e","SPEC_FILE":"/tmp/tmpimfdrmab/specs/001-e/spec.md","FEATU
-E bash rc=1 Error: Feature description cannot be empty or contain only whitespace
-E python rc=0 {"BRANCH_NAME":"001-e","SPEC_FILE":"/tmp/tmpimfdrmab/specs/001-e/spec.md","FEATU
-neE bash rc=1 Error: Feature description cannot be empty or contain only whitespace
-neE python rc=0 {"BRANCH_NAME":"001-nee","SPEC_FILE":"/tmp/tmpimfdrmab/specs/001-nee/spec.md","F
Specify CLI Version
1.2.4.dev0 (main at 27d14e2)
AI Agent
Not applicable
Operating System
Linux 6.18 (Ubuntu container)
Python Version
Python 3.12.3
Error Logs
Error: Feature description cannot be empty or contain only whitespace
Additional Context
Using printf '%s\n' "$FEATURE_DESCRIPTION" on line 93 would match the approach the script already uses elsewhere.
A smaller related parity gap: for a single empty argument (create-new-feature.sh ""), bash prints the Usage line, while the Python script prints "Error: Feature description cannot be empty or contain only whitespace" (scripts/python/create_new_feature.py:150-156). Both exit 1.
Also reproduced on macOS (Darwin 25.6, arm64) with Python 3.14.4 and uv run python -I repro.py against 27d14e2; the output matches the above.
AI Disclosure
Found and reproduced with Claude Code (model: Claude Opus 4.8), run autonomously under human supervision. The human reporter re-ran every reproduction above before filing.
- Linguagem predominante
- Python
- Estrelas
- 144k
- Forks
- 12.9k
- Merge médio
- 1d 6h
- PRs com merge (30d)
- 194
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
-
The Python branch-creation port accepts an oversized `--number` and crashes at `int()` instead of rejecting itTalvez já em andamento @github-actions assumiu há 4 dias. Abertabug-assess bug-fix bug-test fix-proposed severity-low tests-passing triage-can-wait
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
github/spec-kit#5194 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: `bundle init <bundle>` initialises with the default integration instead of the bundle's, then aborts with a clashTalvez já em andamento @chelsealong assumiu há 10 dias. Abertatriage-must-have
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
[Bug]: `specify preset set-priority` does not update agent command files that are already writtenTalvez já em andamento @mikamikasuki assumiu há 9 dias. Abertatriage-must-have
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
[Bug]: Local config override file name differs between the docs (`<id>-config.local.yml`) and ConfigManager (`local-config.yml`)Talvez já em andamento @gavenren assumiu há 6 dias. Abertatriage-must-have
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
[Bug]: Extension alias conflict check misses spellings that map to the same file, so one extension overwrites and then deletes another's aliasTalvez já em andamento @chelsealong assumiu há 8 dias. Abertatriage-must-have
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
Todas as issues de github/spec-kit
Issues semelhantes
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
QuantConnect/Documentation#2838 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
awslabs/route53-dynamic-dns-with-lambda#67 · 1 comentário ·
-
`SubAgents` returns a child run's `DeferredToolRequests` to the parent as a successful tool resultAbertabug pkg:harness
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
pydantic/pydantic-ai#12405 ·
Mantenedores costumam responder em até 1 dia
-
good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
good first issue help wanted
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100