[Bug]: create-new-feature.sh reserves feature numbers non-atomically — concurrent invocations can share/overwrite a spec directory
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bash
- Lĩnh vực
- tooling
Hướng nghiên cứu
Bắt đầu với .specify/scripts/bash/create-new-feature.sh và truy vết cách nó quét specs/, chọn một số, tạo thư mục và ghi spec.md. So sánh quy trình này với phần “Create the directory and spec file” trong .claude/skills/speckit-specify/SKILL.md. Hoàn thành có nghĩa là các lần gọi đồng thời sẽ dành riêng các thư mục khác nhau và không lần gọi nào ghi đè lên spec.md của lần gọi khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
spec-kit v1.0.1 (.specify/scripts/bash/create-new-feature.sh; the flow is also described in .claude/skills/speckit-specify/SKILL.md, "Create the directory and spec file")
Description
Sequential numbering scans existing specs/ directories, picks max+1, checks for existence, then uses mkdir -p and writes spec.md. Nothing in that sequence is atomic: two concurrent invocations (parallel agents on worktrees sharing a specs dir, or two terminals) can both scan, both select the same number, both pass the existence check (mkdir -p succeeds either way), and both write spec.md into the same directory — the second silently overwrites the first's starting specification.
This matters more now that multi-agent setups routinely run more than one spec-kit session against the same repository.
Expected behavior
Reserve the directory with plain mkdir (no -p) so creation is exclusive; on EEXIST, discard the selected number, rescan, and retry before writing spec.md. A lock file would also work.
Related
Prior sequential-numbering issues (#935, #975, #1332) covered scan-logic bugs in single-invocation scenarios; this one is specifically about the missing atomicity under concurrency.
- Ngôn ngữ chính
- Python
- Star
- 138k
- Fork
- 12.4k
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 136
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
-
triage-can-wait
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
enhancement needs-triage triage-can-wait
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
bundle-submission needs-info triage-can-wait validation-failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
author-awaiting enhancement needs-triage preset-submission triage-can-wait validation-failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
author-awaiting enhancement extension-submission needs-triage triage-can-wait validation-failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Tất cả issue của github/spec-kit
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
use-agent-os/agent-os#3314 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BasedHardware/omi#15662 · 1 bình luận ·
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
AiursoftWeb/AnduinOS-2#19 ·