Skip to content

Plugins: allowlist compat for capability provider fallback (#62205)#62234

Merged
obviyus merged 2 commits into
openclaw:mainfrom
neeravmakwana:fix/plugins-capability-allowlist-stt-62205
Apr 7, 2026
Merged

Plugins: allowlist compat for capability provider fallback (#62205)#62234
obviyus merged 2 commits into
openclaw:mainfrom
neeravmakwana:fix/plugins-capability-allowlist-stt-62205

Conversation

@neeravmakwana

Copy link
Copy Markdown
Contributor

Summary

  • Problem: With a non-empty plugins.allow list that omitted bundled capability plugins (for example openai), capability fallback only added plugins.entries, so the loader still treated those plugins as blocked and media-understanding providers (including OpenAI-compatible STT) never registered.
  • Why it matters: Voice and other STT flows that use tools.media.audio with provider: "openai" could pass raw audio to the model instead of a transcript when an allowlist was used to scope plugins.
  • What changed: resolveCapabilityProviderConfig now applies withBundledPluginAllowlistCompat before withBundledPluginEnablementCompat, matching the order in applyPluginCompatibilityOverrides (allowlist, then enablement, then vitest compat).
  • What did NOT change: plugins.deny remains authoritative; denylisted plugins are not enabled by this path.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause (if applicable)

  • Root cause: Enablement-only compat did not merge bundled capability plugin ids into plugins.allow, so resolvePluginActivationState returned not-in-allowlist and the bundled plugin did not load.
  • Missing detection / guardrail: Allowlist fallback tests mocked enablement without exercising the allowlist layer.
  • Contributing context: Same layering as withBundledPluginAllowlistCompat + withBundledPluginEnablementCompat in provider resolution tests.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this: Unit test
  • Target test or file: src/plugins/capability-provider-runtime.test.ts, src/media-understanding/provider-registry.allowlist.test.ts, src/image-generation/provider-registry.allowlist.test.ts
  • Scenario the test should lock in: Enablement compat receives config after allowlist compat merges capability plugin ids into plugins.allow when plugins.allow is non-empty.
  • Why this is the smallest reliable guardrail: Asserts the compat chain order and expected config shape without requiring a full Telegram or gateway run.

User-visible / Behavior Changes

  • With plugins.allow set, bundled capability plugins needed for capability fallback (media understanding, image generation, speech, and other keys using the same path) are merged into the allowlist so providers such as STT load without manually listing every capability plugin id.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? No
  • Trust boundary changes? No
  • Notes: plugins.deny still blocks plugins before allowlist evaluation.

Verification

  • pnpm test (scoped): src/plugins/capability-provider-runtime.test.ts, src/media-understanding/provider-registry.allowlist.test.ts, src/image-generation/provider-registry.allowlist.test.ts
  • pnpm check / pnpm build: local pnpm check fails on unrelated acpx extension TypeScript resolution (acpx/dist/runtime.js); scoped lint on touched files is clean.

Made with Cursor

@greptile-apps

greptile-apps Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes allowlist-gated capability provider fallback by inserting withBundledPluginAllowlistCompat before withBundledPluginEnablementCompat in resolveCapabilityProviderConfig, matching the ordering already used in applyPluginCompatibilityOverrides. New parametrized tests in capability-provider-runtime.test.ts verify the chain order directly, and two new allowlist integration test files cover media-understanding and image-generation registry behavior. One minor gap: videoGenerationProviders and musicGenerationProviders are omitted from the it.each table in capability-provider-runtime.test.ts, but the production fix applies generically to all eight capability keys so there is no correctness impact.

Confidence Score: 5/5

Safe to merge — targeted one-liner fix with correct test coverage of the compat chain ordering.

All findings are P2 or lower. The production change is a minimal, well-understood reordering that matches the established pattern in applyPluginCompatibilityOverrides. Tests directly assert chain order and the two new allowlist files confirm downstream registry behavior.

No files require special attention; the minor test coverage gap for videoGenerationProviders and musicGenerationProviders in capability-provider-runtime.test.ts does not affect correctness.

Reviews (1): Last reviewed commit: "Plugins: allowlist compat for capability..." | Re-trigger Greptile

@obviyus
obviyus force-pushed the fix/plugins-capability-allowlist-stt-62205 branch from 6c77ee3 to 4bfccf5 Compare April 7, 2026 07:10
@obviyus obviyus self-assigned this Apr 7, 2026
@obviyus
obviyus force-pushed the fix/plugins-capability-allowlist-stt-62205 branch from 4bfccf5 to 92bbbe5 Compare April 7, 2026 07:13

@obviyus obviyus 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.

Reviewed latest changes; landing now.

@obviyus
obviyus merged commit 9a9dc1d into openclaw:main Apr 7, 2026
17 of 31 checks passed
@obviyus

obviyus commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Landed on main.

Thanks @neeravmakwana.

lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
… (thanks @neeravmakwana)

* Plugins: allowlist compat for capability provider fallback (openclaw#62205)

* test: cover all capability fallback keys

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
… (thanks @neeravmakwana)

* Plugins: allowlist compat for capability provider fallback (openclaw#62205)

* test: cover all capability fallback keys

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
… (thanks @neeravmakwana)

* Plugins: allowlist compat for capability provider fallback (openclaw#62205)

* test: cover all capability fallback keys

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
… (thanks @neeravmakwana)

* Plugins: allowlist compat for capability provider fallback (openclaw#62205)

* test: cover all capability fallback keys

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2026.4.5: Telegram voice messages no longer transcribed (STT regression)

2 participants