[Bug]: `create-new-feature.sh` rejects the feature descriptions `-n`, `-e` and `-E`, which the Python script accepts
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 82/100
Piste de recherche
Lisez scripts/bash/create-new-feature.sh autour de la ligne 93, là où la description est tronquée, et comparez avec le comportement de Python dans scripts/python/create_new_feature.py. Commencez par exécuter la reproduction dans l’issue ou les tests de parité dans tests/test_create_new_feature_python_parity.py. Le travail est terminé lorsque bash accepte des descriptions telles que -n et -e et produit la même sortie que Python ; le comportement des arguments vides est également signalé comme une lacune de parité connexe.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 144k
- Forks
- 12.9k
- Merge moyen
- 1 j 4 h
- PR mergées (30 j)
- 181
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/spec-kit
-
bundle catalog add rewrites Windows drive paths as POSIX pathsPeut-être pris @chelsealong l’a pris il y a 2 jours. Ouvertetriage-must-have
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
The Python branch-creation port accepts an oversized `--number` and crashes at `int()` instead of rejecting itPeut-être pris @github-actions l’a pris il y a 3 jours. Ouvertebug-assess bug-fix fix-proposed severity-low triage-can-wait
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
github/spec-kit#5194 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: Cline extension and preset commands have `speckit.*.md` file names rewritten to `speckit-*-md`Peut-être pris @kevin9327 l’a pris il y a 5 jours. Ouvertetriage-can-wait
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: `bundle init <bundle>` initialises with the default integration instead of the bundle's, then aborts with a clashPeut-être pris @chelsealong l’a pris il y a 9 jours. Ouvertetriage-must-have
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: `specify preset set-priority` does not update agent command files that are already writtenPeut-être pris @mikamikasuki l’a pris il y a 9 jours. Ouvertetriage-must-have
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de github/spec-kit
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
elviskahoro/sdk-python-attio#144 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
RenyiELBO raises TypeError when model has no sample sitesPeut-être pris @alibb007 l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour