Repository navigation
refactor(plugins): reuse auth config merge dispatch - #147933
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. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 6:57 AM ET / 10:57 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR reuses the existing provider-auth configuration merger’s recursive dispatch and adds coverage for preserved merge, replacement, sanitization, deletion, and input-preservation behavior. Merge readiness✅ Ready for maintainer review Keep open: the maintainer’s sponsorship clarification supports this focused refactor, and source inspection found no actionable correctness defect. Current main still contains the duplicate dispatch. Priority: P3 Review scores
Verification
How this fits togetherProvider sign-in can return configuration updates that OpenClaw combines with existing settings. This helper sanitizes and normalizes those updates before callers pass them to the configuration writer. flowchart TD
A[Provider sign-in result] --> C[Configuration merge]
B[Existing settings] --> C
C --> D{Both values are records?}
D -->|Yes| E[Merge allowed properties]
D -->|No| F[Sanitize replacement]
E --> G[Delete undefined fields and normalize models]
F --> G
G --> H[Configuration writer]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -5, Tests +47. Total +42 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep recursive merge and replacement decisions in the existing dispatcher while preserving configuration and sanitization contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: the PR explicitly characterizes existing behavior rather than reporting a defect; no failing current-main behavior is claimed. Is this the best way to solve the issue? Yes: delegating to the existing entry guard removes duplicate branching without adding another owner or changing the supported configuration contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against df663a946582. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
2a7caf2 to
fb82d45
Compare
|
@clawsweeper re-review Please review head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing under No concrete defect or explicitly sponsored deliverable is identified. Retain or resubmit only with a reproducible |
|
Clarifying the sponsorship missing from the body: this specific canonical-merge consolidation was explicitly selected for the active maintainer-requested maintainability and duplication-reduction deliverable allowed by Unchanged head |
|
Merged via squash.
|
* commit '3c08384584f57787a26da9998488233fc15ccf7e': (122 commits) fix(agents): keep tool result summaries when middleware details exceed shape limits (#147805) test: make full-suite fixtures portable across runtimes (#148247) refactor(qa): share unknown confidence results (#148200) chore(android): remove unused test dependencies and duplicate Wear settings (#148231) test: reuse compiled preflight in startup fixtures (#148330) test(wizard): route recovery integration through database forks (#148337) refactor(plugins): simplify provider auth patch recursion (#147933) fix(cli): drain failed web capability output (#148234) refactor(android): remove unused production helpers (#148233) fix(plugins): scope feed integrity to hosted ClawHub (#148220) test(qa): compare Telegram entities semantically (#148219) test(qa): recognize native Slack exec progress rows (#148217) test(cron): distinguish repeated delivery incidents (#148151) test(qa): preserve restart command ownership (#148218) test(qa): isolate bundled skill CLI gateway state (#148150) test(qa): align process lifecycle contracts (#148149) improve(media): reduce metadata fetched during orphan cleanup (#148244) fix(matrix): retain sync state runtime for deferred persistence (#148152) test: deduplicate gateway watch exit fixtures (#148237) refactor(cli): derive daemon status contract from gatherer (#148108) ...
What Problem This Solves
The provider-auth config merger repeats its own record-versus-replacement decision inside the recursive loop.
This specific canonical-merge consolidation was explicitly selected for the active maintainer-requested maintainability and duplication-reduction deliverable permitted by
CONTRIBUTING.md. The goal is to leave that policy in one existing owner; the tests characterize preserved behavior.User Impact
Config patches keep the same recursive merge, replacement, sanitization and deletion behavior.
Why This Change Was Made
Call the existing merge function for each allowed property so its entry guard owns the decision. Remove the duplicate inner branch. Production: −5 lines; tests: +47 lines.
Evidence
fb82d4547732cead72cf4b91c952a7f79d513d33against parent069710f909f0a7158777d0fc0bf1eab84e20c699passedgit diff --checkand a fresh P2 review with no actionable findings. P2 used the supplied diff and entry-guard context; primary review supplied full owner and contract context. No tests were executed by P2.161fc83df4fe538acf175430afc0ed2f0f9d3d52(47060d1cef27c69794b68f6652ba183ad65a494d+ reviewed head); both changed files match the reviewed bytes. Target job 103905427331 executed all 22 provider-auth helper cases, including the new nested merge/replacement/input-preservation case. The worker-provider-registry sibling suite also executed all 22 cases. Types, lint, dependencies, build and UI gates passed; pinned formatting checked 38,122 files.