Repository navigation
refactor(runtime): fold private status and channel owner surfaces - #177290
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 changes before merge. What this changesThis PR moves private status and bundled plugin helpers into their existing callers and migrates tests to those owners. Example: Run openclaw gateway status --json against two URLs reporting gateway-instance-1.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it provides useful, maintainer-directed consolidation, and no introduced correctness or security defect was found; GitHub reports conflicts and the PR remains draft. Priority: P3 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherStatus commands consume configuration, service and Gateway facts to produce reports; bundled plugin runtimes consume actions and inbound messages to produce browser results, channel feedback and command menus. flowchart TD
A[CLI requests] --> B[Status command owners]
C[Service and Gateway facts] --> B
B --> D[Text and JSON reports]
E[Plugin actions and messages] --> F[Existing plugin runtime owners]
F --> G[Browser and channel transports]
Technical reviewBest possible solution: Retain the owner consolidation while resolving conflicts without discarding current main's channel-account notes changes. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor, so there is no reported failing user scenario to reproduce; review compared the pinned original implementations with their destination owners. Is this the best way to solve the issue? The consolidation follows existing ownership, removes superseded forwarding paths, and preserves the inspected contracts without replacement production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b28c930d1596. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -545, Tests -112, Other -28. Total -685 across 53 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 7:52 AM ET / 11:52 UTC. |
4969bcf to
6ed2bcc
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Merged via squash.
|
Merges upstream main at b90b2cf. - extensions/telegram/src/bot-handlers.inbound-processing.ts: main deleted it in openclaw#177290, which moved Telegram inbound processing into bot-handlers.inbound-pipeline.ts. Take the deletion. - extensions/telegram/src/bot-handlers.inbound-pipeline.ts: the singleton media ref built after the deferred download carries fileUniqueId again, the one line this branch had added in the deleted file. The diff against main stays 6 files, +394/-3.
What Problem This Solves
Status commands and bundled channel runtimes forward caller-owned facts through private modules with one production consumer. Direct helper tests keep some of those surfaces exported.
User Impact
No intended user-visible change, migration or operator action. Status JSON/text, channel feedback, Browser results, Telegram delivery and ClickClack command menus keep their existing behavior. Public SDK/package exports, protocol, config and persisted shapes remain unchanged. Phase E is untouched.
Why This Change Was Made
Keep service summaries in their shared status runtime, JSON composition in the JSON command, Gateway warning selection in its command, token summaries in the channel account loop, and diagnosis rendering in status --all. Keep Browser actions in their dispatcher and Telegram processing in its existing inbound pipeline. Keep Discord acknowledgement and typing feedback in their runtime owners, action dispatch in its existing dispatcher, and ClickClack command-menu synchronization in Gateway startup.
Remove the single-consumer modules and argument packets. Retained private helpers stay local; no replacement production export, test seam, dependency or public contract is added. Existing leaf coverage moves through the actual commands, action dispatcher and Gateway startup fixture. The status-all fixture is shared only by tests, keeping both owner suites within their existing limits. Exact obsolete baseline rows only shrink.
Best-effort tradeoffs accepted
Net LOC
Final formatted measurement: 545 net production lines removed (+1828/-2373) across 26 production paths. Tests, fixtures/support, declarations/generated files and shrink-only metadata are excluded.
Evidence
Complete retired-owner and caller inspection, importer/provenance census, and author simplification are complete. The sole CLI importer of status-json remains dynamic and is not folded. Private runtime imports that remain lazy stay at their original effect points. Frozen/prefer-offline setup, canonical formatting, cap-sensitive syntax lint and whitespace pass; no budget increased.
Initial focused proof passed Browser (97 cases), Discord (187), Telegram (25 database-worker plus 13 ordinary), ClickClack (22), and the retained helper/health/daemon/command siblings. It found owned fixture type/collection issues and an install-guidance test relying on the operator account home. Repairs retain a synthetic temporary home, mock the OS account identity using the established daemon-test pattern, use valid presence/health facts, and separate the hoisted declaration from its export. Assertions, guards and production behavior remain unchanged.
Fresh whole-candidate independent P0–P2 review after those repairs completed scoped-clean with final source verification; its status and report were inspected. Repaired runtime proof passed all four affected owner suites: 69 cases. The mock ratchet passed (8,383 grandfathered factories); repaired-file typed lint passed. Runtime and Madge cycle checks report zero; script lint, extension syntax lint and whitespace pass. Final 29-root native typecheck passes after supplying the fixture's required text field; the affected Gateway fixture's final runtime proof passes all 27 cases, and its typed lint passes. Unchanged-input proof is reused rather than rerunning the other owner suites.
The first commit attempt correctly refused growth of an already oversized Windows startup suite. A shared test-only fixture now supplies the same three spies and real status-summary entry point to both existing suites; the Windows file stays at its previous size, with no allowance increase or production test seam. The final whole-candidate independent P0–P2 review is scoped-clean with final source verification. Targeted 29-root native types and the two fixture consumers pass (37 Windows startup and 6 service-summary cases); no retained assertion was removed.
On the initial head, the suppression suite passed 13 cases and failed the listed main-only MCP/provider inventory assertion (98 versus 97, scheduled main 39218528567). That failure was retained rather than relabeled green; this lane changed none of its sources or allowances.
GitHub then reported CONFLICTING. The authorized rebase onto 9509fc2 preserves main's report-data table/local-overview cleanup from #177097 and its channel-note owner. The shared report fixture remains, with main's cases and assertions intact; two orphan imports are removed. The signed repaired head is 6ed2bcc, with the same 545 net production reduction. Frozen setup and the 29-root native typecheck pass. All five affected focused suites pass: 21 diagnosis, 39 report/channel and 14 suppression cases. Main's ab76239 inventory reconciliation and #177150 MCP cleanup explain why the old inventory signature is no longer present on this revision; no allowance was expanded by this PR. Affected-file typed lint passes; runtime and Madge cycle checks both report zero. Whitespace is clean. The mechanical conflict adaptation reuses the unchanged-input independent review above.
Exact-head CI 39248309794 completed successfully on 6ed2bcc; its effective openclaw/ci-gate check 118052914239 succeeded. The exact-head watcher reports GREEN. Cancelled administrative context check 118045528326 is superseded by same-head success 118045581778; no failed or pending check remains. No CI rerun or re-push for green occurred. No local broad suite, build, E2E, whole-graph typecheck or operator-state access is claimed. Prior-head proof is reused only for unchanged inputs; hosted evidence above is for the repaired exact head.
Merged through the ordinary native workflow as 6266041. Fresh fetched main 972c9ff contains that squash commit (
git merge-base --is-ancestorpassed). Native closeout completed, including ownership-checked managed worktree/branch cleanup and the completion comment.