[Bug]: `bundle init <bundle>` initialises with the default integration instead of the bundle's, then aborts with a clash
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
src/specify_cli/bundles/command_init.py:33から始め、bundle installがsrc/specify_cli/bundles/command_install.py:98でどのように統合を解決するかを比較してください。issueではsrc/specify_cli/bundles/_commands.py:132の_resolve_init_integrationも示されています。提供されたオフライン再現手順を実行して、不一致を確認してください。bundle initがバンドルで宣言された統合を使って新しいプロジェクトを初期化し、競合エラーなしで完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug Description
In a directory that is not yet a Spec Kit project, specify bundle init <bundle> picks the init integration with _resolve_init_integration(integration, None) (src/specify_cli/bundles/command_init.py:33). Because it passes None instead of the manifest, it skips the bundle-declared integration and initialises the project with the default (copilot). The follow-up install then fails because the bundle targets a different integration.
The project is left initialised with the wrong integration, although the error message says "aborting with no changes". specify bundle install <bundle> in the same situation passes the manifest (command_install.py:98) and initialises with the bundle's integration.
Steps to Reproduce
From the root of a fresh clone after uv sync, save the script below as repro.py and run uv run python -I repro.py. It runs the real specify CLI with --offline. No network access is needed, and HOME points at the temp directory so user configuration is not read.
import json, os, subprocess, tempfile
from pathlib import Path
work = Path(tempfile.mkdtemp())
bundle = work / "claude-bundle"; bundle.mkdir()
(bundle / "bundle.yml").write_text(
'schema_version: "1.0"\n'
'bundle: {id: claude-bundle, name: C, version: "1.0.0", role: dev, description: d, author: a, license: MIT}\n'
'requires: {speckit_version: ">=0.0.1"}\n'
'integration: {id: claude}\n'
)
env = {"PATH": os.environ["PATH"], "HOME": str(work), "COLUMNS": "200"}
for command in (["bundle", "install"], ["bundle", "init"]):
project = work / command[1]; project.mkdir()
run = subprocess.run(["specify", *command, str(bundle), "--offline"],
cwd=project, capture_output=True, text=True, env=env)
state = project / ".specify" / "integration.json"
integration = json.loads(state.read_text())["default_integration"] if state.exists() else None
errors = [line for line in (run.stdout + run.stderr).splitlines() if "Error" in line]
print(f"specify {' '.join(command)}: exit {run.returncode}, project integration={integration}, "
f"bundle recorded={(project / '.specify' / 'bundle-records.json').exists()}")
for line in errors:
print(" ", line)
Expected Behavior
bundle init <bundle> should behave like bundle install <bundle> and initialise with the bundle's declared integration (claude):
src/specify_cli/bundles/_commands.py:132: "Precedence (FR-013): explicit override → bundle-declared → default."docs/reference/bundles.md:192describesbundle initas "an explicit one-step bootstrap for a new checkout".docs/reference/bundles.md:77: if a bundle targets a different integration, install "aborts with no changes".
Actual Behavior
specify bundle install: exit 0, project integration=claude, bundle recorded=True
specify bundle init: exit 1, project integration=copilot, bundle recorded=False
Error: Bundle 'claude-bundle' targets integration 'claude', but this project's active integration is 'copilot'. Installing it would conflict; aborting with no changes.
After the failed bundle init, .specify/integration.json records copilot, and the project has been scaffolded for it.
Error Logs
Error: Bundle 'claude-bundle' targets integration 'claude', but this project's active integration is 'copilot'. Installing it would conflict; aborting with no changes.
Specify CLI Version
1.2.4.dev0 (main at 27d14e2)
AI Agent
Claude Code
Operating System
Linux 6.18 (Ubuntu container)
Python Version
Python 3.12.3
Additional Context
Passing --integration claude explicitly avoids the problem. A likely fix is for bundle init to load the bundle's manifest before initialising, as bundle install does.
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.
- 主要言語
- Python
- スター
- 144k
- フォーク
- 12.9k
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 181
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/spec-kit のほかの issue
-
bundle catalog add rewrites Windows drive paths as POSIX paths対応中かも @chelsealong が 1 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
The Python branch-creation port accepts an oversized `--number` and crashes at `int()` instead of rejecting it対応中かも @github-actions が 3 日前に担当しました。 オープンbug-assess bug-fix fix-proposed severity-low triage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/spec-kit#5194 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Cline extension and preset commands have `speckit.*.md` file names rewritten to `speckit-*-md`対応中かも @kevin9327 が 4 日前に担当しました。 オープンtriage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: `create-new-feature.sh` rejects the feature descriptions `-n`, `-e` and `-E`, which the Python script accepts対応中かも @WOLIKIMCHENG が 7 日前に担当しました。 オープンtriage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: `specify preset set-priority` does not update agent command files that are already written対応中かも @mikamikasuki が 8 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
github/spec-kit の issue をすべて見る
似ている issue
-
area:scripts area:tests bug priority:later
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Ikalus1988/MisakaNet#4358 ·
メンテナーはふだん 1 日以内に返信
-
Discovered ports from service discovery are never propagated to modules in Module.load()対応中かも @vishalmore90 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OWASP/Nettacker#1828 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
aws-samples/sample-per-model-bedrock#708 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sjkim1127/Reversecore_MCP#365 ·
メンテナーはふだん 1 日以内に返信