Repository navigation
refactor(whatsapp): consolidate tests around canonical owners - #156348
vincentkoc wants to merge 8 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check could not safely complete for this revision. ClawSweeper will not retry this unchanged revision. Next step: No contributor action is requested. Maintainers should inspect the linked workflow run. |
|
Codex review: needs changes before merge. Reviewed September 23, 2026, 7:11 AM ET / 11:11 UTC (Revision 2). ClawSweeper reviewWhat this changesConsolidates WhatsApp tests around existing routing, delivery, storage, and setup implementations, strengthens retained assertions, and removes a private allowlist forwarding wrapper. Merge readiness⛔ Needs changes before merge - 1 item remains Keep open as a useful, member-authored test-audit batch. Current main retains the duplicated fixtures this PR replaces, and source review found no concrete introduced correctness defect. Priority: P3 Review scores
Verification
How this fits togetherThe WhatsApp plugin turns incoming messages into agent turns and sends replies through shared delivery infrastructure. These fixtures exercise that pipeline with controlled agent output and mocked external transport. flowchart LR
A[Incoming WhatsApp messages] --> B[Plugin preparation and routing]
B --> C[Shared turn lifecycle]
D[Controlled agent replies] --> C
C --> E[Delivery dispatcher]
E --> F[Mock WhatsApp transport]
C --> G[Isolated session storage]
F --> H[Receipt and payload assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -6, Tests -1348. Total -1354 across 38 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the smaller fixtures coupled to canonical owners, preserving independent regression assertions and demonstrating their execution cost without claiming an unmeasured speedup. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a test-consolidation proposal rather than a reported product defect; source inspection confirms the duplicated fixture implementations. Is this the best way to solve the issue? Yes in direction: using existing owners removes self-confirming policy copies while retaining transport isolation; current-head execution is still needed to qualify the rewritten fixtures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0c7d77cd47ab. 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 (1 earlier review cycle)
|
Reconcile the existing cleanup with frozen main while preserving both histories. Replace copied fixture algorithms with canonical channel-turn owners, retain current detectors, and make acquired fixture cleanup failure-safe.
What Problem This Solves
WhatsApp test fixtures duplicated policy, routing, session persistence, and dispatch logic. Those copies could keep tests green while the real owners regressed.
User Impact
No production behavior changes. The suite now exercises the real shared owners with deterministic transport and reply stubs, while retaining current account, lifecycle, media, and delivery behavior.
Why This Change Was Made
33 changed paths: production 0 lines; tests −300 and test support −532, net −832 against the frozen integration base. Related: #139428.
Evidence
extensions/agentsapi/agentsapi-session.tsmax-lines violation (711 > 700), alongside candidate diagnostics that are now fixed and pass targeted lint. A green full-plugin lint or full changed-check rerun is not claimed.The original partial failures and the empty-state last-route mutation survivor remain recorded separately. That survivor prompted a same-account prior-recipient transition check in the existing routing case. This remains a draft; final approval and merge stay with the maintainer.