Skip to content

refactor: share channel probe runner - #113540

Merged
steipete merged 1 commit into
mainfrom
codex/sdk-probe-runtime
Jul 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/sdk-probe-runtime

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Six channel probes duplicated timing, exception normalization, and result scaffolding around their channel-specific checks.

Why This Change Was Made

This AI-assisted refactor introduces runChannelProbe as the shared runner while leaving each channel's transport and status interpretation local.

User Impact

Probe behavior and channel-specific results are preserved, with one owner for timing and error handling.

Release-note context: none; this is a behavior-neutral channel probe refactor.

Evidence

  • 136 focused tests passed across the SDK helper and Slack, Discord, Matrix, Mattermost, Signal, and Telegram probes.
  • Changed gate: Blacksmith Testbox tbx_01kybbcywd4a36reg515fzw0ps, Actions run 30136794596.
  • Plugin SDK surface check and git diff --check passed.
  • Autoreview: clean, no actionable findings.

@steipete
steipete marked this pull request as ready for review July 25, 2026 06:40
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 25, 2026, 2:53 AM ET / 06:53 UTC.

ClawSweeper review

What this changes

The PR consolidates timeout, elapsed-time, and error-result handling for Discord, Matrix, Mattermost, Signal, Slack, and Telegram diagnostic probes into a shared Plugin SDK runner.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 5 items remain

Keep this PR open for a Plugin SDK contract decision. The refactor removes repeated probe scaffolding, but it also adds runChannelProbe as a new public SDK export; the supplied discussion contains no maintainer approval or explicit permanent contract rationale for that surface.

Priority: P3
Reviewed head: e7777b864f46ce396cda008cb3b761efbba196d0
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The refactor has useful automated validation, but it lacks real runtime proof and leaves the new public Plugin SDK contract unconfirmed.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR reports focused tests and CI checks, but no after-fix live probe output or redacted runtime transcript is included. Add redacted terminal or runtime evidence showing a successful probe and normalized timeout/error result; updating the PR body should trigger a fresh review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR reports focused tests and CI checks, but no after-fix live probe output or redacted runtime transcript is included. Add redacted terminal or runtime evidence showing a successful probe and normalized timeout/error result; updating the PR body should trigger a fresh review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items New public SDK surface: The branch exports runChannelProbe from the existing openclaw/plugin-sdk/text-utility-runtime module, making a generic probe runner available to plugin consumers rather than keeping this solely as a local refactor.
Six bundled consumers adopt the helper: The supplied PR diff imports the new runner from the public Plugin SDK path in Discord, Matrix, Mattermost, Signal, Slack, and Telegram probes, so the new SDK contract is the mechanism that enables the deduplication.
Probe type boundary: The shared exported helper constrains its generic result with BaseProbeResult, while the current public channel type barrel is explicitly described as the stable plugin-facing type barrel; this makes the helper an SDK-level compatibility choice rather than a purely private utility.
Findings 1 actionable finding [P1] Confirm the new Plugin SDK contract before exporting it
Security None None.

How this fits together

Channel probes validate channel credentials and connectivity for setup and diagnostics. Individual channel plugins perform transport-specific checks, then return normalized results consumed by channel configuration and health feedback.

flowchart LR
  Inputs[Channel credentials and settings] --> Probes[Channel-specific probes]
  Probes --> Runner[Shared probe runner]
  Runner --> Checks[Transport and API checks]
  Checks --> Results[Normalized probe results]
  Results --> Diagnostics[Setup and diagnostic feedback]
Loading

Decision needed

Question Recommendation
Should runChannelProbe become a supported long-term Plugin SDK API for external plugins, or should this deduplication remain limited to bundled channel implementations? Adopt the SDK contract: Approve runChannelProbe as a supported Plugin SDK helper and add the contract-level documentation or coverage that defines its timeout and error behavior.

Why: The refactor requires a shared importable seam across bundled plugins, but exporting it from a public SDK module establishes a compatibility contract beyond the immediate cleanup.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports focused tests and CI checks, but no after-fix live probe output or redacted runtime transcript is included. Add redacted terminal or runtime evidence showing a successful probe and normalized timeout/error result; updating the PR body should trigger a fresh review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Confirm the new Plugin SDK contract before exporting it (P1) - runChannelProbe is exported from a public openclaw/plugin-sdk runtime module and is immediately used by six bundled plugins. That turns this refactor into a supportable external API commitment, but the PR provides no maintainer-visible contract decision or definition of its timeout/error semantics. Either approve and document this public SDK API with focused contract coverage, or use an approved bundled-only seam.
  • Resolve merge risk (P2) - Merging creates a new stable Plugin SDK entry point whose timeout, error-normalization, and result-shaping behavior external plugins may begin to depend on, without an explicit owner decision about that long-term contract.
  • Complete next step (P2) - A maintainer must decide whether the extracted runner is a permanent external Plugin SDK contract before a mechanical repair path is appropriate.

Findings

  • [P1] Confirm the new Plugin SDK contract before exporting it — src/plugin-sdk/text-utility-runtime.ts:7-15
Agent review details

Security

None.

PR surface

Source -10, Tests +29. Total +19 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 7 391 401 -10
Tests 2 50 21 +29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 441 422 +19

Review metrics

Metric Value Why it matters
Plugin SDK exports 1 added public helper The new helper is imported through the public Plugin SDK path by six channel implementations, so it becomes a compatibility surface rather than only a local extraction.

Merge-risk options

Maintainer options:

  1. Confirm the public SDK contract (recommended)
    Before merge, decide that external plugins may rely on this runner and define its supported timeout and error-result behavior.
  2. Avoid the new public surface
    Move the shared implementation to an approved bundled-only seam if maintainers do not want external plugins to inherit this API.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Obtain explicit Plugin SDK contract approval, document the intended public behavior, and add focused contract coverage for timeout and error normalization.

Technical review

Best possible solution:

Either explicitly accept and document runChannelProbe as a stable Plugin SDK contract with focused external-consumer coverage, or move the shared logic behind an approved bundled-plugin-only seam before merging.

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

Not applicable: this PR refactors existing probe behavior rather than fixing a reported user-visible failure. The review question is whether the extracted runner preserves behavior and has an approved public contract.

Is this the best way to solve the issue?

No, not yet: sharing the code is reasonable, but exposing the helper from a public Plugin SDK module needs an explicit decision about whether external plugins may depend on its behavior.

Full review comments:

  • [P1] Confirm the new Plugin SDK contract before exporting it — src/plugin-sdk/text-utility-runtime.ts:7-15
    runChannelProbe is exported from a public openclaw/plugin-sdk runtime module and is immediately used by six bundled plugins. That turns this refactor into a supportable external API commitment, but the PR provides no maintainer-visible contract decision or definition of its timeout/error semantics. Either approve and document this public SDK API with focused contract coverage, or use an approved bundled-only seam.
    Confidence: 0.85

Overall correctness: patch is incorrect
Overall confidence: 0.78

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a low-risk cleanup proposal, with the remaining concern limited to SDK contract ownership rather than an observed runtime outage.
  • add merge-risk: 🚨 compatibility: The branch adds a reusable exported Plugin SDK API that can become an external compatibility commitment after release.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused tests and CI checks, but no after-fix live probe output or redacted runtime transcript is included. Add redacted terminal or runtime evidence showing a successful probe and normalized timeout/error result; updating the PR body should trigger a fresh review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a low-risk cleanup proposal, with the remaining concern limited to SDK contract ownership rather than an observed runtime outage.
  • merge-risk: 🚨 compatibility: The branch adds a reusable exported Plugin SDK API that can become an external compatibility commitment after release.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused tests and CI checks, but no after-fix live probe output or redacted runtime transcript is included. Add redacted terminal or runtime evidence showing a successful probe and normalized timeout/error result; updating the PR body should trigger a fresh review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • New public SDK surface: The branch exports runChannelProbe from the existing openclaw/plugin-sdk/text-utility-runtime module, making a generic probe runner available to plugin consumers rather than keeping this solely as a local refactor. (src/plugin-sdk/text-utility-runtime.ts:7, e7777b864f46)
  • Six bundled consumers adopt the helper: The supplied PR diff imports the new runner from the public Plugin SDK path in Discord, Matrix, Mattermost, Signal, Slack, and Telegram probes, so the new SDK contract is the mechanism that enables the deduplication. (extensions/telegram/src/probe.ts:7, e7777b864f46)
  • Probe type boundary: The shared exported helper constrains its generic result with BaseProbeResult, while the current public channel type barrel is explicitly described as the stable plugin-facing type barrel; this makes the helper an SDK-level compatibility choice rather than a purely private utility. (src/channels/plugins/types.public.ts:1, 9698d3895008)
  • Proof supplied is test-only: The PR body reports focused tests, changed-gate checks, and SDK surface checks, but it does not provide a redacted after-fix runtime probe transcript or live output. Those checks are useful supplemental validation but do not demonstrate real channel-probe behavior. (e7777b864f46)

Likely related people:

  • steipete: The supplied PR context identifies steipete as author of the sole commit introducing the cross-channel runner; the available review context did not expose enough current-main feature history to identify a separate SDK owner confidently. (role: shared-probe design author; confidence: low; commits: e7777b864f46; files: src/plugin-sdk/text-utility-runtime.ts, extensions/telegram/src/probe.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Obtain an explicit decision on whether runChannelProbe is a supported external Plugin SDK API.
  • Add redacted after-fix probe output or a reproducible runtime transcript for the shared success and timeout/error paths.

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.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram size: L maintainer Maintainer-authored PR labels Jul 25, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper finding and rank-up moves resolved for landing:

  • Maintainer decision: approve runChannelProbe as a supported external Plugin SDK API in openclaw/plugin-sdk/text-utility-runtime. Its supported contract is the documented and tested behavior on this head: apply an optional timeout; provide startedAt and elapsedMs() to the transport-specific callback; preserve an explicit result elapsedMs or add one; rethrow when no onError mapper is supplied; otherwise return the mapper's typed error result with elapsed time.
  • The focused SDK contract tests cover success timing, explicit timing preservation, and timeout/error shaping. Six bundled consumers retain transport-specific parsing, retries, and result fields, with 136 focused probe tests, the SDK surface check, hosted CI 30147916436 attempt 2, Workflow Sanity 30147914779 attempt 2, and Labeler 30147914738 attempt 2 green.
  • Skipping a new credentialed live-provider transcript for this behavior-preserving scaffold extraction. The maintainer accepts the focused contract/channel tests and remote gates; provider-specific network behavior was not moved into the helper.

This is the explicit Plugin SDK contract approval requested by the review and resolves the P1 ownership finding.

@steipete
steipete merged commit 92a35b5 into main Jul 25, 2026
323 of 348 checks passed
@steipete
steipete deleted the codex/sdk-probe-runtime branch July 25, 2026 07:24
@steipete

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

channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant