Repository navigation
refactor(channels): deslop telegram and whatsapp transports - #156752
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 23, 2026, 8:32 PM ET / September 24, 2026, 00:32 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch consolidates Telegram and WhatsApp transport, formatting, setup, and delivery helpers while aiming to preserve existing channel behavior. Merge readiness⛔ Blocked before merge - 3 items remain Keep open. Current main has not absorbed this cleanup, and the source review found no definite patch regression. Telegram’s scoped live-proof requirement remains unmet. Priority: P2 Review scores
Verification
How this fits togetherTelegram and WhatsApp plugins turn account settings and Gateway messages into platform requests. Incoming platform events feed agent turns, while delivery results and transport status return to the Gateway. flowchart LR
A[Account settings] --> B[Channel plugins]
C[Gateway messages] --> B
D[Platform events] --> B
B --> E[Telegram or WhatsApp API]
B --> F[Agent turns]
E --> G[Delivery results and status]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1276, Other -6. Total -1282 across 65 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the channel-specific transport owners consolidated and preserve existing account, delivery, and SDK contracts, backed by an observed Telegram streaming-to-final reply. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a behavior-preserving refactor rather than reporting a failing current-main behavior. Is this the best way to solve the issue? Yes, the consolidation follows the existing channel owners and no narrower supported capability replaces it. Live Telegram parity evidence is still needed for merge readiness. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d1a3a33acc1c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
177ec02 to
74431d7
Compare
74431d7 to
7463f64
Compare
|
Merged via squash.
|
…#156752) * refactor(telegram): deslop telegram * refactor(whatsapp): deslop transport helpers
What Problem This Solves
Telegram and WhatsApp repeat transport preparation, result projection, lifecycle bookkeeping, and small forwarding layers. Keeping those copies aligned adds maintenance work around identity, authorization, and partial delivery.
User Impact
No intended behavior change. This preserves public plugin/SDK exports, config, protocol, persisted schemas, Telegram DM/forum-topic distinctions, WhatsApp PN/LID matching and linked-device auth, reaction approvals, rich/plain recovery, and send/reply accounting. No dependencies or tests were changed.
Why This Change Was Made
The assertion and file-size baselines only shrink to reflect removed code and casts. Separate durable/streaming delivery contracts, ownership checks, credential barriers, and recovery behavior remain intact.
Evidence
node scripts/check-changed.mjs: all selected gates passed, including types, format, lint, dead exports, storage guards, and import cycles (proof run).pnpm test:extension telegram: 165 files / 2,579 tests passed.pnpm test:extension whatsapp: 105 files / 1,421 tests passed.pnpm build: passed in 7m25.3s, including SDK export validation and UI build. The combined suite/build Testbox run returned exit 0; both leases are stopped.git diff --check: passed.The Linux suite/build capture preceded the small lint corrections and restoration of the original LID readers; the focused follow-up and final changed checks cover those final sources. The subsequent rebase incorporated the Workshop clock repair and left all 63 changed transport paths byte-identical. No tests were added or changed. The build emitted a nonfatal Mermaid asset diagnostic (1,555.8 KiB gzip versus 960.0 KiB); this PR does not change that asset or budget.
Requested non-test/non-doc measurement:
65 files changed, 722 insertions(+), 2004 deletions(-)— 1,282 net lines removed, including six baseline lines. Production code alone: 1,276 net lines removed (Telegram 743; WhatsApp 533).Codex autoreview completed through P2. Reports were checked against the full source and merge base; no accepted/actionable finding remains. The reported Telegram table/URL rules and WhatsApp empty-quote guard already existed at the base; the shared WhatsApp sanitizer already collapses whitespace-only text; and reply finalization explicitly uses
errorwhen no visible reply was delivered. Lint corrections removed a shadowed name and unnecessary boolean conversion; a LID-reader consolidation was reverted instead of introducing a stringification cast.These are isolated/loopback proofs. No authenticated live Telegram or WhatsApp probe was run. Native
/fastreader consolidation remains deferred pending a coordinated worker-backed SDK reader outside this transport cleanup.CI
Landing refresh: rebased onto current main after commit
df47b734490centralized WhatsApp history finalization. The single conflict resolution preserves that upstream owner and retains this PR's conditional reply-status finalization; no other PR code changed. The three focused delivery/history files passed 97 tests, and fresh Codex review found no accepted/actionable issue in the resolution. The previously reported quote-body concern remains unsupported by the string construction and formatter guard.Rebased head
7463f64bed2c59f3ccdbabbb1875798e8544660dpassed fresh CI 35937820429: 131 jobs completed without failures. The native GitHub-gated flow merged it asf6dd4b06f4b519d51ef6d879a4097f3879854d16; a fresh fetch confirmed that merge commit is an ancestor oforigin/main.Explicit E2E and cross-area selection