Repository navigation
fix(whatsapp): identify voice-note captions as text in delivery receipts - #205381
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: needs maintainer review before merge. What this changesThis PR preserves each accepted WhatsApp message’s kind when combining voice-note and caption delivery receipts. Example: Send an Ogg voice note with caption “voice text”, receiving IDs voice-1 and voice-text-1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a receipt-classification bug still present on main, with no introduced correctness defect found; draft status and an unattributed dependency-check failure remain. Reviewed head: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe WhatsApp listener’s send API converts accepted transport results into receipts consumed by delivery bookkeeping and callers. flowchart LR
A[WhatsApp listener] --> B[Send API]
B --> C[Transport sends]
C --> D[Accepted child receipts]
D --> E[Combined receipt]
E --> F[Delivery consumers]
Technical reviewBest possible solution: Preserve accepted child receipts in the existing WhatsApp combiner while retaining provider identities, send order, and logical activity accounting. Do we have a high-confidence way to reproduce the issue? Source tracing establishes the failure: the send API captures media and text separately, but current main recreates both receipt parts with the aggregate media kind; no target code was executed. Is this the best way to solve the issue? The patch fixes the classification loss at its producer using the existing receipt-composition owner, and the added assertions protect the distinct kind and ordering contract without new scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7d2b9c37cbd3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +11, Tests +4. Total +15 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 25, 2026, 9:24 AM ET / 14:24 UTC. |
|
Merged via squash.
|
…irement-rule * origin/main: (172 commits) test(gateway): expect a revoked person's Goal retry to be hidden as not found (#205698) fix: keep browser disabled when only hardening relay authentication (#203137) fix: recover Linux stream automations after command-anchor crashes (#203149) fix(whatsapp): identify voice-note captions as text in delivery receipts (#205381) fix(test): unblock restart-auth plugin and worker publication qualification (#205679) chore(ui): refresh control ui locales (#205691) fix: reduce memory during SQLite usage refresh (#201064) fix(plugins): readmit native captures with a dangling host link chore(i18n): refresh native locales (#205680) fix(update): hash SQLite lock bytes as zeros so Windows exclusion cannot fail verification (#205668) fix(skill-workshop): skip the skill diet for skills with Markdown outside support directories (#204881) fix(plugins): clarify dated SDK migration notices (#200932) fix: keep the resident launcher when reinstalling Gateway (#205655) fix: show the whole reply when you reopen a TUI session (#200455) test(ui): wait for restored speech player authorization (#199502) feat: let agents post approved GitHub comments (#204301) fix(agents): honor imageMaxDimensionPx at the provider and CLI image handoffs (#205663) chore(ui): refresh control ui locales (#205664) fix(google): preserve playback when Google Live splits audio into parts (#205364) fix: show named characters in exported session messages (#205362) ...
What Problem This Solves
When the WhatsApp listener sent a voice note with a caption, WhatsApp accepted two messages. The combined delivery receipt labeled both as media, so a consumer reading the receipt could not identify the caption as text.
User Impact
The receipt now identifies the audio message as media and the caption as text, in send order. It keeps both provider message IDs and counts the pair as one outbound activity.
Why This Change Was Made
The send API already records the kind and provider key of each accepted message. The combined receipt now carries those physical parts forward and numbers them in delivery order.
Evidence
Replayed a 251-frame Ogg voice note with a caption through the listener and send API against an in-memory transport. The original returned two media entries. The fix returned media at index 0 and text at index 1, with the same primary ID, destination, participant and sender metadata.
Eight send scenarios covered the caption, voice-only and whitespace-only inputs, plain text, separate calls, video, poll and the higher-level voice/text split. Formatting, focused lint and the line-cap check passed. Hosted Vitest passed 32 send-api cases, including the two child receipt kinds and partial caption acceptance. WhatsApp sender tests · Protected CI