Repository navigation
improve(startup): avoid repeated plugin path resolution - #152127
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 18, 2026, 4:50 PM ET / 20:50 UTC (Revision 2). ClawSweeper reviewWhat this changesPlugin metadata inspection reuses cached native filesystem path results and extends regression coverage for resolver ordering and cache invalidation. Merge readiness⛔ Blocked before merge - 1 item remains The optimization remains useful on current main, and the reviewed patch introduces no actionable correctness finding. The previous review’s log-access limitation does not establish a merge blocker. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw resolves plugin paths while discovering packages and preparing startup metadata. Its lifecycle-owned cache supplies those facts to plugin selection and loading. flowchart TD
A[Plugin package paths] --> B[Metadata inspection]
B --> C[Path cache]
C --> D{Native result matches absolute path?}
D -->|Yes| E[Reuse canonical path]
D -->|No or unavailable| F[JavaScript path resolver]
E --> G[Plugin selection]
F --> G
H[Explicit metadata invalidation] --> C
Before merge
Agent review detailsSecurityNone. PR surfaceSource -3, Tests +15. Total +12 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Reuse the existing native-result slot while preserving separate resolver identities and explicit lifecycle invalidation. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the repeated call: JavaScript-mode resolution of a canonical absolute path invokes native resolution without populating its cache slot, so a subsequent native-mode request invokes it again. No tests or runtime reproduction were executed here. Is this the best way to solve the issue? Yes. Reusing the existing cache owner is the narrowest repair, and the added assertions cover resolver ordering and invalidation without adding production seams. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 56173343fe59. 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.
|
What Problem This Solves
Startup plugin metadata inspection resolves the same plugin roots twice within one operation.
User Impact
Path resolution and plugin selection stay unchanged, with 157 fewer native filesystem calls in the measured normal-config inspection. No configuration changes or migrations are required. Installed Windows startup latency has not been measured for this patch.
Why This Change Was Made
Reuse the existing native-result cache slot while retaining the exact absolute-path identity check, JavaScript fallback for aliases and errors, and explicit cache invalidation.
Evidence