Repository navigation
refactor(core): collapse internal facades and helper modules - #165322
Conversation
Route internal callers directly to their implementation owners and fold single-consumer helpers into the existing Gateway, plugin, and CLI owners. Preserve public SDK surfaces, lazy-loading boundaries, and runtime behavior.
|
🦞👀 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 5, 2026, 12:15 AM ET / 04:15 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch removes internal forwarding modules and moves private helpers into their existing Gateway, plugin, delivery, and CLI owners. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this remains useful internal cleanup, and no actionable introduced defect was found. The previous compatibility warning is unsupported by the actual patch: configuration, defaults, public APIs, and stored-data contracts remain unchanged. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s Gateway, plugin loader, delivery queue, and CLI consume shared implementations for authentication, session reads, installation, and reporting. This refactor shortens those internal paths while preserving their existing outputs and checks. flowchart TD
A[Gateway requests] --> D[Existing implementation owners]
B[Plugin registration and installation] --> D
C[CLI and delivery operations] --> D
D --> E[Authentication and policy checks]
D --> F[Session and delivery operations]
D --> G[Operator output]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -93, Tests +1, Config -1, Other -1. Total -94 across 58 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep direct internal imports and private helpers with their existing owners while preserving public exports, lazy loading, authorization checks, and persisted formats. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes internal cleanup rather than a reported behavior defect; no introduced failing path was established. Is this the best way to solve the issue? Yes: removing forwarding modules and keeping single-consumer helpers private is consistent with existing ownership, and the inspected patch preserves the relevant contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cbe3ff13b844. 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)
|
|
Exact-head landing evidence for
Landing the exact reviewed head under the explicitly authorized inherited-main-failure exception. The cron cross-process custody failure remains an unrelated follow-up; this is not a green-CI claim. |
…w#165322) Route internal callers directly to their implementation owners and fold single-consumer helpers into the existing Gateway, plugin, and CLI owners. Preserve public SDK surfaces, lazy-loading boundaries, and runtime behavior.
What Problem This Solves
Core callers traverse internal facades and single-consumer modules to reach implementations that already have a clear owner.
User Impact
No user-visible behavior, configuration, protocol, or data-contract change. Public SDK entry points and lazy-loading boundaries remain intact.
Why This Change Was Made
Remove 16 internal modules by importing their existing owners directly or keeping private helpers with their sole consumer. This covers Gateway device authentication and timeouts, queue claims, transcript parsing, APNs payloads, plugin registrars and installation checks, and CLI formatting/update reporting.
Evidence
--maxWorkers=1.pnpm check:changedpassed in 1,825.18 seconds, including typechecking, lint, dead-export scans, and zero runtime value import cycles.b0c93a84e9e267a864d1bc89b0e6ea022a3d0637; only shared assertion-baseline context changed among the candidate paths. Hosted CI run 37261748237 tested exact head12faf071401fe1eb0ebd69707b2db0bd9ad3fcff. Its sole test failure is the unrelated cron-authority lock timeout reproduced on pinned main60e6081c2f6d1b40e1206e4ac363d3451d7227aa(1 failed / 2 passed, 584.99 seconds including cold preparation). Inherited-failure landing evidence. The supplemental Gateway comparison was cancelled after source sync stalled; it is not claimed as passing proof.