Repository navigation
refactor(plugins): share lazy provider runtime forwarding - #138191
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 8:45 AM ET / 12:45 UTC. ClawSweeper reviewWhat this changesThe PR replaces seven provider-runtime lazy forwarding wrappers with the shared lazy-runtime binder and updates the export-collision checker to recognize that canonical forwarding pattern. Merge readiness⛔ Blocked before merge - 1 item remains Keep open. This is a coherent, behavior-neutral consolidation that current main has not subsumed, and the Priority: P3 Review scores
Verification
How this fits togetherModel catalog and provider-auth callers enter a small provider-runtime facade, which lazily loads the heavier provider runtime before plugin-backed behavior runs. A repository script separately detects duplicate exported definitions while exempting exact forwarding-only facades. flowchart LR
A[Catalog and auth callers] --> B[Provider runtime facade]
B --> C[Shared lazy import loader]
C --> D[Provider runtime module]
D --> E[Provider plugin hooks]
F[Export collision checker] --> G[Forwarding pattern decision]
G --> H[Repository validation result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -40, Tests +45, Other +48. Total +53 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the single shared lazy forwarding path and land it through normal maintainer review if the exact-head checks remain green. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors existing forwarding behavior rather than reporting a user-facing failure; source inspection establishes the relevant equivalence path. Is this the best way to solve the issue? Yes. The PR reuses the existing shared lazy-method abstraction already used by sibling runtime facades, while retaining the existing lazy import loader and provider-runtime owner boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8ef56e23c9d2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
CI exposed a scanner gap: the export collision guard understood handwritten same-name forwarding functions but counted equivalent calls to the canonical lazy binder as duplicate definitions. Commit The baseline regression failed before the parser change. All 39 scanner and sibling-wrapper tests pass, the actual repository collision command passes, full changed-file checks pass, and independent review is clean. Production remains −40 lines; tooling is +48 after consolidating the old forwarding branches; tests are +45. The added tooling describes helper provenance and forwarding semantics, rather than duplicating runtime behavior. The separate QA catalog failure is a stale repository docs reference after the ClawHub documentation move; that repair is being validated separately. The browser cold-start test failure is under investigation before any retry. |
sylvesterkaczmarek
left a comment
There was a problem hiding this comment.
Reviewed. Good consolidation: one loader, one binder, lazy boundary preserved. The collision guard is also scoped to the known lazy-runtime helpers, so it does not broadly suppress definitions.
60ea45d to
1fc27ea
Compare
|
Merged via squash.
|
…38191) * refactor(plugins): share lazy provider runtime forwarding * fix(tooling): recognize canonical lazy method forwarders
What Problem This Solves
The provider facade repeated the same asynchronous import and forwarding logic seven times, with a separate type alias for each method.
Why This Change Was Made
Use the existing lazy runtime method binder while retaining the original import loader. The loader still shares in-flight imports and evicts rejected imports so later calls can retry. The heavy provider runtime remains behind a real asynchronous import boundary, and provider-specific behavior stays with its current owner.
Teach the export-collision checker to recognize only the imported canonical binder with an exact same-name selector. Negative cases still reject changed selectors, argument transformations, extra arguments, and unrelated factories.
User Impact
No intended behavior change. The seven internal exports preserve argument/result types, error propagation, and loading behavior. Runtime code shrinks by 40 lines; validation tooling grows by 48 lines and its tests by 45 to cover the canonical binder without a file exemption.
Evidence