Skip to content

refactor(plugins): consolidate capability provider resolution - #130937

Merged
steipete merged 1 commit into
mainfrom
codex/cleanup-capability-resolution-20260827
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cleanup-capability-resolution-20260827

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Capability-provider resolution maintained two parallel merge implementations: one merged registry entries and another repeated the same first-wins/unnamed-provider rules after projecting entries down to providers. The same module also mapped every registry key to an identical contract key and modeled a loaded-plus-cold registry combination that its own selection flow cannot produce.

Those duplicate representations made ordering and fallback behavior harder to verify without adding a distinct policy or capability.

Why This Change Was Made

This keeps capability providers as registry entries through the canonical merge, then projects the merged entries to providers once. Manifest lookup now uses the registry key directly, and registry selection chooses the already-loaded registry or the cold fallback before applying the existing allowlist filter.

Load order, configured-plugin policy, aliases, first-wins precedence, unnamed providers, requested-provider loading, bundled compatibility, and external fallback behavior remain unchanged.

User Impact

No user-visible behavior change is intended. Capability providers resolve in the same order with one canonical merge path and less private policy surface.

Evidence

  • Baseline owner coverage passes 66/66 before the production change, including duplicate-provider and object-identity assertions.
  • Final owner and sibling coverage passes 117/117 tests across nine files and five routed shards.
  • The focused merge regression proves that the active provider retains first precedence and identity, the loaded fallback provider remains second, and a later duplicate is shadowed.
  • Fresh isolated P0 review reports no actionable findings.
  • Production: +13/-68, net -55 lines. Tests: +6/-0. Total: net -49 lines.
  • No public API, import surface, configuration, plugin policy, provider alias, protocol, persistence, dependency, or storage change.
  • The complete changed-path gate passes all routed types, lint, formatting, dependency, dead-export, and architecture guards.
  • A full repository build passes assets, unified package output, external plugins, CLI bootstrap, runtime postbuild, SDK subpaths, UI, and startup metadata; the build, runtime-postbuild, and build-info stamps all match the exact committed head.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 13:31
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete merged commit 68fcc9b into main Aug 27, 2026
271 checks passed
@steipete
steipete deleted the codex/cleanup-capability-resolution-20260827 branch August 27, 2026 14:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant