Skip to content

refactor(plugins): remove unused web runtime facades - #135274

Merged
steipete merged 1 commit into
mainfrom
codex/web-runtime175-current41ff-20260901
Sep 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/web-runtime175-current41ff-20260901

Conversation

@steipete

@steipete steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The private web-channel runtime facade still carried unused light-runtime, login, inbox, and media wrappers even though the package-root library only needs its monitor entry point. Those unused entry points duplicated loading paths and kept tests and assertion-baseline entries alive without production callers.

Why This Change Was Made

Remove those unused private facade exports and keep monitorWebChannel on its existing runtime boundary. The plugin discriminator still requires both light and heavy runtime artifacts; lazy asynchronous failure, method receiver and argument forwarding, native loading, and module-cache invalidation keep their existing owners.

Production changes are 175 lines removed with no replacement production lines. Tests decrease by 26 lines; the assertion baseline updates the remaining cast count from three to one. No public SDK, configuration, schema, protocol, dependency, or authorization contract changes.

User Impact

No intentional user-visible behavior change. The package-root monitor export remains available; operators do not need to change their configuration.

Evidence

  • Tests-first characterization and the candidate each passed the same eight cases across three suites, preserving case identities and within-file order. Coverage includes monitor forwarding and lazy rejection, the dual-artifact selector, real CommonJS module invalidation, and the library caller.
  • The normal changed-file gate passed all 30 selected checks through the configured Testbox route: workflow run. This was the prepared source-tree gate, not exact-head PR CI; independent remote installed-file hashes were not captured.
  • The ordinary full build completed all 16 stages, including unified entry declarations.
  • Three isolated synthetic projects imported the actual built package root: complete plugin plus decoy, runtime-only rejection, and ambiguous-plugin rejection. These passed with the real configuration/discovery/native-loading path. This is built-output synthetic proof, not a clean-install, official-plugin trust, live-channel, or live-authentication test.
  • The first package probe stopped before package import on a Darwin environment-bookkeeping assertion. A separate clean-environment Node diagnostic qualified that single observed key; a fresh second run preserved all other environment and product assertions and passed all three scenarios. The first run's fixtures and receipts were retained.
  • Fixture-root and known-process cleanup were verified. Six empty ordinary global database coordinator files attributable to the synthetic run were retained; no pre-run inventory established that they were newly created, and global filesystem cleanup is not claimed.
  • The precommit review and a separate review of exact commit 00a356e8801d5cc8987d150faa107e8053447b7d each completed two Codex passes with no actionable P0 findings. These are scoped P0 reviews, not all-priority certification. The exact-head review's single live observer raced removal of an ephemeral workspace, so effective reviewer-engine flags were not attested by that observation.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Sep 1, 2026
@steipete
steipete marked this pull request as ready for review September 1, 2026 14:45
@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 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 10:52 AM ET / 14:52 UTC.

ClawSweeper review

What this changes

The PR removes unused private web-channel runtime facades while preserving the package-root monitoring export and its lazy plugin runtime loading.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. The focused cleanup preserves the only core consumer’s lazy monitoring path, retains its runtime-boundary tests, and current main still contains the removed private wrappers; the maintainer label also prevents automatic cleanup closure.

Priority: P3
Reviewed head: 00a356e8801d5cc8987d150faa107e8053447b7d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative cleanup with retained boundary coverage and no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable: this maintainer-authored, behavior-neutral refactor retains the existing monitor behavior and provides focused boundary characterization; no external-contributor proof gate applies.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable: this maintainer-authored, behavior-neutral refactor retains the existing monitor behavior and provides focused boundary characterization; no external-contributor proof gate applies.
Evidence reviewed 6 items Retained production entry point: The package-root library’s sole web-channel runtime import remains lazy and forwards its monitor export, while the reduced facade continues to load and invoke that monitor entry point.
Plugin runtime contract: The WhatsApp runtime API continues to export monitorWebChannel, so the retained bridge still targets a plugin-owned runtime API rather than a removed core convenience wrapper.
Boundary behavior coverage: The updated tests cover lazy library loading, argument and receiver forwarding, rejection propagation, and cache invalidation after plugin lifecycle reset.
Findings None None.
Security None None.

How this fits together

The package-root library exposes selected OpenClaw capabilities to embedding applications. Its web-channel monitor call lazily resolves the activated channel plugin’s runtime API and starts the channel monitor.

flowchart LR
  A[Embedding application] --> B[Package-root library]
  B --> C[Lazy web-channel bridge]
  C --> D[Activated plugin runtime]
  D --> E[WhatsApp channel monitor]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed: this is an active maintainer-authored cleanup PR with no concrete review finding.
Agent review details

Security

None.

PR surface

Source -175, Tests -26, Other 0. Total -201 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 0 175 -175
Tests 1 75 101 -26
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 3 76 277 -201

Review metrics

Metric Value Why it matters
Production versus test delta production -175; tests -26; assertion baseline 1 changed The refactor materially reduces private production surface while retaining focused monitor-boundary coverage.

Technical review

Best possible solution:

Land the deletion once the exact-head required checks complete, keeping the package-root monitor bridge as the sole core-facing web-channel runtime path.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a behavior-neutral cleanup rather than a bug report; source tracing identifies the retained monitor path and targeted coverage for it.

Is this the best way to solve the issue?

Yes: removing uncalled private forwarding wrappers while preserving the one library monitor boundary is the narrowest maintainable solution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b754503dacc7.

Labels

Label changes:

  • add P3: This is a behavior-neutral internal cleanup with no demonstrated user-facing regression.
  • 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: Not applicable: this maintainer-authored, behavior-neutral refactor retains the existing monitor behavior and provides focused boundary characterization; no external-contributor proof gate applies.

Label justifications:

  • P3: This is a behavior-neutral internal cleanup with no demonstrated user-facing regression.
  • 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: Not applicable: this maintainer-authored, behavior-neutral refactor retains the existing monitor behavior and provides focused boundary characterization; no external-contributor proof gate applies.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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 self-assigned this Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer review is complete for 00a356e8801d5cc8987d150faa107e8053447b7d. The cleanup removes 175 production lines and 26 test lines without replacing the private wrappers. The package-root monitor, dual-artifact selection, lazy failures, argument/receiver forwarding and cache-lifecycle ownership remain intact.

The original/candidate eight-case characterization, full 30-check configured gate, ordinary full build and three actual built-package synthetic scenarios are complete, along with the precommit and separate exact-head Codex P0 reviews described in the PR body. Native scripts/pr review-validate-artifacts 135274 passed with no findings; OPENCLAW_TESTBOX=1 scripts/pr prepare-run 135274 accepted exact-head CI without rebasing or pushing.

The completed ClawSweeper review has no actionable findings. Its remaining maintainer-review step is satisfied by this source and evidence review. The native captured-main comparison preserves all 28 selected source contexts. The shrink-only assertion-baseline change must retain every unrelated main row.

Proof limits remain unchanged: synthetic built output is not clean-install or authenticated live-channel proof; no independent remote installed-file inventory was captured; the earlier fixture/coordinator and reviewer-observer limitations remain documented in the body. Normal merge admission and actual-parent tree/cleanup verification are still required.

@steipete
steipete merged commit 60c5793 into main Sep 1, 2026
286 checks passed
@steipete
steipete deleted the codex/web-runtime175-current41ff-20260901 branch September 1, 2026 15:50
@steipete

steipete commented Sep 1, 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: M 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