Skip to content

feat(plugins): warn on ignored setup runtime#71253

Merged
vincentkoc merged 3 commits into
mainfrom
feat-setup-runtime-disabled-diagnostic
Apr 24, 2026
Merged

feat(plugins): warn on ignored setup runtime#71253
vincentkoc merged 3 commits into
mainfrom
feat-setup-runtime-disabled-diagnostic

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • Problem: setup.requiresRuntime: false already prevents setup runtime loading, but a plugin can still accidentally ship setup-api or openclaw.setupEntry and get no signal that it is ignored.
  • Why it matters: descriptor-only setup should be an explicit contract, not a silent footgun during the migration away from setup runtime paths.
  • What changed: add an additive setup registry diagnostic when descriptor-only setup metadata still has an ignored setup runtime entry, plus docs, changelog, and coverage.
  • What did NOT change (scope boundary): legacy plugins without requiresRuntime: false still use the setup-api fallback 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)

N/A

Regression Test Plan (if applicable)

N/A

User-visible / Behavior Changes

Plugin authors now get an additive setup diagnostic when setup.requiresRuntime: false ignores a setup runtime entry.

Diagram (if applicable)

Before:
manifest requiresRuntime=false + setup-api -> setup-api ignored silently

After:
manifest requiresRuntime=false + setup-api -> setup-api ignored + diagnostic emitted

Security Impact (required)

  • New permissions/capabilities? (Yes/No): No
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): No
  • Command/tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local Node/pnpm worktree
  • Model/provider: N/A
  • Integration/channel (if any): plugins setup registry
  • Relevant config (redacted): N/A

Steps

  1. Define a plugin manifest with setup.requiresRuntime: false.
  2. Add a setup runtime entry via setup-api or openclaw.setupEntry.
  3. Resolve the setup registry.

Expected

  • Setup runtime remains ignored.
  • Registry includes a diagnostic explaining the ignored runtime entry.

Actual

  • Matches expected.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios: pnpm test src/plugins/setup-registry.test.ts; pnpm check:changed; pnpm build
  • Edge cases checked: descriptor-only setup still does not load setup-api; legacy omitted requiresRuntime behavior remains unchanged by existing setup registry coverage.
  • What you did not verify: external third-party plugin package manually.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: diagnostic noise for intentionally descriptor-only plugins that forgot to remove old setup entrypoints.
    • Mitigation: diagnostic is additive and behavior remains unchanged; docs explain either remove the runtime entry or set requiresRuntime: true.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Apr 24, 2026
@vincentkoc vincentkoc self-assigned this Apr 24, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Apr 24, 2026
@vincentkoc vincentkoc marked this pull request as ready for review April 24, 2026 20:39
@greptile-apps

greptile-apps Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds an additive diagnostic (setup-descriptor-runtime-disabled) to the setup registry when a plugin declares setup.requiresRuntime: false but still ships a detectable setup runtime entry (setup-api file or openclaw.setupEntry). The implementation correctly short-circuits the main registry loop before any file-loading (createJiti) occurs, leaves resolvePluginSetupProvider/resolvePluginSetupCliBackend behavior unchanged, and is well-covered by the updated test.

Confidence Score: 5/5

Safe to merge — additive diagnostic only, no behavioral changes to existing paths.

All findings are P2 (style/defensive-coding observations). The core logic is correct: the diagnostic is conditionally emitted only when a setup runtime source is actually detectable, the early continue prevents unnecessary work, and the runtime cutoff semantics are preserved end-to-end.

No files require special attention.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/plugins/setup-registry.ts
Line: 411-413

Comment:
**Redundant guard in `pushDescriptorRuntimeDisabledDiagnostic`**

The `if (params.record.setup?.requiresRuntime !== false)` early-return is unreachable at runtime — the function is only called from within the `if (record.setup?.requiresRuntime === false)` branch in `resolvePluginSetupRegistry`. The guard is defensive but could mislead future readers into thinking the function has broader call sites.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Merge branch 'main' into feat-setup-runt..." | Re-trigger Greptile

Comment thread src/plugins/setup-registry.ts Outdated

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

Copy link
Copy Markdown

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: 4789e9c46b

ℹ️ 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/setup-registry.ts Outdated
@vincentkoc vincentkoc force-pushed the feat-setup-runtime-disabled-diagnostic branch from 4789e9c to fcb1efd Compare April 24, 2026 21:10
@vincentkoc vincentkoc merged commit 5b8bd63 into main Apr 24, 2026
65 checks passed
@vincentkoc vincentkoc deleted the feat-setup-runtime-disabled-diagnostic branch April 24, 2026 21:23
Angfr95 pushed a commit to Angfr95/openclaw that referenced this pull request Apr 25, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
* feat(plugins): warn on ignored setup runtime

* fix(plugins): avoid fallback setup runtime diagnostics

* refactor(plugins): clarify setup runtime lookup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant