fix(whatsapp): keep pre-connect recovery replayable#104450
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 8:02 AM ET / 12:02 UTC. Summary PR surface: Source +2, Tests +119. Total +121 across 3 files. Reproducibility: yes. for the WhatsApp subproblem from source with high confidence: the active-listener gate occurs before every platform send, while current main throws an unmarked generic error that durable recovery cannot safely classify as unsent. No credentialed current-main restart was run. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the transport-owned marker change and regression, replace the broad closing reference with a non-closing partial-fix link, and add redacted credentialed WhatsApp restart evidence showing the queued message is delivered exactly once after the real listener connects. Do we have a high-confidence way to reproduce the issue? Yes for the WhatsApp subproblem from source with high confidence: the active-listener gate occurs before every platform send, while current main throws an unmarked generic error that durable recovery cannot safely classify as unsent. No credentialed current-main restart was run. Is this the best way to solve the issue? Yes for the WhatsApp behavior: using the existing public pre-dispatch marker at the transport-owned listener gate is narrower and safer than adding delay heuristics or a parallel retry queue. It is not a complete resolution of the linked cross-channel issue. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 90e465833b30. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2, Tests +119. Total +121 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Land-ready verification complete for exact head
Behavior proof: enqueue before the listener exists, retain the pending intent through a pre-connect drain, connect the listener, and drain twice; exactly one platform send occurs. Known gap: no credentialed WhatsApp restart roundtrip was run. The changed transport gate and SQLite-backed real-adapter recovery path are covered directly. |
|
Merged via squash.
|
Fixes #91212
AI-assisted implementation; maintainer-reviewed and source-verified.
What Problem This Solves
Fixes a startup recovery path where WhatsApp could classify a missing outbound listener as an attempted send. Durable recovery then preserved false send evidence instead of safely retrying after the listener connected.
Why This Change Was Made
The WhatsApp adapter now uses the existing public SDK
PlatformMessageNotDispatchedErrorfor its pre-send listener gate. That lets the shared durable recovery path clear false attempt evidence while keeping the pending intent for the existing reconnect drain.The fix stays at the transport owner boundary and reuses the generic durable marker instead of adding delay heuristics or a WhatsApp-specific retry queue.
User Impact
Messages queued before the WhatsApp listener is ready can recover after connect without being lost or sent twice.
Evidence
pearl-hermit(tbx_01kx8fss8mm2ef6888c3qjen9f) focused proof: 36 tests passed.check:changedpassed.