feat(plugins): warn on ignored setup runtime#71253
Conversation
Greptile SummaryThis PR adds an additive diagnostic ( Confidence Score: 5/5Safe 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 No files require special attention. Prompt To Fix All With AIThis 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 |
There was a problem hiding this comment.
💡 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".
4789e9c to
fcb1efd
Compare
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
* feat(plugins): warn on ignored setup runtime * fix(plugins): avoid fallback setup runtime diagnostics * refactor(plugins): clarify setup runtime lookup
Summary
setup.requiresRuntime: falsealready prevents setup runtime loading, but a plugin can still accidentally shipsetup-apioropenclaw.setupEntryand get no signal that it is ignored.requiresRuntime: falsestill use the setup-api fallback path.Change Type (select all)
Scope (select all touched areas)
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: falseignores a setup runtime entry.Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
setup.requiresRuntime: false.setup-apioropenclaw.setupEntry.Expected
Actual
Evidence
Human Verification (required)
pnpm test src/plugins/setup-registry.test.ts;pnpm check:changed;pnpm buildsetup-api; legacy omittedrequiresRuntimebehavior remains unchanged by existing setup registry coverage.Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoRisks and Mitigations
requiresRuntime: true.