Skip to content

Rules and CI for the plugin registry - #1

Merged
MHohlios merged 6 commits into
mainfrom
wiffletree/plugin-registry-and-its-ci
Nov 2, 2026
Merged

MHohlios merged 6 commits into
mainfrom
wiffletree/plugin-registry-and-its-ci

Conversation

@MHohlios

@MHohlios MHohlios commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

This makes the registry ready for its first plugin: the rules, the checks every pull request runs before anyone looks at it, and a signed index that MUDling will fetch. It adds no plugins.

What's in it

Area What it adds
Rules One folder per plugin under plugins/<id>/, CODEOWNERS, MIT or Apache-2.0 only, plain file names, no symbolic links, no .gitattributes inside a plugin
Checks on every pull request Manifest, patterns, the plugin's own tests, its hooks on a shared session log, a Luau lint, and the budget
Budget Measured against a reference plugin in the same job, not as an absolute number, with the result posted on the pull request
Signed index Built on main only, after the checks pass, with no plugin code running. Ed25519, published to the index branch
Docs README.md, CONTRIBUTING.md, docs/ci.md, docs/index-format.md, docs/signing.md

Evidence

  • 47 tests pass against mudling built from Vyttle-LLC/mudling at 1282f8a. They cover a plugin that passes and one that fails for each reason, including forged cost lines and unsafe file names.
  • An empty registry passes. Avatar passes at 0.33× the reference, and a fresh mudling plugin new passes at 0.15×.
  • The reference plugin adds 4.46 to 4.79 µs per line on the shared log at load 3.7 to 3.8, so CI's limit sits near the 5 µs budget.
  • "Check plugins" passed on GitHub on this pull request. Publishing is skipped on pull requests, so it hasn't run yet.
  • A plugin can't carry its own .gitattributes, so the files MUDling downloads hash the same as the files CI checks.

Before it can publish

  • The signing key isn't set, so the publish job fails plainly until it is. Steps are in docs/signing.md.
  • main isn't protected, so Check plugins and code-owner review only advise. docs/ci.md lists the ruleset to add.
  • A first-time contributor's checks wait for a person to approve them, which goes against "before any human looks". docs/ci.md names the setting that fixes it.

Risks

  • A green check on a fork's pull request proves nothing until main runs its own checks after the merge, because a fork can change the workflow. Nothing from a fork reaches the signing key or a write token.
  • On a log of only short lines, the budget is stricter, near 3 µs, because the reference rule costs less there. The shared log catches most heavy plugins.
  • Timing tests may be flaky on GitHub's runners. The margins there are unmeasured.

Follow-ups

  • sign() lets openssl failures escape as a traceback: ci/registry.py:363
  • Type the budget callbacks: ci/registry.py:214
  • Remove the unused --plugins option: ci/registry.py:407
  • Trim comments that repeat the code: ci/registry.py:4
  • Timing tests may be flaky on shared runners: ci/test_registry.py:103
  • No automated test for the publish and comment scripts: ci/publish-index.sh:1
  • A plugin fault can read as "couldn't run": ci/registry.py:143
  • Linting hook files together fails some valid plugins, and --!nolint turns lint off: ci/registry.py:182
  • An older main commit can overwrite a newer index: .github/workflows/registry.yml:71

Reviewed with Wiffletree: 2 full reviews and 2 re-checks, 6 rounds (Tests, Claude, Style)

mhohlios added 6 commits November 1, 2026 19:44
One folder per plugin, reviewed through CODEOWNERS, MIT or Apache-2.0 only.
Every pull request runs ci/registry.py over mudling plugin test and
luau-analyze, and judges the line budget against a reference plugin in the
same job. On main, the index is rebuilt, signed with Ed25519 and published
to the index branch. docs/ has the checks, the index format and the key.
…ng was measured

A test log could print its own cost through a Unicode line separator, and
an empty report left a one-byte file that the post script took for a comment.
…ared log

A file name can no longer forge output, crash the index or muddle the content
hash, and symlinked plugin folders and stray files under plugins/ fail layout.
Hooks that fail on the shared log now fail the plugin. The docs and the pin
placeholder no longer mention internal planning.
@MHohlios
MHohlios merged commit a8ee502 into main Nov 2, 2026
2 checks passed
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.

1 participant