Repository navigation
fix: prevent plugin dependencies from slowing unrelated imports - #146486
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: needs maintainer review before merge. Reviewed September 12, 2026, 5:53 PM ET / 21:53 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch avoids scanning captured plugin dependencies for unrelated imports, adds a scaling regression test, and corrects TLS renewal shutdown registration. Merge readiness✅ Ready for maintainer review The optimization remains useful on current main, and review found no actionable patch defect. The merged TLS prerequisite does not supersede the plugin fix; this maintainer-protected PR should remain open for normal landing. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw captures plugin source and dependencies into an instance-owned directory before loading them. Module resolver hooks consult that artifact to prepare captured modules while leaving unrelated imports alone. flowchart TD
A[Module import] --> B[Plugin resolver hook]
B --> C{Inside artifact directory?}
C -->|No| D[Continue unrelated import]
C -->|Yes| E[Find captured package]
E --> F[Prepare captured module]
F --> G[Native module loading]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +50. Total +53 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep unrelated imports independent of captured dependency count while preserving the existing package lookup, lazy loading, and source-integrity lifecycle. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that unrelated resolved imports scan every captured package and dependency link on current main; the supplied regression targets that growth. No runtime tests were executed in this read-only review. Is this the best way to solve the issue? Yes. The existing artifact boundary provides a narrow early return without adding a cache, competing owner, configuration option, or changed loading contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5270db64d8d0. LabelsLabel 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.
|
…claw#146486) * fix(gateway): stop TLS renewal through the shutdown owner * fix: prevent plugin dependencies from slowing unrelated imports
TLS prerequisite: #146412 (landed on main).
Related: #130741
What Problem This Solves
Loading unrelated modules does more work as active plugins accumulate captured dependencies.
User Impact
Plugin-heavy Gateways avoid repeated ownership scans during unrelated imports. Plugin selection, lazy loading, reload behavior, and captured source integrity remain unchanged; no configuration or migration is required.
Why This Change Was Made
Every captured package root and dependency link belongs to one artifact directory. Checking that directory first lets unrelated imports return before walking the captured packages.
Evidence
pnpm build, changed-file formatting, and targeted lint passed.End-to-end Swarm responsiveness proof remains with #130741; this slice makes no new 500 ms latency claim.