Skip to content

refactor(setup): preserve plugin configuration types - #142006

Merged
steipete merged 1 commit into
mainfrom
codex/split-search-config-types
Sep 8, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/split-search-config-types

Conversation

@steipete

@steipete steipete commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 8, 2026
@steipete
steipete marked this pull request as ready for review September 8, 2026 07:56
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 4:05 AM ET / 08:05 UTC.

ClawSweeper review

What this changes

Search 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
Reviewed head: a01e9acaa8e89911c2ebf107e99b34fb0c0e2a69

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused cleanup supported by existing types and preservation coverage, with no actionable defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a member-authored PR, and the changed preservation function retains its runtime operations; no authority-related proof exception applies.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a member-authored PR, and the changed preservation function retains its runtime operations; no authority-related proof exception applies.
Evidence reviewed 7 items Introduced change: The pinned merge-base-to-head diff removes five type assertions without changing runtime operations; the baseline decreases from six to one.
Existing configuration contract: Plugin entries already have optional boolean enabled fields, and PluginsConfig already types allow and entries. Object spreads, deletion of optional fields, and assignment back to configuration retain these types.
Existing behavior coverage: Inspected tests cover disabled search preservation, explicit reenabling, and installation while search stays disabled. The PR reports sixteen tests and canonical changed checks passing; this read-only review did not execute them.
Findings None None.
Security None None.

How this fits together

Search 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -4, Other 0. Total -4 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 9 -4
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 2 6 10 -4

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a behavior-preserving type-safety cleanup with no new configuration or runtime capability.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a member-authored PR, and the changed preservation function retains its runtime operations; no authority-related proof exception applies.

Label justifications:

  • P3: This is a behavior-preserving type-safety cleanup with no new configuration or runtime capability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a member-authored PR, and the changed preservation function retains its runtime operations; no authority-related proof exception applies.

Evidence

What I checked:

  • Introduced change: The pinned merge-base-to-head diff removes five type assertions without changing runtime operations; the baseline decreases from six to one. (src/flows/search-setup.ts:348, a01e9acaa8e8)
  • Existing configuration contract: Plugin entries already have optional boolean enabled fields, and PluginsConfig already types allow and entries. Object spreads, deletion of optional fields, and assignment back to configuration retain these types. (src/config/types.plugins.ts:90, a01e9acaa8e8)
  • Existing behavior coverage: Inspected tests cover disabled search preservation, explicit reenabling, and installation while search stays disabled. The PR reports sixteen tests and canonical changed checks passing; this read-only review did not execute them. (src/flows/search-setup.test.ts:513, a01e9acaa8e8)
  • Still absent from fetched main: Fetched main retains the generic-record assertions in the preservation function. (src/flows/search-setup.ts:349, 144b17f5096e)
  • Release comparison: The same assertions remain in the supplied latest release, v2026.9.2. (src/flows/search-setup.ts, 3928bad9badf)
  • Area history and routing: Main-branch history records repeated search-setup work by Peter Steinberger. GitHub commit metadata identifies steipete and supplies the recent forwarding-layer patch. Local deep blame/history inspection encountered an unavailable historical blob, so no original-feature introduction claim is made. (src/flows/search-setup.ts:20, f450917f7854)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit f5a30f8 into main Sep 8, 2026
247 checks passed
@steipete
steipete deleted the codex/split-search-config-types branch September 8, 2026 08:16
@steipete

steipete commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant