Skip to content

Check companions held as git submodules - #14

Closed
5hif7y wants to merge 1 commit into
mirai-engine:mainfrom
5hif7y:validate-submodule-companions
Closed

5hif7y wants to merge 1 commit into
mirai-engine:mainfrom
5hif7y:validate-submodule-companions

Conversation

@5hif7y

@5hif7y 5hif7y commented Nov 7, 2026

Copy link
Copy Markdown
Member

A plugin may hold a companion in plugins/<name>/ as a git submodule. The tree that validate.py fetches shows a submodule only as a gitlink plugins/<name>, with no plugins/<name>/plugin.mirai in it. So validation passed without seeing the companion, and a repeated name went unnoticed.

Now repository_plugins looks at each gitlink (mode 160000) directly under plugins/ and finds its url in .gitmodules at the same commit. Then:

  • the url must be https, like the url of an entry;
  • the commit the gitlink pins is fetched into its own scratch folder, and it must have plugin.mirai at its root, named like the folder;
  • the companion is checked for repeated names like any other.

The README says this under url.

Tested locally:

  • uv run scripts/validate.py passes with the current entries.
  • With a temporary entry for https://github.com/5hif7y/mirai-brush-maps.git at 84f622a, which holds four companions as submodules, it lists brush_maps, bsp_decompile, map_agent, map_convert, valve220.
  • Adding an entry map_agent.json fails with the plugin map_agent is already in the catalog by plugins/brush_maps.json.
  • On a local copy, a submodule with an ssh url fails, and so does a submodule folder whose plugin.mirai has a different name.

🤖 Generated with Claude Code

A plugin may hold a companion in plugins/<name>/ as a git submodule. The
fetched tree shows it only as a gitlink, so validation passed without
seeing the companion and a repeated name went unnoticed. Now each gitlink
under plugins/ is resolved through .gitmodules: its url must be https, and
the commit it pins must have plugin.mirai at its root with the name of the
folder. The companion then counts against repeated names like any other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@5hif7y 5hif7y mentioned this pull request Nov 7, 2026
@tomaszbk

tomaszbk commented Nov 8, 2026

Copy link
Copy Markdown
Member

With brush_maps on subtrees nothing needs this anymore, so we won't add submodule states to the installer without a plugin that requires them. Closing; thanks for the tests.

@tomaszbk tomaszbk closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants