[Bug]: create-new-feature.sh reserves feature numbers non-atomically — concurrent invocations can share/overwrite a spec directory
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bash
- 領域
- tooling
調査の方向性
.specify/scripts/bash/create-new-feature.sh から始めて、どのように specs/ を走査し、番号を選択し、ディレクトリを作成して spec.md を書き込むのかを追跡します。.claude/skills/speckit-specify/SKILL.md の「Create the directory and spec file」セクションとフローを比較します。完了とは、同時実行された呼び出しが異なるディレクトリを予約し、どの呼び出しも別の呼び出しの spec.md を上書きしないことです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 138k
- フォーク
- 12.4k
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 154
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/spec-kit のほかの issue
-
enhancement needs-triage triage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
preset-submission triage-must-have validation-passed
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
extension-submission triage-must-have validation-passed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
extension-submission triage-can-wait validation-passed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
enhancement needs-triage triage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/spec-kit の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
huggingface/Repo2RLEnv#163 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·