Skip to content

refactor: split plugin loader by responsibility - #108513

Merged
steipete merged 4 commits into
mainfrom
codex/refactor-plugin-loader
Jul 16, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/refactor-plugin-loader

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The plugin loader had grown into a roughly 3,000-line ownership hotspot spanning cache context, discovery, module loading, runtime registration, activation, and CLI metadata. That made isolated review and maintenance needlessly risky and required a max-lines exemption.

Why This Change Was Made

This maintainer-requested refactor keeps src/plugins/loader.ts as the stable public facade while moving cohesive responsibilities into focused loader modules. It also centralizes manifest-backed plugin record construction shared by runtime and CLI loaders, preserves the existing security and activation boundaries, and removes the loader max-lines baseline entry.

User Impact

No user-visible behavior or public API change. Maintainers get smaller ownership surfaces, clearer dependency seams, and no grandfathered line-count exception for the loader.

AI-assisted: yes. Codex performed the implementation, focused validation, and two clean autoreview passes; the behavior and ownership boundaries were reviewed before submission.

Evidence

  • pnpm check:changed passed on Blacksmith Testbox, including core and test typechecks, lint, max-lines ratchet, plugin boundaries, and runtime import-cycle checks.
  • All 11 loader test files passed: 205 tests across unit-fast, bundled, and plugin shards.
  • pnpm build passed on the rebased branch, including tsdown, runtime postbuild, plugin SDK export checks, and Control UI build guards.
  • Final branch autoreview reported no accepted or actionable findings and assessed the patch as correct with 0.96 confidence.

@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Jul 16, 2026
@steipete
steipete force-pushed the codex/refactor-plugin-loader branch from e6be7b9 to 01ed963 Compare July 16, 2026 00:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01ed963caf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/plugins/loader-runtime-registry.ts Resolved
@steipete
steipete merged commit ab3f057 into main Jul 16, 2026
116 checks passed
@steipete
steipete deleted the codex/refactor-plugin-loader branch July 16, 2026 00:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 16, 2026
* refactor(plugins): split plugin loader

* refactor(plugins): keep loader helpers internal

* refactor(plugins): remove unused loader type import

* test(plugins): cover split runtime registry boundary
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* refactor(plugins): split plugin loader

* refactor(plugins): keep loader helpers internal

* refactor(plugins): remove unused loader type import

* test(plugins): cover split runtime registry boundary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant