Repository navigation
refactor(runtime): deslop single-use adapters - #165109
Conversation
Inline private forwarding bags, factories, and projections into their callers across channels, providers, capability commands, reply parsing, and Control UI. Preserve public contracts, output, lazy loading, and lifecycle/authority checks. Exercise the retained parser and MCP form boundaries in existing tests.
|
🦞👀 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 October 4, 2026, 5:22 PM ET / 21:22 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR inlines private adapters into existing channel, provider, CLI, reply-parser, and Control UI owners and moves existing tests to retained entry points. Merge readiness⛔ Blocked before merge - 1 item remains Keep open with no blocking correctness findings. Source comparison resolves the previous migration concern: the refactor preserves stored-data contracts and remains distinct from work already on main. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw routes commands, messages, provider events, and UI actions through runtime owners. These owners select targets, perform operations, and return replies, capability results, or UI state. flowchart LR
A[Messages and commands] --> C[Existing runtime owners]
B[Provider events and UI actions] --> C
C --> D[Target and lifecycle checks]
D --> E[Channel and provider operations]
E --> F[Replies and capability results]
E --> G[UI state]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1020, Tests +26, Other 0. Total -994 across 33 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the simplified flows in their existing owners while preserving public contracts, lifecycle checks, and observable outputs. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes internal restructuring rather than a reported behavior defect; no introduced failure was established. Is this the best way to solve the issue? Yes: the diff removes private forwarding layers while retaining existing owners and meaningful boundary assertions, without adding parallel APIs or configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 343e56d88714. LabelsLabel changes: No label changes. Label 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.
|
Inline private forwarding bags, factories, and projections into their callers across channels, providers, capability commands, reply parsing, and Control UI. Preserve public contracts, output, lazy loading, and lifecycle/authority checks. Exercise the retained parser and MCP form boundaries in existing tests.
What Problem This Solves
Private command, channel, provider, and UI flows carry single-use factories, option bags, and result adapters that duplicate facts their callers already own.
User Impact
No user-visible change. Config keys, persisted data, protocol payloads, CLI output, model-facing descriptions, and UI rendering remain unchanged. Public plugin SDK seams, lazy loading, and lifecycle/authority boundaries remain intact.
Why This Change Was Made
This second pass after #164806 removes 1,020 net production lines (2,114 added, 3,134 removed; tests and baselines excluded) in one batch:
Existing group-parser assertions now exercise the retained parser entry point. Seven MCP tests now submit the rendered form and retain config-before-session, failure, and navigation checks. No tests were skipped or assertions weakened. The assertion baseline shrinks with a removed cast.
Evidence
echoText; the separate caption send owns that text echo, and the persistence owner treats absent and undefined text identically.check-madge-import-cycles.tsandcheck-import-cycles.tsreport zero.226e80a8a44.runMemoryEmbeddingCreateinto its single action handler. It keeps the samecreateEmbeddingProviderarguments,embedBatch(texts, { inputType: "document" }), cleanup, and transient{ text, embedding, dimensions }output. It adds no storage write, schema, vector-index metadata, or migration. Existingcapability-cli.test.tsprovider-selection, JSON/vector ordering, dimension/text rendering, and cleanup-error cases passed on the exact head. The automated data-model flag is a path-based false positive; no upgrade transform is required.