Skip to content

refactor(channels): deslop telegram, matrix and feishu second pass - #158164

Merged
steipete merged 2 commits into
mainfrom
deslop/l46-channels2
Sep 26, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/l46-channels2

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Telegram, Matrix, and Feishu still carried duplicate control flow, private forwarding modules, and repeated type/parameter plumbing after their first cleanup passes. This is the maintainer-requested second pass following #156752, #156777, and #156832.

User Impact

The cleanup preserves channel authorization, verification order, credentials and diagnostics, formatting/media/retry behavior, transport status, public configuration and tools, and stored state. Matrix system-agent approval prompts now accept their advertised reaction decisions, including after persisted-target lookup.

Why This Change Was Made

  • Telegram shares edited-message handling, action mutation preparation, media download/projection, and transport-status handling; imports SDK owners directly and removes stateless helper forwarding and duplicate types.
  • Matrix shares legacy-file migration control flow, chunked state I/O, and reply/thread context lookup; removes private SDK wrappers and repeated action dispatch. Existing storage formats, publication order, digest checks, cache policies, and crypto handling remain intact.
  • Feishu consolidates comment pagination/context selection, document operations, outbound reply fanout, and setup/rendering owners; removes one-use tool wrappers and SDK re-export shims.
Cleanup details and ownership
Area Simplification and reason
Telegram inbound One edited-message handler carries the update kind; pure context helpers are imported directly instead of forwarded through several runtime objects.
Telegram actions and status Edit/delete share their identical admission and parameter preparation. Polling/webhook status share startup-grace handling while retaining transport-specific diagnostics.
Telegram media and rich text Sticker and ordinary media use the same getFile/download flow. Removed one-use render constructors and the unused, test-only minimum chunk-count path.
Telegram transport and caches Removed dispatcher policy envelopes, duplicate lease construction, identity parsers, duplicate types, and private SDK re-export shims. Retry, cleanup, cache, and offset owners remain unchanged.
Telegram setup and policy Root/account Doctor cleanup uses one ordered transform pipeline; existing normalization owners replace repeated parsing and forwarding.
Matrix migration and storage Four legacy-file migrations share detect/import/archive control flow. Crypto and sync-cache chunks share encoding/read/write mechanics with their original limits, keys, digest checks, and metadata publication order.
Matrix inbound context One parameterized event-context resolver serves replies and threads, retaining their different redaction, fallback, LRU/FIFO, and retry behavior. The Matrix API adapter owns the returned event type.
Matrix requests and tools JSON/raw HTTP requests share preparation and error handling; verification operations dispatch directly instead of translating names into a second branch tree.
Matrix private layers Removed SDK forwarding files, one-use resolvers, duplicate declarations, and redundant lifecycle/projection wrappers while retaining public aliases.
Feishu comments One pagination owner handles comments and replies; nearby-context selection and content-resolution types are shared without changing limits or ordering.
Feishu tools and documents Single-use Bitable/Drive/document wrappers are inlined into their registered operations; repeated document/table/color work uses its existing owner.
Feishu delivery and setup Reply fanout, card selection, member-read admission, conversation parsing, and credential setup avoid repeated control flow. SDK QR/audio/secret helpers are used directly.
All three Removed unused fields, redundant casts, duplicated type declarations, and narrating comments. The assertion baseline only shrinks for these plugins. Four declarations left without external consumers are now module-private.

The refreshed head is 9a7d42c5818655eb5e978cdc9794fbe091f7e59a, based on d07b710d85220c18b2186d57cd33e2276ba2da38. git range-diff reports both lane commits unchanged, and the complete Telegram, Matrix and Feishu Git trees match the tested 6a0a9ac candidate. Existing component/upgrade proofs are retained with their original identities. Current-head hosted CI is green (117 passed, 20 skipped), both strict native check scopes passed, and the final build passed in 521s.

