refactor(shared): consolidate provider and utility lazy loaders#98749
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 11:57 PM ET / 03:57 UTC. Summary PR surface: Source -179. Total -179 across 35 files. Reproducibility: not applicable. as a runtime bug; this is a maintainer refactor implementing a source-level cleanup tracked by the canonical issue. The reviewable check is whether the shared lazy-loader contract preserves existing import-cache behavior. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this final cleanup batch only after exact-head checks are green or documented unrelated and maintainer review accepts that the converted loaders preserve their previous lazy-cache semantics. Do we have a high-confidence way to reproduce the issue? Not applicable as a runtime bug; this is a maintainer refactor implementing a source-level cleanup tracked by the canonical issue. The reviewable check is whether the shared lazy-loader contract preserves existing import-cache behavior. Is this the best way to solve the issue? Yes: using the existing Plugin SDK lazy-runtime helper is the right owner-boundary cleanup, and sampled callers preserve sticky rejection caching, AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c37961fdab6e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -179. Total -179 across 35 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Performance and packaging follow-up is now pushed at
|
|
note my agent accidentally removed the clawsweeper labels so I just put them back |
Related: #98748
What Problem This Solves
Resolves the final provider and utility portion of a maintainability problem where bundled plugins and provider adapters repeatedly implement their own dynamic-import promise caches. This is PR 6 of 6 in the lazy-runtime consolidation series.
The shared foundation and core leaf batches are already merged:
Why This Change Was Made
Migrates provider and utility plugin loaders to the public
openclaw/plugin-sdk/lazy-runtimehelper while preserving each existing sticky-rejection, retry, reset, and inspection contract. The memory-lancedb provider path retains retry-after-failure behavior; other runtime imports retain sticky rejection caching.User Impact
No intended user-visible behavior change. Maintainers get one canonical lazy runtime loader across provider and utility plugins, reducing repeated cache variables and loader functions without changing provider behavior.
Evidence
+149/-328.oxfmt --checkpassed on all 35 files.check:changedandpnpm buildpassed.