[Bug]: Extension alias conflict check misses spellings that map to the same file, so one extension overwrites and then deletes another's alias
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
src/specify_cli/extensions/__init__.pyを読み、1203〜1240行付近の_normalize_shadow_nameと_validate_install_conflictsから確認してください。issueの再現手順を実行し、shared.syncとshared-syncが同じエイリアスファイルを対象にしていることを確認してください。2つ目の拡張機能を追加すると競合が報告され、1つ目の拡張機能のエイリアスがそのまま残る状態になれば完了です。拡張機能のテストと並べて、対象を絞った回帰テストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
Bug Description
_validate_install_conflicts normalises declared names with _normalize_shadow_name only when comparing them with core commands. Against installed extensions it uses an exact spelling check (if name in installed_names, src/specify_cli/extensions/__init__.py:1240). Aliases such as shared.sync and shared-sync both render to .claude/skills/speckit-shared-sync/SKILL.md, so a second extension is installed without error and overwrites the first extension's alias file. Removing the second extension then deletes that file, although the first extension is still installed.
Steps to Reproduce
Save this as repro.py and run uv run python -I repro.py from the repository root.
import os, tempfile
from pathlib import Path
from typer.testing import CliRunner
from specify_cli import app
root = Path(tempfile.mkdtemp())
def make_ext(eid, alias):
d = root / eid
(d / "commands").mkdir(parents=True)
(d / "commands/hello.md").write_text(f"---\ndescription: {eid}\n---\n\nHello from {eid}\n")
(d / "extension.yml").write_text(f"""schema_version: "1.0"
extension: {{id: {eid}, name: {eid}, version: 1.0.0, description: d}}
requires: {{speckit_version: ">=0.1.0"}}
provides:
commands:
- name: speckit.{eid}.hello
file: commands/hello.md
description: x
aliases: ["{alias}"]
""")
return d
proj = root / "project"
(proj / ".specify").mkdir(parents=True)
(proj / ".claude/skills").mkdir(parents=True)
os.chdir(proj)
run = lambda *a: CliRunner().invoke(app, list(a))
skill = proj / ".claude/skills/speckit-shared-sync/SKILL.md"
print("add alpha:", run("extension", "add", "--dev", str(make_ext("alpha", "shared.sync"))).exit_code)
print("skill belongs to alpha:", "alpha" in skill.read_text())
print("add beta:", run("extension", "add", "--dev", str(make_ext("beta", "shared-sync"))).exit_code)
print("skill belongs to beta:", "beta" in skill.read_text())
print("remove beta:", run("extension", "remove", "beta", "--force").exit_code)
print("alpha still installed:", "alpha" in run("extension", "list").output)
print("alpha's alias skill exists:", skill.exists())
Expected Behavior
specify extension add --dev for beta fails with a conflict error. The _validate_install_conflicts docstring says "Reject installs that would shadow core or installed extension commands" (__init__.py:1220). The _normalize_shadow_name docstring (__init__.py:1203-1216) notes that dotted and hyphenated spellings "land on the same on-disk command name".
Actual Behavior
add alpha: 0
skill belongs to alpha: True
add beta: 0
skill belongs to beta: True
remove beta: 0
alpha still installed: True
alpha's alias skill exists: False
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
Comparing _normalize_shadow_name(name) against the normalised installed names, as is already done for core commands, would catch this.
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日 6時間
- マージ済み PR(30日)
- 194
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/spec-kit のほかの issue
-
The Python branch-creation port accepts an oversized `--number` and crashes at `int()` instead of rejecting it対応中かも @github-actions が 4 日前に担当しました。 オープンbug-assess bug-fix bug-test fix-proposed severity-low tests-passing triage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/spec-kit#5194 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: `create-new-feature.sh` rejects the feature descriptions `-n`, `-e` and `-E`, which the Python script accepts対応中かも @WOLIKIMCHENG が 8 日前に担当しました。 オープンtriage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: `bundle init <bundle>` initialises with the default integration instead of the bundle's, then aborts with a clash対応中かも @chelsealong が 10 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: `specify preset set-priority` does not update agent command files that are already written対応中かも @mikamikasuki が 10 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Local config override file name differs between the docs (`<id>-config.local.yml`) and ConfigManager (`local-config.yml`)対応中かも @gavenren が 6 日前に担当しました。 オープンtriage-must-have
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
github/spec-kit の issue をすべて見る
似ている issue
-
bump patch
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
autowarefoundation/autoware_carla_scenario#1321 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
QuantConnect/Documentation#2838 ·
メンテナーはふだん 1 日以内に返信
-
get_all_subclasses must deduplicate by class identity対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 15 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
awslabs/route53-dynamic-dns-with-lambda#67 · コメント 1 件 ·