The public plugin artifacts retain their exports. No SDK exports, dependencies, manifests, configuration keys, or model-facing tool schemas change.

Config and upgrade compatibility confirmed: a complete local audit of the 315-file base-to-head diff (not GitHub's truncated file list) verifies unchanged manifests, package metadata, public config keys, schema declarations and defaults. Telegram retains token admission/precedence and effective inherited policy validation; Feishu retains setup defaults and ordered webhook-secret inheritance; Matrix retains auth precedence, encryption defaults, credential revocation guards, the registered Doctor adapter and legacy-state precedence. The published-updater proof below covers the refactored Matrix migration paths. No new configuration or operator migration action is required.

Fixes found along the way

Matrix's native approval runtime already emits system-agent prompts, but reaction-target registration and persisted reads accepted only exec/plugin kinds. Both guards now accept the existing system-agent kind. The regression exercises registration, decision lookup, and persisted recovery without weakening sender authorization.

The Telegram durable album replay E2E fixture raced its real 40 ms flush deadline against asynchronous SQLite-backed admission. It now holds that existing timer, waits for real backlog admission, verifies both claims and no downstream turn, then flushes with unchanged two-photo and tombstone assertions. The adjacent live-admission case no longer sleeps 5 ms. No production timing, assertion, or retry budget is relaxed.

Evidence

Measured change: 2,934 net production lines removed (271 production files; +2,341 / -5,275). Tests/support add 31 net lines (41 files; +304 / -273). No SDK exports, dependencies, manifests, configuration keys, or model-facing tool schemas change.

  • pnpm test:extensions:batch matrix: 160 files, 2,518 tests passed; 289s wall.
  • pnpm test:extensions:batch feishu: 110 files, 2,174 tests passed; 103s wall.
  • pnpm test:extensions:batch telegram: 164 files passed; its one failing voice-fixture file needed the SDK mock cutover. The corrected file passed all 50 tests (75s), and all ten shared-fixture consumers passed another 153 tests (286s). The initial batch reported 2,579 passing tests and four failures in that one file (1,955s).
  • Changed consumers: Matrix 79 tests in four files (23s), the three completed-event/harness fixtures 206 tests (36s/23s/27s), Feishu media 81 tests in three files (23s), and the public runtime API guard seven tests (16s) passed. Four remaining Telegram history/media consumers passed 26 tests (880s including private runtime preparation); the root reply-conversation consumer passed 15 tests.
  • Matrix approval regression: candidate tests on the original production code produced the two intended failures; the fixed owner passed all ten tests (16.731s).
  • Album replay flake: the complete 11-test file passed (46s). A deliberate release → hold lane-occupancy mutation failed the two-claim assertion, admitting only update 201 instead of 201 and 202. The restored implementation passed 20 targeted Linux repetitions. Six completed before a provider lease ended; fourteen completed on the next lease. The interrupted attempt is not counted.
  • Native node scripts/check-changed.mjs passed the changed-file policy/format/Doctor/config/boundary checks, then both scopes stopped at the pre-existing agents-root typecheck budget: 721 roots against 720, introduced by fix(models): retain discovery failures across provider aliases #158139. Hosted CI treats this limit as advisory; the native route remains strict. Main subsequently fixed the overflow in d07b710d85220c18b2186d57cd33e2276ba2da38 by reassigning session roots with unchanged limits/coverage. This PR is rebased onto that fix; no duplicate follow-up is needed. Both strict native scopes passed with GITHUB_ACTIONS and GITHUB_STEP_SUMMARY unset: complete plugin/docs/baseline scope in 914s, core export-consumer scope in 318s. Together they cover all 315 changed paths without relaxing limits. Earlier runs passed all 25 core test typecheck shards, extension types and all three unused-export scans. The eight final lint consumers passed 206 tests in 87s; rebased lifecycle/storage consumers passed 437 tests across 20 files in 988s. The exact stale Drive max-lines exemption was removed.
  • Pre-refresh pnpm check:architecture passed in 236s. Current-head pnpm build passed in 521s, including SDK export and artifact checks; current strict changed checks also passed the database-first and import-cycle guards.
  • Composed Matrix approval proof plus the existing final-effect authority suite passed 15 tests in 28s. The real reaction handler, Gateway custody/resolver, SQLite verdict and waiter settlement accepted the allowed reviewer (one terminal edit); unauthorized ingress, stale channel policy and revocation immediately before the verdict left the record pending with no terminal edit. Matrix wire I/O alone was synthetic.
  • Published [email protected] → candidate-tarball update passed (420s including package/registry preparation). Immediately after the installed updater and before standalone Doctor, the dedicated read-only probe verified all four Matrix migrations: eight byte-exact archived JSON files, five correct fresh-import rows including the sync digest, and five pre-existing canonical rows preserved byte-for-byte with timestamps/expiries. Native update outcome was success, with no recovery. The later native Gateway checks passed: startup 22s; health, readiness and RPC status 1s each. The generic firstHopPostCore field was unavailable in this scenario; the dedicated Matrix probe supplied the boundary observation. No idempotence or live Matrix transport claim is made.
  • Independent Codex reviews completed for the full cleanup and final test/export/lint corrections and rebase composition with no accepted P0–P2 findings.

Observed Telegram Test Server proof

Real Telegram Test Server userbot capture on head 9a7d42c5818655eb5e978cdc9794fbe091f7e59a (verified tree 838956c75d02a87081f48b59101d761b2c437efd, carrier 7a9e75b9b78c2b012dd572960631dc87b08567d7) used the canonical runner, a leased QA user/bot, an isolated built Gateway, and the local mock model provider. The recording completed; all four sends, one callback click, and the run-owned policy patch completed. This is real channel transport with synthetic model output.

Sanitized command: node .agents/skills/telegram-e2e-userbot/scripts/run-mock-sut-user-e2e.mjs --backend mock --dm --gateway-port <isolated-port> --mock-port <isolated-port> --scenario <synthetic-scenario.json> --timeout-ms 95000 --record <private-events.ndjson> --output <private-summary.json>.

Observed boundary Evidence from the QA user's own TDLib receipts
First DM reply and streaming Send at 38ms; preview at 2,317ms; changed final content at 6,790ms on the same raw message ID, replying to that first send. The accepted final was not deleted during the recording.
Native formatting Final TDLib messageText contains bold over Reply context probe, italic over second streaming turn, and inline code over source retained. These are native entities, not inferred Markdown appearance.
Reply context The follow-up at 12,103ms references the first user message. Its actual model request's current user/context group includes that source as both [reply target] and [Replying to: ...]; its reply at 13,177ms targets the follow-up's own receipt.
Authorized native callback /models openai produced the native model menu; the completed Back callback (37ms) changed that same observed message to Select a provider:.
Disabled DM admission The run-owned dmPolicy: disabled patch completed readiness before the final send. No denied input appears in any provider request, and no SUT content appeared during the remaining 32,957ms of complete recording.
Cleanup Native owner exited 0 after joining consumers and releasing the credential lease. Independent observation found both ports free, zero runner-owned processes, zero newly retained credential/Gateway scratch directories, and the transferred broker copy removed.

Fixture mismatch retained: the initial compound judge expected two provider requests and two specific scripted streaming responses. The capture actually contains two agent requests plus three Activity recap utility requests; those utility calls consumed global mock response slots. The first chat turn therefore streamed the second prepared response, and the second returned the mock's fallback marker. This is not reported as a passing two-response script. The observed first streaming reply, receipt-linked reply context, native callback, and disabled-DM rejection above provide the required touched-flow proof without rerunning solely to polish the fixture. No incoming-user-edit, second streamed reply, client screenshot/appearance, live Matrix, or live Feishu claim is made. The native runner leaves its synthetic DM messages; message deletion is not claimed.

The fixtures use the canonical SDK owners and complete Matrix events. Existing assertions, timeouts, and retry budgets remain intact. The oversized Matrix handler test now uses its shared reaction harness.

Remote execution and lease lifecycle

All heavy commands ran through node scripts/crabbox-wrapper.mjs with provider blacksmith-testbox, frozen-lockfile installation, and one active command per lease. Initial source snapshots used base e6df676ad11163215954b234aa3238536586534c plus the wrapper-verified lane patch. The earlier package-proof candidate was rebased onto 9e5c2e2458416d5491be7135757f92151592bfe2, preserving the intervening async Telegram binding and Matrix filesystem changes. Final package proof used carrier 3ec924ccbb8cdefe085ea71fa2eb7bdea0da5c07, whose tree 53a015d745f9475d3cc28412f54c8af9a48a2b21 was verified equal to PR head 6a0a9acce3c0c039e0192c877365f1fd0e44a7d6. The shallow-checkout preflight was repaired by supplying the exact hash-checked original commit object; no identity check was removed. All eight Testbox leases are stopped after the final checks and live capture. Testbox workflow conclusions reflect lease teardown; command results above are the validation evidence.

Lease Work Run
tbx_01m3bt183r43vsztg778mg70hb Plugin batches and Matrix regression negative control; provider completed the lease. 36111780121
tbx_01m3bzczk1vvcjnj9c1en8gy33 Build, initial consumer checks, and per-file test costs; stopped. 36120410881
tbx_01m3c2b3dkxc5b51f7w0b7acry Final production build, consumers, album negative control, and six repetitions; provider ended the lease with SSH exit 255. 36125111184
tbx_01m3c8d0pjxhbe7zzkvr3n79pj Matrix fixture proof, fourteen further album repetitions, and final gate diagnosis; stopped. 36134773855
tbx_01m3cd77bg7senq9r1wpdgytad Final lint consumers and build passed; superseded after rebase and stopped. 36143380307
tbx_01m3cgr61daa19exsgfg7vqqq1 Rebased lifecycle/storage consumers: 437 tests / 20 files passed in 988s; lease stopped before completing superseded gates/build. 36150204163
tbx_01m3cjrxhgs9arcr8cdwtpvded Architecture, composed Matrix approval and published-updater proof passed; strict changed checks identified the unrelated shard budget; stopped. 36154137440
tbx_01m3cqkehcyj5rq0d8h3291m5n Strict native checks (914s + 318s), build (521s), and observed Telegram Test Server capture completed; stopped. 36163318137
Changed test costs on Linux Testbox

Each file was run individually with pnpm test <file> --maxWorkers=1; these are command wall times including preparation. The CI case-time column records the available per-test measurements. Initial head CI stopped at the database-first guard: inlining the legacy binding-path helper exposed its existing runtime retirement. The complete thread-binding migration module is now unchanged from main. Pre-rebase CI then completed 1,174 Node tests in compact-large-8 before Bun canary 1.4.3-canary.1 (ddfce5d01) crashed during worker startup with SIGSEGV (429ms, before tests). Fail-fast cancelled the remaining checks, including architecture. The exact-input diagnostic replay passed the 17-file Bun subset (232 tests; 44.38s). CI attempt 2 is green on 6a0a9acce3c0c039e0192c877365f1fd0e44a7d6: 118 checks passed, 20 skipped. That pre-rebase PR rollup had 140 passing and 47 intentionally skipped checks. No source, assertion, timeout, retry budget or runtime pin changed for that replay; the original native crash remains unexplained. Current-head CI is green on 9a7d42c5818655eb5e978cdc9794fbe091f7e59a: 117 passed, 20 skipped.

File Testbox wall CI reported case time
extensions/telegram/src/bot-message-context.body.test.ts 75s 45.218s
src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts 16s 0.081s
extensions/matrix/src/matrix/monitor/handler.group-history.test.ts 36s 0.493s
extensions/matrix/src/matrix/monitor/handler.reaction-owner.test.ts 23s 0.307s
extensions/matrix/src/matrix/monitor/handler.test.ts 27s 4.136s
extensions/feishu/src/app-registration.test.ts 4s 0.269s
extensions/feishu/src/bot.test.ts 55s 52.245s
extensions/feishu/src/send.test.ts 31s 0.251s
extensions/matrix/src/approval-reactions.test.ts 24s 0.079s
extensions/matrix/src/channel.resolve.test.ts 19s 0.004s
extensions/matrix/src/doctor.test.ts 16s 0.087s
extensions/matrix/src/matrix/client.test.ts 18s 0.899s
extensions/matrix/src/matrix/client/backfill.test.ts 18s 0.105s
extensions/matrix/src/matrix/monitor/handler.reply-presentation.test.ts 28s 0.062s
extensions/matrix/src/matrix/monitor/replies.presentation.test.ts 20s 0.033s
extensions/matrix/src/matrix/monitor/reply-context.test.ts 3s 0.082s
extensions/matrix/src/matrix/monitor/thread-context.test.ts 2s 0.108s
extensions/matrix/src/matrix/probe.test.ts 2s 0.052s
extensions/matrix/src/matrix/sdk/client-transaction-scope.test.ts 17s 0.026s
extensions/matrix/src/matrix/sdk/transport.authority-integration.test.ts 2s 0.030s
extensions/matrix/src/matrix/send.test.ts 22s 6.195s
extensions/telegram/src/bot-handlers.inbound-pipeline.test.ts 26s 0.018s
extensions/telegram/src/bot-message-dispatch.progress-lifecycle.telegram-http.test.ts 55s 42.606s
extensions/telegram/src/bot.create-telegram-bot.channel-post-media.test.ts 24s 2.538s
extensions/telegram/src/bot.forum-ingress.response-body-timeout.integration.test.ts 36s 0.188s
extensions/telegram/src/bot.media.downloads-media-file-path-no-file-download.test.ts 31s 5.358s
extensions/telegram/src/fetch.socks.test.ts 34s 0.348s
extensions/telegram/src/fetch.test.ts 32s 0.228s
extensions/telegram/src/model-callback.loopback.integration.test.ts 49s 1.558s
extensions/telegram/src/outbound-adapter.telegram-http.test.ts 40s 13.317s
extensions/telegram/src/probe.test.ts 2s 0.148s
extensions/telegram/src/rich-plain-fallback.test.ts 2s 0.177s
extensions/telegram/src/send.proxy.test.ts 26s 1.394s
extensions/telegram/src/send.recovery.telegram-http.test.ts 21s 1.397s
extensions/telegram/src/telegram-ingress-coalescing.e2e.test.ts 46s (corrected fixture; initial race reproduced at 68s) Not attributed
extensions/telegram/src/telegram-ingress-supersede.test.ts 19s 0.645s

CI case time sums reported test-case durations from the exact-head plugin jobs; it excludes shared startup/build work and is not per-file wall time. “Not attributed” means these CI logs do not provide a matching measurement.

@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 docs Improvements or additions to documentation channel: matrix Channel integration: matrix channel: telegram Channel integration: telegram channel: feishu Channel integration: feishu size: XL labels Sep 25, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 2:22 PM ET / 18:22 UTC (Revision 8).

ClawSweeper review

What this changes

Consolidates Telegram, Matrix, and Feishu plugin flows, updates related tests and Matrix documentation, and enables reaction decisions for Matrix system-agent approvals.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: current main still rejects Matrix system-agent approval reaction targets, and the branch contains distinct work beyond the three merged first-pass cleanups. The recorded channel, authority, and upgrade evidence supports this head; the inspected paths yielded no concrete blocking defect.

Priority: P2
Reviewed head: 9a7d42c5818655eb5e978cdc9794fbe091f7e59a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong channel and upgrade evidence supports a broad but coherent refactor with no concrete blocking finding in the inspected paths.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The changed Telegram ingress and reply paths were exercised on Telegram’s Test Server with observed user receipts, formatting, callback, context, and denial results. The changed Matrix approval path has recorded Gateway and SQLite final-effect observations for allowed and forbidden reviewers; a published-version updater run checked the refactored Matrix state migrations and preservation of existing rows. Feishu transport was not claimed as live proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The changed Telegram ingress and reply paths were exercised on Telegram’s Test Server with observed user receipts, formatting, callback, context, and denial results. The changed Matrix approval path has recorded Gateway and SQLite final-effect observations for allowed and forbidden reviewers; a published-version updater run checked the refactored Matrix state migrations and preservation of existing rows. Feishu transport was not claimed as live proof.
Evidence reviewed 8 items Distinct Matrix behavior on this head: Registration and persisted-target validation both accept the existing system-agent approval kind.
Current main does not contain the approval fix: The fetched main revision accepts only exec and plugin kinds at both guards.
Latest release does not contain the approval fix: Release v2026.9.6 has the same two-kind guards.
Findings None None.
Security None None.

How this fits together

Incoming Telegram, Matrix, and Feishu events enter bundled channel plugins, which apply channel policy before handing authorized work to the Gateway. The plugins persist channel state and send replies through their respective transports.

flowchart LR
  A[Channel events and config] --> B[Channel plugins]
  B --> C{Policy and approval checks}
  C --> D[Gateway agent and approval runtime]
  D --> E[Channel replies and edits]
  B --> F[SQLite channel state]
  F --> C
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Matrix upgrade probe 4 legacy migration paths; 5 existing rows preserved The recorded published-updater run checks the stored-state contract touched by the refactor.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Preserve the consolidated channel owners and public plugin contracts while routing Matrix system-agent reactions through the existing Gateway approval authority.

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

Yes for the embedded Matrix defect: current main rejects system-agent targets at registration and persisted reads, and the PR records a failing pre-fix regression. The broader cleanup has no separate failure to reproduce.

Is this the best way to solve the issue?

Yes: the branch reuses channel-local and existing SDK owners, and the Matrix fix stays on the established Gateway approval path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded channel improvement with a Matrix approval fix and no demonstrated urgent regression.
  • merge-risk: 🚨 compatibility: Matrix migration and plugin contract paths are touched; the recorded published-updater probe and unchanged public exports address the observed upgrade concern.
  • merge-risk: 🚨 message-delivery: Telegram delivery and ingress paths are consolidated; Test Server receipts demonstrate representative replies, callback behavior, and denied DM admission.
  • merge-risk: 🚨 security-boundary: Matrix approval-kind acceptance reaches a privileged verdict; the recorded final-effect proof covers allowed, unauthorized, and revoked reviewers.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The changed Telegram ingress and reply paths were exercised on Telegram’s Test Server with observed user receipts, formatting, callback, context, and denial results. The changed Matrix approval path has recorded Gateway and SQLite final-effect observations for allowed and forbidden reviewers; a published-version updater run checked the refactored Matrix state migrations and preservation of existing rows. Feishu transport was not claimed as live proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Telegram ingress and reply paths were exercised on Telegram’s Test Server with observed user receipts, formatting, callback, context, and denial results. The changed Matrix approval path has recorded Gateway and SQLite final-effect observations for allowed and forbidden reviewers; a published-version updater run checked the refactored Matrix state migrations and preservation of existing rows. Feishu transport was not claimed as live proof.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The refactor touches Telegram streaming, formatting, reply context, and callbacks, which are visible on the Test Server; relevant userbot proof is already recorded.

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)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Robin Winkelewski: 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.

History

Review history (7 earlier review cycles)
  • reviewed 2026-09-25T14:44:21.151Z sha 8a1c8a8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-25T15:01:21.455Z sha 37657e2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-25T15:22:04.414Z sha 6a0a9ac :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-25T15:36:30.483Z sha 6a0a9ac :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-25T16:16:50.470Z sha 6a0a9ac :: blocked before merge. :: none
  • reviewed 2026-09-25T17:10:33.254Z sha 9a7d42c :: blocked before merge. :: none
  • reviewed 2026-09-25T18:08:09.281Z sha 9a7d42c :: blocked before merge. :: none

@steipete
steipete force-pushed the deslop/l46-channels2 branch from 8a1c8a8 to 37657e2 Compare September 25, 2026 14:48
@steipete
steipete marked this pull request as ready for review September 25, 2026 14:50
@clawsweeper clawsweeper Bot added proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Sep 25, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The PR body now records completed boundary proof for head 6a0a9acce3c0c039e0192c877365f1fd0e44a7d6: real Matrix-to-Gateway approval custody, SQLite verdict and waiter settlement (including unauthorized and immediately revoked reviewers), plus an actual published [email protected] updater run with both fresh legacy Matrix state and pre-existing canonical rows. The dedicated state assertions ran immediately after update, before standalone Doctor; no recovery was needed. CI is green on this head. The unrelated strict native type-shard budget is documented and has a separate coverage-preserving follow-up prepared.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Consolidate channel-local control flows and use documented SDK owners directly. Remove redundant forwarding layers and declarations while preserving transport, authorization, credential, formatting, and persistence contracts.

Accept the existing Matrix system-agent approval kind during registration and persisted lookup. Stabilize Telegram album replay proof by controlling the existing flush timer after real durable admission. Preserve negative controls and complete media assertions.
Leave the complete legacy thread-binding lifecycle unchanged from main. Its path helper participates in the existing migration boundary; inlining it surfaced runtime file retirement to the database-first guard and would require a broader ownership change.
@steipete
steipete force-pushed the deslop/l46-channels2 branch from 6a0a9ac to 9a7d42c Compare September 25, 2026 16:49
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The PR body now records the required real Telegram Test Server userbot evidence on the unchanged reviewed head: same-message streaming with native formatting, reply-context hydration, an authorized native callback, disabled-DM rejection, and confirmed credential/process cleanup. It preserves the initial compound fixture mismatch and distinguishes two agent requests from three Activity recap calls; it does not claim that scripted two-response scenario passed. The Matrix upgrade/approval evidence remains unchanged. Both strict native changed scopes, the final build, and exact-head CI are green.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 25, 2026
@steipete
steipete merged commit 88d6556 into main Sep 26, 2026
215 checks passed
@steipete
steipete deleted the deslop/l46-channels2 branch September 26, 2026 00:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

MarMarLabs added a commit to MarMarLabs/openclaw that referenced this pull request Sep 26, 2026
81 upstream commits, including the Feishu cleanup in openclaw#158164, which
touched 54 Feishu files. Eight of them are files this branch changes too.
Three conflicted and were resolved by hand, keeping this branch's behavior
and taking upstream's refactor wherever it applies:

- presentation-card.ts: upstream folded the per-block returns into one
  switch. This branch returns several sized elements per text, context
  and table block, which one return cannot carry, so the branch's bodies
  stay and upstream's spread push is taken with the branch's argument.
- outbound.ts: upstream's createFeishuReplyFanout helper is used at all
  four call sites, sendMedia takes upstream's parameter type, and
  upstream's comment trims are kept. The helpers this branch had moved
  out of the file stay moved.
- reply-dispatcher.ts: the card condition keeps this branch's table-aware
  shouldUseCard. Upstream's void return for rememberStreamingStartFailure
  auto-merged.

Upstream moved the old shouldUseCard into markdown.ts as
shouldUseFeishuCard. Its only two callers are the ones this branch
replaces with shouldUseCard from card-table-shapes.ts, so nothing called
it after the merge and it is removed. markdown.ts now matches this branch.

The other files both sides changed, channel.ts, config-schema.ts,
send.ts, send.test.ts and the database-workers test list, auto-merged
and each equals this branch plus upstream's own hunks. The lockfile and every generated file
are unchanged upstream, and build:docker in a separate detached checkout
followed by config:channels:gen and config:docs:gen changed nothing. The
three generated-file checks pass there.

Feishu: 105 files and 2161 tests in the extension project, 15 files and
347 tests in the database-workers project. The forwarder test and the
routing guards pass, 2007 tests. oxlint on the 43 changed code files,
oxfmt, tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root,
the line-cap, max-lines and assertion-safety ratchets against
upstream/main, and deadcode:exports all pass.
steipete added a commit that referenced this pull request Sep 26, 2026
The formatter refactor in #158164 folded format-render.ts into format.ts. Keep the existing format.ts code reference and remove the obsolete path so the scenario catalog reference check follows the current owner.
steipete added a commit that referenced this pull request Sep 26, 2026
* refactor: share filesystem admission, walks, and cleanup with fs-safe

* style: satisfy lint in fs-safe adoption changes

* test(daemon): map fs-safe reads into launchd fixtures

Keep the real fs-safe reader and its descriptor admission on the fixture backing files. Load fixture mocks before filesystem consumers and move shared state out of the oversized launchd suite.

* test(gateway): assert missing transferred manifest by errno

* fix(qa): drop retired Telegram formatter reference

The formatter refactor in #158164 folded format-render.ts into format.ts. Keep the existing format.ts code reference and remove the obsolete path so the scenario catalog reference check follows the current owner.

* fix(qa): preserve exact worktree cleanup identity

Keep the original bigint device and inode comparison when replacing the local forwarding helper. The general fs-safe matcher tolerates unknown Windows identity fields and cannot authorize destructive cleanup. Four real-directory receipt regressions fail the previous candidate; 35 cleanup/runtime cases and changed checks pass, with clean independent review.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…penclaw#158164)

* refactor(channels): deslop telegram, matrix and feishu second pass

Consolidate channel-local control flows and use documented SDK owners directly. Remove redundant forwarding layers and declarations while preserving transport, authorization, credential, formatting, and persistence contracts.

Accept the existing Matrix system-agent approval kind during registration and persisted lookup. Stabilize Telegram album replay proof by controlling the existing flush timer after real durable admission. Preserve negative controls and complete media assertions.

* refactor(matrix): retain existing thread binding migration owner

Leave the complete legacy thread-binding lifecycle unchanged from main. Its path helper participates in the existing migration boundary; inlining it surfaced runtime file retirement to the database-first guard and would require a broader ownership change.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…aw#158313)

* refactor: share filesystem admission, walks, and cleanup with fs-safe

* style: satisfy lint in fs-safe adoption changes

* test(daemon): map fs-safe reads into launchd fixtures

Keep the real fs-safe reader and its descriptor admission on the fixture backing files. Load fixture mocks before filesystem consumers and move shared state out of the oversized launchd suite.

* test(gateway): assert missing transferred manifest by errno

* fix(qa): drop retired Telegram formatter reference

The formatter refactor in openclaw#158164 folded format-render.ts into format.ts. Keep the existing format.ts code reference and remove the obsolete path so the scenario catalog reference check follows the current owner.

* fix(qa): preserve exact worktree cleanup identity

Keep the original bigint device and inode comparison when replacing the local forwarding helper. The general fs-safe matcher tolerates unknown Windows identity fields and cannot authorize destructive cleanup. Four real-directory receipt regressions fail the previous candidate; 35 cleanup/runtime cases and changed checks pass, with clean independent review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu channel: matrix Channel integration: matrix channel: telegram Channel integration: telegram docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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