Repository navigation
test(channels): consolidate remaining channel scaffolding - #118493
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 1:31 AM ET / 05:31 UTC. ClawSweeper reviewWhat this changesThe branch replaces repeated Telegram, Google Meet, and WhatsApp test setup with narrow local helpers and named parameterized cases while retaining distinct lifecycle and channel assertions. Merge readinessThis PR remains useful: it is a clean, test-only consolidation across channel suites, with no current-main overlap on its six touched files and no concrete correctness finding in the refactor. The exact-head CI and Real behavior proof checks reported in the supplied PR context are successful; the Priority: P3 Review scores
Verification
How this fits togetherTelegram, Google Meet, and WhatsApp extensions receive external events and route them into OpenClaw’s channel and agent flows. Their tests construct callback, media, setup, connection, and reply-lifecycle scenarios; this PR reduces repeated scenario scaffolding without changing the runtime code those tests exercise. flowchart LR
A[External channel events] --> B[Channel extensions]
B --> C[Channel behavior tests]
C --> D[Local fixtures and helpers]
D --> E[Lifecycle and routing assertions]
E --> F[Regression confidence]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -404. Total -404 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the refactor test-only, preserve the focused suite coverage and distinct lifecycle assertions, then land after the normal maintainer-owned branch freshness gate is satisfied. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors test scaffolding rather than reporting a user-facing defect. The relevant verification is whether the changed channel suites preserve their scenarios and execute on the proposed head. Is this the best way to solve the issue? Yes. Local factories and named tables remove mechanically repeated setup while the remaining assertions continue to distinguish channel routing, lifecycle, and fail-closed behavior; no broader test DSL or production change is warranted. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 122181649e73. LabelsLabel 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 (2 earlier review cycles)
|
f4e856d to
6fd9ff9
Compare
|
Merged via squash.
|
…18493) * test(channels): consolidate channel scaffolding * test(channels): fix helper typings
What Problem This Solves
The remaining Telegram, Google Meet, and WhatsApp channel tests repeated large callback, media, setup, transcript, realtime, successor-controller, and retry fixtures. That duplication obscured the assertions that actually distinguish each behavior and made fixture changes expensive.
Why This Change Was Made
This follows the test-only consolidation shape from #117826, #117854, and #117910: narrow local factories own byte-equivalent setup, mechanically isomorphic cases use named tables, and async lifecycle cases remain explicit when their ordering or ownership differs.
createTelegramPluginCallbackHandlerplus the existing callback-context factorycreateReplyPhotoMessageanddispatchTelegramReactionrunTwilioSetupStatuswithLocalChromeMeetSessionprimeCapturedReplyWithSuccessorit.eachrowsThe batch estimate of 650–1,000 removable test lines was optimistic on current
main: several cited reaction/platform cases were already table-driven by the precedent PRs, and the remaining async cases protect meaningfully different ownership and ordering. This stops at 404 net lines removed rather than hiding those differences behind a test DSL.User Impact
None. This is test-only scaffolding cleanup: no production, configuration, protocol, SDK, schema, documentation, or changelog files changed.
Evidence
128361397aa745e8b24176fada82553cc3b12239: Telegram 94/94 test declarations and 463/463 assertions; Google Meet 146/146 declarations and 762/762 assertions; WhatsApp table conversions preserve 3 successor, 3 quoted-wrapper, 3 GroupSystemPrompt, and 2 auth-stabilization cases with their original titles.oxfmtover all 6 touched files — passed.oxlint --config .oxlintrc.jsonover all 6 touched files — passed.git diff --check— passed before and after rebases.gpt-5.6-sol, high) — clean on the full bundle and the CI typing repair, no accepted/actionable findings, both at 0.99 confidence; TruffleHog bundle scans clean.Record<string, unknown>and a channel-specific callback passed through an erased process-global registry. Both were repaired at their test-helper boundaries; no behavior or assertions changed.30786728791on6fd9ff981c059430b7db57ef2b78682412c072f4passed with no failed or pending checks.node scripts/check-changed.mjsreported no ready provider. Hosted exact-head CI supplies the executable test/type/check proof.