Repository navigation
refactor(setup): preserve plugin configuration types - #142006
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 8, 2026, 4:05 AM ET / 08:05 UTC. ClawSweeper reviewWhat this changesSearch setup retains the existing plugin configuration types instead of casting through generic records, and reduces the corresponding assertion baseline. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped cleanup with no actionable correctness findings. The assertions remain on fetched main and in v2026.9.2; the maintainer-protected PR should remain open for normal landing. Priority: P3 Review scores
Verification
How this fits togetherSearch setup combines existing configuration with a selected provider’s setup results. Its preservation step keeps disabled search and plugin settings intact before returning configuration to the caller. flowchart TD
A[Existing configuration] --> C[Search setup]
B[Selected provider] --> C
C --> D[Provider setup result]
D --> E[Preserve disabled settings]
A --> E
E --> F[Configuration returned to caller]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -4, Other 0. Total -4 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the canonical configuration types through the preservation function and retain the exact shrink-only baseline adjustment. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes unnecessary assertions rather than repairing a reported runtime failure. Is this the best way to solve the issue? Yes. Using the existing configuration types removes the widening directly without introducing helpers, alternate APIs, or changed settings. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 144b17f5096e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Search setup widens already typed plugin configuration to generic records, then asserts it back to OpenClawConfig. This hides type errors while restoring disabled search settings.
Why This Change Was Made
Remove five unnecessary assertions in the existing function and shrink its assertion baseline from six to one. The real config and plugin-entry types already support each operation. No helper extraction or runtime ownership change is needed.
This two-file cleanup is split from #140674. Production loses four lines. Runtime operations, evaluation order, configuration shape, and caller behavior are unchanged.
Evidence
All sixteen existing search-setup tests pass, including disabled-state preservation, explicit reenabling, provider-owned setup, credentials, installation, and consent outcomes. Runtime-erased syntax is equivalent across the complete source file; all text outside the changed function is identical. Codex review found no actionable issues.
The complete canonical changed checks passed, including production typechecking and the exact assertion-baseline reduction. No new tests, live provider calls, or full build are needed for this type-only change with unchanged runtime behavior.