Skip to content

衝突した別名の形が文書と実装で違う(文書は owner--repo、実装はホスト名を含むディレクトリ名) #228

Closed

Description

@takemi-ohama

何を見つけたか

プラグインの名前が衝突したときに張る別名の形が、文書と実装で違う。

出所 別名の形 実際の例
docs/plugin-dev/plugin-yml-reference.md:193 projects/<name>.<owner>--<repo> projects/myapp.example-org--devbase-plugins
実装(lib/devbase/plugin/syncer.py:156 + _extract_owner:58-73) projects/<name>.<repos のディレクトリ名> projects/myapp.github.com--example-org--devbase-plugins

_extract_owner は repos/ 由来のプラグインで Path(plugin.path).parts[1] を返す。
これはホスト名を含むディレクトリ名(lib/devbase/plugin/repo_manager.py:88 の f"{host}--{owner_repo.replace('/', '--')}"、例 github.com--example-org--devbase-plugins)である。

--link のプラグインでは元パスの basename がそのまま入る。

ホスト名を含む別名も、名前の形の検査(devbase.utils.names.is_single_segment_name)を通る。

どこで見つけたか

docs/plugin-dev/plugin-yml-reference.md:193 と
lib/devbase/plugin/syncer.py:142-172(_link_loser_projects)。#203(PLAN66)の設計で、同期が作る名前を
数えているときに見つけた。

なぜこの変更の範囲外なのか

PLAN66 の対象範囲は同期が作る名前の形の検査と知らせで、別名の形そのものと
その文書は含まない。PLAN66 は別名の形を変えない。

直さないと何が起きるか

プラグインの作者が文書のとおりに projects/myapp.example-org--devbase-plugins を探しても
見つからない。衝突した側のプロジェクトへ辿る手段を、同期のログ
(lib/devbase/plugin/syncer.py:231 の Also available as: projects/<name>.<owner>)からしか得られない。

直し方

直すのは文書の側で、実装の別名の形は変えない。

  • docs/plugin-dev/plugin-yml-reference.md:193 は、別名を
    projects/<name>.<host>--<owner>--<repo>(例: myapp.github.com--example-org--devbase-plugins。例の名前は 作成者の所属組織・顧客・個人に固有の名前が文書・コード・テストに残っていて、OSS として読む人に意味が通らない #294 の置き換え表に従う)と書く。
    --link のプラグインでは <name>. の後ろが元パスの basename になることも添える
  • 同じ書き方をしている docstring も同じく直す
    • lib/devbase/plugin/syncer.py:61(_extract_owner の owner--repo dirname from repos/<owner>--<repo>/...)
    • lib/devbase/plugin/syncer.py:70(# Return full dir_name (owner--repo) ...)
    • lib/devbase/plugin/syncer.py:178(sync_projects の ../repos/<owner>--<repo>/...)
    • lib/devbase/commands/project.py:40(_resolve_plugin_name の ../repos/<owner>--<repo>/...)

由来

issue #203(PLAN66 の設計)

進行

モード: —

  • 要求と受け入れ条件
  • 作業場所の用意 — 2026-10-06 06:32
  • 設計
  • 素材の収集と出典の確定
  • ドキュメント再構成
  • ドキュメントレビュー
  • 計画 — 2026-10-06 06:31
  • 実装 — 2026-10-06 07:09
  • 構造改善 — 2026-10-06 07:21
  • 実装レビュー — 2026-10-06 07:33
  • 完了判定 — 2026-10-06 07:10
  • Pull Request — 2026-10-06 07:12
  • 確定仕様化
  • 後片付け
  • 配布 — 2026-10-06 12:59
  • 体裁レビュー
  • リリース後テスト — 2026-10-06 12:59
  • 振り返り — 2026-10-06 14:55
  • 棚卸し — 2026-10-06 20:16

振り返り: #432 (comment)

Activity

  1. added a commit that references this issue on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions