Skip to content

refactor(channels): deslop small channel and access plugins - #158441

Merged
steipete merged 5 commits into
mainfrom
deslop/l58-small-channels
Sep 26, 2026
Merged

steipete merged 5 commits into
mainfrom
deslop/l58-small-channels

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #158398

What Problem This Solves

Maintainer-requested cleanup of repeated transport flows, copied types, and private forwarding layers in the smaller channel and access plugins.

User Impact

Authorization and verification order, credential precedence and diagnostics, outbound formatting/media, protocol parsing, config/tool schemas, and persisted state remain unchanged. Teams setup now correctly reports its existing live-caption support. No migration or operator action is required.

Why This Change Was Made

The sweep removes 1,139 net production lines across ten plugins without expanding the SDK. All scoped production files were read largest-first. Radius and Visitor Access were also fully read; their remaining protocol, authority, expiry, and reconciliation paths enforce distinct contracts and were retained.

  • Twitch: unify ID/login resolution and target rejection, simplify scalar send extraction, remove unused registry state, type monitor config at its boundary, and remove narrating comments and obsolete guards.
  • Zalo: remove single-use send/result/webhook forwarding, reuse processing contexts, share initial/retry secret prompts, and move private runtime-barrel consumers to documented SDK owners.
  • Nextcloud Talk: reuse SDK allowlist prompting and outbound routing, infer webhook types from the unchanged validator, share adapter mapping, and remove single-use credential/delivery wrappers. Keep the explicit outbound-to-message context projection because their delivery-result callbacks have different contracts.
  • IRC: share repeated setup-field operations and login-failure handling while keeping nickname recovery first and parsing/chunking unchanged.
  • Teams/Zoom Meetings: use existing platform, Chrome transport, and probe owners directly; share repeated microphone-state refresh and inline sole-consumer browser fragments. Platform-specific admission and click semantics remain explicit.
  • QA Channel: use canonical protocol request types and SDK imports; remove two private forwarding barrels, redundant typed-payload validation, and duplicate preview replacement branches. Public exports and target/thread/media precedence remain intact.
  • IMAP: reuse equivalent SDK string filtering and timing-safe token comparison; retain the intentional compile-time authentication-strength exhaustiveness guard.
  • Session Share: remove a single-use invocation-policy factory and duplicate diagnostic promise completion handling.
  • Raft: compose existing setup metadata/account configuration instead of copying it into the runtime plugin.

The assertion allowance ledger shrinks by exactly 15 casts in seven touched files. Tests/support grow by 25 lines. No SDK exports, manifests, config keys, or persistence formats change.

Fixes found along the way

Teams setup claimed caption scraping was disabled although the adapter enables captions and the existing generated-DOM test proves capture. The new setup regression failed on the original wording (1 failed / 3 passed), then passed all four cases after the diagnostic correction. No meeting permission or capture behavior changes.

Evidence

Blacksmith Testbox via the repository Crabbox wrapper, Linux / Node 24.19.0 / pnpm 12.4.2. The wrapper verified each source tree, and the final payload independently checked hashes for every changed file. Both proof leases are stopped.

  • All eleven pnpm test:extensions:batch <plugin> selections passed: Nextcloud Talk 223 tests, IRC 184, Zalo 494, Twitch 265, QA Channel 137, Teams Meetings 186, Zoom Meetings 98, IMAP 53, Webhooks 42, Session Share 40, and Raft 17. Final corrected QA, Nextcloud, and Zalo batches were repeated successfully.
  • node scripts/check-changed.mjs --base e06986400ce6412953908596886245cb3a4b08f7 --timed passed in 494 seconds, including production/test types, ratchets, extension/script lint, dead exports, runtime cycles, storage and plugin boundaries.
  • pnpm tsgo:extensions:test passed in 110 seconds; pnpm test:extensions:package-boundary:compile passed in 188 seconds.
  • Cross-shard consumer selections passed for Twitch message-tool delivery, channel message context callers, SDK runtime API guardrails, QA message-tool delivery, and QA Lab bus protocol.
  • pnpm build passed in 487 seconds, including declarations, assets, and the CLI bootstrap import guard. Hosted CI also verifies the rebased build.
  • Independent Codex review through P2 is clean for the complete refactor and each subsequent correction, including the type-only IMAP guard restoration. No accepted/actionable findings remain.

The first proof/CI passes caught over-aggressive cleanup at three boundaries: absent QA delivery metadata still defaults to final; Nextcloud retains its explicit callback-context projection; Zalo retains null-to-undefined media-kind normalization. These were restored without weakening tests. Duplicate-import and shadowed-parameter lint findings were corrected.

An inherited main failure from #157543 was repaired by #158520. This PR was rebased onto that fix. Rebase comparison showed identical production bytes in all eleven touched plugins; upstream differences within those trees were README updates and three Twitch test updates. The final IMAP restoration only reinstates an erased type predicate and its explanatory comment, so the runtime proof remains applicable.

Pre-rebase head 289517882d7da5c14193ef99f2f7cbd829788b1a passed exact-head CI, including openclaw/ci-gate. The preceding rebased head also passed 110 jobs; the final change only restores the IMAP compile-time guard. Landing rebase round 2 is pushed. All affected Testbox gates passed; exact-head CI is running on the published head.

Test costs and lease evidence

Standalone wall times use pnpm test <file> --maxWorkers=1 and include cold imports/startup. CI test seconds sum the verbose reporter's case durations on the green rebased head and exclude imports/setup. The entire changed-extension CI job passed in 252 seconds.

Changed test file Standalone wall CI test seconds
teams-meetings/src/runtime-setup.test.ts (4 cases) 21.72 s 0.008 s
webhooks/src/http.test.ts (31 cases) 27.44 s 0.280 s
twitch/src/actions.test.ts (9 cases) 2.71 s 0.014 s

Other test changes only redirect imports to canonical owners. No new timers, retries, serial configurations, or per-test Gateway boots were added.

  • Initial comprehensive proof: tbx_01m3d7jhec79nj3fqbazp2b9eg (workflow). Its later retry expired during local source staging and executed no command.
  • Final corrected proof: tbx_01m3dnazqr0yv8rvsnh745w661 (workflow). Verified source 804a7eb5f2a7c3f0739f57cb6e22b881f435b587, tree fa2f537d847ba4eb227767fd9d547a9d5d20581b; every selected command exited zero.
  • Unused replacement leases tbx_01m3df35veq93r4p5zmj8x5cfj, tbx_01m3dh4emsabbj1mdxqv8m5e8t, and tbx_01m3dhdw3mqpnhrcbc4hmfnw9r were stopped before tests executed. The last proof lease used a 90-minute idle window to accommodate the measured source-staging delay.

No live provider or native meeting-call claim is made; transport-boundary and generated-browser-script tests cover the preserved contracts.

Landing rebase

Rebased onto main 67adcce7e3043601354eacea4444d3361ee729c4 after native merge admission reported conflicts. Main retired the Webhooks plugin in #158225; all seven overlapping Webhooks hunks, including its test changes, were dropped. Its five removed assertion allowances are already absent on main. Kept all simplifications in the ten remaining plugins unchanged. The assertion-ledger conflict combines this PR's IRC reduction (31 to 25) with main's adjacent Kilocode reduction (4 to 3). No main tests were modified; the updated Nextcloud replay tests are inherited unchanged. Published rebased head: d87b270406dd2259753a6c0263e60e24d8f5e400. Fresh node scripts/check-changed.mjs --base origin/main --timed passed, and pnpm test:extensions:batch nextcloud-talk passed all 222 tests on Blacksmith Testbox tbx_01m3eawxywdj8egyzsvy0hz56p (workflow). The wrapper verified the source SHA and the payload checked all 90 changed-file hashes plus seven deletions. The subsequent build lost its Testbox connection (exit 255) without a compiler failure; that lease is stopped. The replacement build lease tbx_01m3ed5k5m2t7fdehsb1mzt6zm was stopped during source staging after exact-head CI established the landing blocker; no build success is claimed for this rebased head.

Previous landing blocker (owner fix now merged)

Exact-head CI run 36229788755 failed checks-node-compact-small-23 and therefore openclaw/ci-gate. The failure is src/infra/fs-safe-import-boundary.test.ts:317, test keeps plugin filesystem imports within their reviewed dependency surface. It flags extensions/codex/src/app-server/computer-use-marketplace.ts, computer-use-service-path.ts, and desktop-generation-fingerprint.ts. These files and the guard are unchanged between this PR, its clean base, and the fresh main inspected during landing. The relevant source owner is the Codex filesystem-helper cutover in #158613, against the import-boundary owner from #158313. At that time, no merged owner fix was available; round 2 below incorporates the subsequently landed fix. No clean-base Testbox A/B was completed, so this is not claimed as a reproduced baseline test failure.

Stopped under the coordinator's explicit no-owner-fix rule. No CI rerun or bypass was attempted. This lane sent no merge request and native admission recorded no merge outcome. The final remote read showed an external auto-merge request enabled at 2026-09-26T08:27:55Z; it was left untouched. The PR remains open behind the failed required CI gate. Rebase round 1 is published and the native review worktree is retained for recovery. Both landing Testbox leases are stopped.

Landing rebase round 2

The coordinator supplied main fix f2532a051f7 (fix(codex): use public SDK error helpers), which removes the three flagged direct fs-safe imports. Rebased onto fresh main 1dbbf6ce6380b8c562bb8a6f27e04083f3b7648a, which contains that fix. git range-diff reports all five commits patch-identical to the preceding PR head: every remaining simplification is kept, no additional hunk is dropped, and no main test is modified. Published head: a5303e7230c5980cf43876e455e2240879c8506d.

The coordinator-armed auto-merge request was explicitly retired before replacing the head, as authorized. Re-arming is reserved to the coordinator's watcher. Fresh Blacksmith Testbox proof passed on tbx_01m3ejw9ng035n884p92462ne5 (workflow): pnpm test src/infra/fs-safe-import-boundary.test.ts --maxWorkers=1 passed all 23 tests; node scripts/check-changed.mjs --base origin/main --timed passed; pnpm build passed in 8m 4s, including declarations, SDK exports, UI budgets, and CLI bootstrap checks. The wrapper verified source a5303e7230c5980cf43876e455e2240879c8506d; the payload checked all 90 changed-file hashes and seven deletions. The command completed with exit 0, and the lease is stopped. The preceding cold source staging took about 19 minutes; a portal visibility-sync warning did not affect the completed remote command.

GitHub confirms CI run 36236980361 is running on exact published head a5303e7230c5980cf43876e455e2240879c8506d. Auto-merge was not re-armed by this lane; the coordinator watcher owns that step after the new head's required CI gate succeeds.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: nextcloud-talk Channel integration: nextcloud-talk channel: zalo Channel integration: zalo channel: twitch Channel integration: twitch channel: irc channel: qa-channel Channel integration: qa-channel extensions: webhooks plugin: zoom Zoom plugin channel: raft Channel integration: Raft plugin: teams-meetings Teams Meetings plugin plugin: imap plugin: session-share size: XL labels Sep 25, 2026
@steipete
steipete marked this pull request as ready for review September 25, 2026 23:49
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 26, 2026, 6:58 AM ET / 10:58 UTC (Revision 14).

ClawSweeper review

What this changes

The branch simplifies bundled channel and meeting plugins by removing forwarding code and duplicate types, and corrects Microsoft Teams setup text about live captions.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 5 items remain

The branch contains useful cleanup that is still absent from main. One previously identified QA catalog failure remains: the PR removes a file that two live scenarios still reference.

Priority: P3
Reviewed head: a5303e7230c5980cf43876e455e2240879c8506d

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The cleanup has substantial reported validation, but a deterministic QA catalog defect remains on the current head.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository State identifies the author as a member, so the external-contributor proof gate does not apply. The supplied Testbox plugin batches cover changed boundaries but do not claim a live channel or meeting run; the inspected diff changes no stored-data contract.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies the author as a member, so the external-contributor proof gate does not apply. The supplied Testbox plugin batches cover changed boundaries but do not claim a live channel or meeting run; the inspected diff changes no stored-data contract.
Evidence reviewed 9 items Introduced deletion: The pinned PR diff deletes the QA channel protocol barrel that the scenarios name.
Verified merge effect: The verified test merge retains both scenario files but no longer contains the protocol barrel; its main parent contains all three files.
First stale reference: The personal thread-reply scenario still names the deleted file.
Findings 1 actionable finding [P2] Retarget both QA scenarios before removing the protocol barrel
Security None None.

How this fits together

Bundled plugins turn channel and meeting inputs into replies and setup status using shared Plugin SDK contracts. QA Lab reads scenario references to validate its catalog before running scenarios.

flowchart LR
  A[Channel and meeting inputs] --> B[Bundled plugins]
  C[Shared Plugin SDK] --> B
  B --> D[Replies and setup status]
  E[QA scenario references] --> F[Catalog integrity check]
  B --> F
  F --> G[CI result]
Loading

Before merge

  • Retarget both QA scenarios before removing the protocol barrel (P2) - This deletion leaves two scenario codeRefs pointing to a nonexistent file. The QA catalog integrity test resolves every reference and will fail; point both scenarios at src/plugin-sdk/qa-channel-protocol.ts.
  • Resolve merge risk (P1) - The QA catalog integrity check will reject two scenario references to the deleted protocol file in the verified merge result.
  • Complete next step (P2) - Retarget both QA scenario code references to the surviving SDK protocol file and verify catalog integrity on this head.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Retarget both QA scenarios before removing the protocol barrel — extensions/qa-channel/src/protocol.ts:1
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #158398
Summary: This PR is the linked implementation candidate for the open plugin-cleanup issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Repair the QA references (recommended)
    Update both scenario code references to the SDK protocol file and verify the catalog integrity check before merge.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Retarget the two QA scenario codeRefs to src/plugin-sdk/qa-channel-protocol.ts and run the focused QA catalog integrity test.

Technical review

Best possible solution:

Keep the SDK-backed simplifications, point both QA scenarios at the surviving protocol owner, and confirm catalog integrity on the repaired head.

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

Yes, by source inspection: the verified merge removes a file named by two scenarios, and the catalog test requires those paths to exist. This read-only review did not execute the test.

Is this the best way to solve the issue?

The SDK-backed cleanup is a maintainable direction, but its QA catalog cutover is incomplete until both references follow the surviving protocol file.

Full review comments:

  • [P2] Retarget both QA scenarios before removing the protocol barrel — extensions/qa-channel/src/protocol.ts:1
    This deletion leaves two scenario codeRefs pointing to a nonexistent file. The QA catalog integrity test resolves every reference and will fail; point both scenarios at src/plugin-sdk/qa-channel-protocol.ts.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is primarily an internal plugin cleanup with a bounded QA catalog repair.
  • merge-risk: 🚨 automation: The introduced deletion makes two machine-read QA catalog references fail path validation after merge.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Repository State identifies the author as a member, so the external-contributor proof gate does not apply. The supplied Testbox plugin batches cover changed boundaries but do not claim a live channel or meeting run; the inspected diff changes no stored-data contract.

Evidence

Acceptance criteria:

  • [P1] pnpm test extensions/qa-lab/src/scenario-catalog.test.ts --maxWorkers=1.
  • [P1] node scripts/check-changed.mjs --base origin/main --timed.

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Update both scenario code references and show the focused catalog integrity check passing on the repaired head.

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.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-26T01:52:51.649Z sha 8cc20f5 :: blocked before merge. :: [P2] Update QA scenario references before deleting the protocol file
  • reviewed 2026-09-26T02:08:45.474Z sha 8cc20f5 :: blocked before merge. :: [P2] Update QA scenario references before deleting the protocol barrel
  • reviewed 2026-09-26T02:36:44.532Z sha 8cc20f5 :: blocked before merge. :: [P2] Update QA scenario references before deleting the protocol barrel
  • reviewed 2026-09-26T03:10:23.293Z sha 2895178 :: blocked before merge. :: [P2] Update both QA scenario references before removing the protocol barrel
  • reviewed 2026-09-26T03:30:41.555Z sha 2895178 :: blocked before merge. :: [P2] Update both QA scenario paths before deleting the protocol file
  • reviewed 2026-09-26T07:54:53.207Z sha 2895178 :: blocked before merge. :: [P2] Update both QA scenario references before removing the protocol barrel
  • reviewed 2026-09-26T08:59:14.915Z sha d87b270 :: blocked before merge. :: [P2] Retarget both QA scenarios before deleting the protocol barrel
  • reviewed 2026-09-26T10:15:17.840Z sha d87b270 :: blocked before merge. :: [P2] Retarget both QA scenarios before deleting the protocol barrel

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 26, 2026
@steipete
steipete force-pushed the deslop/l58-small-channels branch from 804a7eb to 8cc20f5 Compare September 26, 2026 01:46
@steipete
steipete force-pushed the deslop/l58-small-channels branch from 2895178 to d87b270 Compare September 26, 2026 08:26
@steipete
steipete enabled auto-merge (squash) September 26, 2026 08:27
@steipete
steipete disabled auto-merge September 26, 2026 10:03
Consolidate repeated transport and webhook flows, reuse documented SDK owners, and remove redundant private forwarding layers while preserving authorization, credential, formatting, protocol, and state contracts. Correct Teams setup diagnostics to reflect its existing live-caption support.
@steipete
steipete force-pushed the deslop/l58-small-channels branch from d87b270 to a5303e7 Compare September 26, 2026 10:50
@steipete
steipete enabled auto-merge (squash) September 26, 2026 11:02
@steipete
steipete merged commit eaf8d91 into main Sep 26, 2026
181 checks passed
@steipete
steipete deleted the deslop/l58-small-channels branch September 26, 2026 11:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
…#158441)

* refactor(channels): deslop small channel and access plugins

Consolidate repeated transport and webhook flows, reuse documented SDK owners, and remove redundant private forwarding layers while preserving authorization, credential, formatting, protocol, and state contracts. Correct Teams setup diagnostics to reflect its existing live-caption support.

* fix(nextcloud-talk): retain typed outbound context projection

* fix(zalo): retain inbound media kind normalization

* refactor(channels): resolve SDK import and setup lint findings

* refactor(imap): retain SDK authentication strength exhaustiveness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: irc channel: nextcloud-talk Channel integration: nextcloud-talk channel: qa-channel Channel integration: qa-channel channel: raft Channel integration: Raft channel: twitch Channel integration: twitch channel: zalo Channel integration: zalo extensions: webhooks merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: imap plugin: session-share plugin: teams-meetings Teams Meetings plugin plugin: zoom Zoom plugin rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(channels): deslop small channel and access plugins

1 participant