Repository navigation
fix: reduce repeated model-validation work before chat requests - #148428
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 14, 2026, 4:07 PM ET / 20:07 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR prepares plugin policy once while compiling model-suppression rules and extends regression coverage for restrictions and configuration-specific reuse. Merge readiness✅ Ready for maintainer review Keep open: this is a useful, bounded optimization that current main still lacks. The reviewed patch preserves existing policy and cache behavior, and I found no actionable correctness defects. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw checks plugin manifest rules when filtering model catalogs and validating selected models. This change reduces policy preparation work before those rules produce an available model or a suppression error. flowchart TD
A[Plugin configuration] --> C[Prepare policy once]
B[Plugin metadata snapshot] --> D[Check plugin eligibility]
C --> D
D --> E[Compile suppression rules]
F[Selected model and endpoint] --> G[Resolve suppression]
E --> G
G --> H[Available model or error]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +34. Total +37 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Reuse the existing prepared-policy contract while retaining the current eligibility owner, resolver lifetime, and endpoint-specific suppression rules. Do we have a high-confidence way to reproduce the issue? Yes, from source: each eligible plugin check on current main re-normalizes the same plugin configuration during compilation. The changed fixture counts this work; this review did not execute it. Is this the best way to solve the issue? Yes. Passing the existing normalized-policy input removes repeated work without adding another cache, policy owner, public API, or migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e0f7f7080858. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
bc03702 to
3794d99
Compare
|
Merged via squash.
|
* origin/main: perf(secrets): keep pure helpers out of file writer imports (#148096) perf(models): normalize suppression policy once per compilation (#148428) test: route provider integration and wizard recovery tests correctly (#148504) test: reuse prepared bundled plugins in startup corpus (#148465) fix(agents): attribute tool preparation delays to the correct stages (#148349) refactor: remove redundant Parallels source checks (#148394) fix(test): avoid timeout failures before descendant readiness (#148410) fix: open browser side panel without creating a dashboard (#148471)
What Problem This Solves
Fixes repeated plugin-policy processing during model validation before chat completion requests.
User Impact
Model checks avoid repeatedly traversing the same plugin configuration. Provider suppression, explicit disables, allowlists, denylists, and configuration changes keep their existing behavior; no operator action is required.
Why This Change Was Made
Each suppression compilation checks all manifest plugins, but previously normalized the entire plugin configuration separately for each plugin. Prepare that configuration once and pass it through the existing eligibility owner, matching the sibling manifest-contract path. The exact-configuration resolver cache and its invalidation semantics remain unchanged.
Evidence