Repository navigation
fix: avoid channel discovery when plugins are disabled - #146689
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 12, 2026, 11:42 PM ET / September 13, 2026, 03:42 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR skips configured-channel discovery when plugins are globally disabled, preserves detailed disabled-status reporting, adds regression coverage, and removes an unused secret-reference import. Merge readiness⛔ Blocked before merge - 1 item remains The PR remains useful: current main and v2026.9.4 still perform the unnecessary discovery. No actionable defect was found. The updated compatibility explanation matches the source and resolves the previous review concern without requiring a migration or configuration change. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw resolves configured channels into plugin IDs before commands and maintenance flows load their plugin registry. This change avoids collecting channel metadata when the existing global-disable policy already guarantees an empty selection. flowchart TD
A[Command or maintenance flow] --> B[Configured channel resolver]
C[Configuration and activation source] --> B
B --> D{Plugins globally disabled?}
D -->|Yes| E[Empty plugin selection]
D -->|No| F[Channel discovery and owner policy]
F --> G[Registry loader]
E --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +32. Total +35 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the early exit in the canonical ID resolver while preserving detailed presence reports, existing activation precedence, and empty-registry publication. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main runs channel presence discovery before its existing policy excludes globally disabled owners. The supplied measurements demonstrate the cost; this review did not execute the runtime. Is this the best way to solve the issue? Yes. The guard uses the existing normalization and activation-source precedence at the shared owner, with no new configuration, persisted state, public API, or competing cache. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against aac6465ffee3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* perf(plugins): avoid discovery when plugins are disabled * fix(types): remove unused secret reference import
What Problem This Solves
Commands that prepare configured channels do expensive discovery even when plugins are globally disabled and no plugin can be selected.
User Impact
Disabled-plugin command and maintenance flows avoid unnecessary discovery. Enabled-plugin selection, detailed status reporting, registry publication and live requester checks keep their existing behavior. No configuration or migration is required.
Why This Change Was Made
Apply the existing normalized global-disable decision at the canonical ID-only resolver, before collecting channel metadata and state. Full presence-policy reports still collect disabled reasons, and the registry loader still publishes the empty result. This is four production lines, with no added cache or caller-specific shortcut.
The branch also removes one unused local import introduced on main; the independent public re-export remains intact. This repairs the observed TS6133 build failure without changing SecretRef behavior.
Evidence
The same three real requester-window cases passed before and after with the same source base, dependencies, order and worker limits. Instrumented local Node 24.21.0 measurements isolated eight configured-scope queries:
All eight authority preparations and empty publications remained. Every fixed allowed/refused outcome passed; periodic checks ran fewer times because the cases finished sooner. All observed child processes joined and canonical generation verification/cleanup completed. Host load and cache history were not controlled, so these are local attribution measurements, not a promised CI percentage or Blacksmith forecast.
Two regression assertions fail before the change. All 189 policy and registry-owner cases pass, including enabled/default selection, activation-source precedence, the reverse disabled-effective-config result, reason-rich disabled reports and empty registry publication. Scoped gates and independent P2 review passed for the two-file performance change. Measurements remain bound to
ba11b302plus the reviewed patch; the final branch was refreshed without changing those files or their 30 reviewed owner/dependency inputs.The canonical core typecheck reproduced TS6133 before the import cleanup and passes afterward. Its separate independent P2 review is clean; the public re-export remains. Exact-head CI run 34735249189 passed on
3ecc2234b82ca78fdf72a2f3fad7024e082107d2.Compatibility review: configuration keys, defaults and public function signatures are unchanged. The existing global-disable policy already returns no eligible owners on main and in v2026.9.4; this change only avoids collecting evidence that cannot affect that result. Enabled/default and both activation-source precedence directions remain covered, full disabled-reason reporting and empty-registry publication remain active, and the SecretRef re-export remains intact. No upgrade action or migration is needed.