Skip to content

fix(whatsapp): align QA message extraction with Baileys envelopes - #117579

Merged
steipete merged 1 commit into
mainfrom
codex/qa408-whatsapp-futureproof-owner
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa408-whatsapp-futureproof-owner

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where WhatsApp QA users waiting for native polls or video notes would time out even though WhatsApp delivered the message, including V5 polls, V4-wrapped polls, edited polls, and captionless video notes.

Why This Change Was Made

Restore three independently evidenced owner invariants: recognize native PTV video notes, recognize V5 native polls, and replace the incomplete seven-wrapper allowlist with Baileys’ canonical active-message FutureProof traversal. Preserve the existing depth bound and media MIME owner while removing seven net production lines.

User Impact

WhatsApp QA scenarios now observe direct, ephemeral, edited, and FutureProof-wrapped polls and video notes through the existing message waiter. Normal WhatsApp transport, authentication, configuration, storage, and public APIs are unchanged.

Evidence

  • Before: real messages.upsert → waitForMessage regressions reproduced 11 failures while six existing V1/V2/V3 controls passed.
  • After: all 36 WhatsApp QA owner tests pass, including direct/ephemeral V1, V2, V3, and V5 polls; genuine V4 FutureProof → V3/V5 polls; edited polls; and direct/ephemeral/edited PTV video notes.
  • Extension production and test typechecks, configured extension lint, formatting, deprecated-API checks, and plugin-boundary CI all pass.
  • Exact candidate owner blobs verified against current main in hosted GitHub Actions.
  • Six independent source reviews and formal gpt-5.6-sol high-reasoning P0–P3 review report no findings; genuine native TruffleHog 3.96.0 credential scanning is clean.

@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web size: S maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete
steipete marked this pull request as ready for review August 1, 2026 19:08
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 3:14 PM ET / 19:14 UTC.

ClawSweeper review

What this changes

The PR updates WhatsApp QA message extraction to follow active Baileys envelopes and adds inbound waiter coverage for V5 polls, FutureProof-wrapped polls, and captionless video notes.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep this maintainer-labeled PR open for WhatsApp owner review. Current main still omits V5 poll and PTV media recognition in the QA waiter, while the proposed bounded traversal follows the adjacent inbound extractor’s envelope pattern; the exact installed Baileys source could not be inspected because this read-only checkout has no dependencies and its promisor remote could not resolve GitHub.

Priority: P2
Reviewed head: 818069826a16a79fec52613f99c1fa7d1380b218
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, well-covered repair that matches the adjacent inbound extraction design; only owner confirmation of the exact dependency behavior remains before landing.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-labeled PR, so the external-contributor proof gate does not apply; its body nevertheless reports a messages-upsert-to-waiter after-fix run and focused validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-labeled PR, so the external-contributor proof gate does not apply; its body nevertheless reports a messages-upsert-to-waiter after-fix run and focused validation.
Evidence reviewed 5 items Current-main gap: Current QA extraction searches only poll V1, V2, and V3, and its media list excludes ptvMessage; V5 polls and captionless video notes therefore cannot become the expected observed records on current main.
Adjacent canonical pattern: The production inbound extractor already derives the selected content field with Baileys getContentType, checks for an inner .message, and bounds message-chain traversal; it already recognizes V5 polls and PTV media.
Proposed focused coverage: The PR head adds direct, ephemeral, edited, and V4 FutureProof cases for V5 polls and PTV video notes, with each case waiting through the public QA session API rather than calling extraction helpers directly.
Findings None None.
Security None None.

How this fits together

The WhatsApp QA driver receives Baileys messages.upsert envelopes and converts inbound content into observed poll, media, reaction, location, or text records. The existing QA message waiter consumes those records to decide whether a scenario received its expected WhatsApp response.

flowchart LR
  A[Baileys message upsert] --> B[WhatsApp QA driver]
  B --> C[Envelope traversal]
  C --> D[Poll and media extraction]
  D --> E[Observed message record]
  E --> F[QA message waiter]
  F --> G[Scenario result]
Loading

Decision needed

Question Recommendation
Should the WhatsApp owner accept this QA-only envelope traversal repair after current-head validation confirms Baileys 7.0.0-rc13 selects the intended active wrapper? Approve after current-head validation: Confirm the Baileys envelope selection on the exact dependency version and land the focused repair if the pending checks remain green.

Why: The PR is protected by the maintainer label and changes a dependency-shaped inbound-message interpretation path; normal automated cleanup must not make the final landing choice.

Before merge

  • Add real behavior proof - Not applicable: This is a maintainer-labeled PR, so the external-contributor proof gate does not apply; its body nevertheless reports a messages-upsert-to-waiter after-fix run and focused validation.
  • Resolve merge risk (P1) - The exact Baileys 7.0.0-rc13 runtime source and a local execution were unavailable in this read-only checkout, so the remaining merge check is to confirm the active-envelope traversal against the dependency on the PR’s current head rather than infer it from mocks alone.
  • Complete next step (P2) - The branch has no concrete review finding, but the protected maintainer label and unavailable local dependency source require WhatsApp-owner confirmation rather than an automated repair or cleanup action.
Agent review details

Security

None.

PR surface

Source -7, Tests +94. Total +87 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 7 14 -7
Tests 1 94 0 +94
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 101 14 +87

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one bounded QA-only extractor path aligned with the existing inbound Baileys envelope logic, retain the new waiter-level cases, and merge after the WhatsApp owner confirms current-head dependency and CI evidence.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one bounded QA-only extractor path aligned with the existing inbound Baileys envelope logic, retain the new waiter-level cases, and merge after the WhatsApp owner confirms current-head dependency and CI evidence.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main omits pollCreationMessageV5 and ptvMessage from the QA extractor lists, so those incoming shapes cannot satisfy the corresponding waiter expectations. This review did not execute the regression because the read-only checkout has no installed dependencies.

Is this the best way to solve the issue?

Yes, with one validation gap: extending the existing bounded extraction path and using the established Baileys-shaped envelope flow is narrower and more maintainable than adding another wrapper allowlist. The exact dependency behavior should still be checked on the current PR head before landing.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c5090b9cf503.

Labels

Label changes:

  • add P2: This is a bounded WhatsApp QA observation defect: it can make scenario waiters time out for valid message shapes, but there is no evidence of production transport, auth, or availability failure.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-labeled PR, so the external-contributor proof gate does not apply; its body nevertheless reports a messages-upsert-to-waiter after-fix run and focused validation.

Label justifications:

  • P2: This is a bounded WhatsApp QA observation defect: it can make scenario waiters time out for valid message shapes, but there is no evidence of production transport, auth, or availability failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a maintainer-labeled PR, so the external-contributor proof gate does not apply; its body nevertheless reports a messages-upsert-to-waiter after-fix run and focused validation.

Evidence

What I checked:

  • Current-main gap: Current QA extraction searches only poll V1, V2, and V3, and its media list excludes ptvMessage; V5 polls and captionless video notes therefore cannot become the expected observed records on current main. (extensions/whatsapp/src/qa-driver.runtime.ts:216, c5090b9cf503)
  • Adjacent canonical pattern: The production inbound extractor already derives the selected content field with Baileys getContentType, checks for an inner .message, and bounds message-chain traversal; it already recognizes V5 polls and PTV media. (extensions/whatsapp/src/inbound/extract.ts:17, c5090b9cf503)
  • Proposed focused coverage: The PR head adds direct, ephemeral, edited, and V4 FutureProof cases for V5 polls and PTV video notes, with each case waiting through the public QA session API rather than calling extraction helpers directly. (extensions/whatsapp/src/qa-driver.runtime.test.ts:465, 818069826a16)
  • History and likely owner: The locally available history attributes the QA-driver extraction helpers and nearby media tests to Peter Steinberger at the shallow-history boundary; this identifies the most direct available routing candidate, not a fault assignment. (extensions/whatsapp/src/qa-driver.runtime.ts:157, a88f3ffc9609)
  • Dependency inspection limitation: The WhatsApp plugin pins Baileys to 7.0.0-rc13, but this read-only checkout has neither root nor extension node_modules; Git attempted a promisor fetch and could not resolve GitHub, so this review did not claim an installed-source or runtime execution result. (extensions/whatsapp/package.json:12, c5090b9cf503)

Likely related people:

  • steipete: The available blame and first locally observable history attribute the QA extraction helpers and nearby tests to Peter Steinberger; the PR author also has prior current-main ownership of this exact path. (role: direct-file feature contributor and likely review owner; confidence: high; commits: a88f3ffc9609, 568ea29d2e04; files: extensions/whatsapp/src/qa-driver.runtime.ts, extensions/whatsapp/src/qa-driver.runtime.test.ts)
  • Vincent Koc: Recent history includes a WhatsApp extension-wide change, providing a secondary routing candidate when reviewing package-level behavior. (role: recent adjacent WhatsApp extension contributor; confidence: medium; commits: 263741b1f076; files: extensions/whatsapp)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the active-envelope traversal against Baileys 7.0.0-rc13 on the exact current PR head.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 7c9794b into main Aug 1, 2026
154 of 162 checks passed
@steipete
steipete deleted the codex/qa408-whatsapp-futureproof-owner branch August 1, 2026 19:30
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 1, 2026
* origin/main: (22 commits)
  refactor(ui): consolidate cron form control rendering (#117576)
  fix(memory): recover restored session freshness (#117548)
  fix(whatsapp): normalize future-proof QA poll and video note ingress (#117579)
  fix(perf): separate warm and first-device health probes (#117525)
  fix(ci): repair plugin prerelease validation (#117562)
  fix(tasks): sanitize every human task and flow detail (#117568)
  fix(feishu): cancel unread streaming-card error bodies before release (#117312)
  fix(status): honor explicit local RPC fallback timeouts (#117519)
  fix(ui): preserve Talk transcript surrogate bounds
  fix(tasks): validate notification policy before persistence (#117554)
  refactor: consolidate full release child workflows (#117385)
  refactor(policy): centralize doctor health-check descriptors (#117578)
  perf(gateway): mark recovery before model preparation (#117544)
  fix(ui): harden Talk transcript marker bounds
  test(openai): parse realtime websocket frames safely
  fix(openai): keep embedding identity stable across upgrades (#117557)
  fix(googlechat): drop invalid thread resource names before send (#108324)
  test(ui): cover bounded realtime Talk entries
  fix(ui): bound realtime Talk conversation text
  test(ui): cover reentrant Talk meter cleanup
  ...
abdulrahman305 pushed a commit to qenex-ai/openclaw that referenced this pull request Aug 1, 2026
* origin/main:
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  test(openai): parse realtime websocket frames safely
  test(ui): cover reentrant Talk meter cleanup
  fix(ui): reclaim reentrant Talk audio meters
  fix(openai): own queued realtime audio buffer snapshots
pull Bot pushed a commit to zhenglee1984/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (28 commits)
  refactor(ui): consolidate cron form control rendering (openclaw#117576)
  fix(memory): recover restored session freshness (openclaw#117548)
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  fix(tasks): sanitize every human task and flow detail (openclaw#117568)
  fix(feishu): cancel unread streaming-card error bodies before release (openclaw#117312)
  fix(status): honor explicit local RPC fallback timeouts (openclaw#117519)
  fix(ui): preserve Talk transcript surrogate bounds
  fix(tasks): validate notification policy before persistence (openclaw#117554)
  refactor: consolidate full release child workflows (openclaw#117385)
  refactor(policy): centralize doctor health-check descriptors (openclaw#117578)
  perf(gateway): mark recovery before model preparation (openclaw#117544)
  fix(ui): harden Talk transcript marker bounds
  test(openai): parse realtime websocket frames safely
  fix(openai): keep embedding identity stable across upgrades (openclaw#117557)
  fix(googlechat): drop invalid thread resource names before send (openclaw#108324)
  fix(skills): preserve profile in ClawHub command hints (openclaw#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (openclaw#117556)
  fix(irc): strip markdown from outbound text (openclaw#112961)
  ...
abdulrahman305 pushed a commit to qenex-ai/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (53 commits)
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  fix(tasks): sanitize every human task and flow detail (openclaw#117568)
  fix(feishu): cancel unread streaming-card error bodies before release (openclaw#117312)
  fix(status): honor explicit local RPC fallback timeouts (openclaw#117519)
  fix(tasks): validate notification policy before persistence (openclaw#117554)
  refactor: consolidate full release child workflows (openclaw#117385)
  refactor(policy): centralize doctor health-check descriptors (openclaw#117578)
  perf(gateway): mark recovery before model preparation (openclaw#117544)
  test(openai): parse realtime websocket frames safely
  fix(openai): keep embedding identity stable across upgrades (openclaw#117557)
  fix(googlechat): drop invalid thread resource names before send (openclaw#108324)
  fix(skills): preserve profile in ClawHub command hints (openclaw#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (openclaw#117556)
  fix(irc): strip markdown from outbound text (openclaw#112961)
  refactor(plugins): consolidate registry snapshots (openclaw#117561)
  test(ui): cover reentrant Talk meter cleanup
  fix(plugins): fail blocked enable commands (openclaw#117536)
  fix(ui): reclaim reentrant Talk audio meters
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (22 commits)
  refactor(ui): consolidate cron form control rendering (openclaw#117576)
  fix(memory): recover restored session freshness (openclaw#117548)
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  fix(tasks): sanitize every human task and flow detail (openclaw#117568)
  fix(feishu): cancel unread streaming-card error bodies before release (openclaw#117312)
  fix(status): honor explicit local RPC fallback timeouts (openclaw#117519)
  fix(ui): preserve Talk transcript surrogate bounds
  fix(tasks): validate notification policy before persistence (openclaw#117554)
  refactor: consolidate full release child workflows (openclaw#117385)
  refactor(policy): centralize doctor health-check descriptors (openclaw#117578)
  perf(gateway): mark recovery before model preparation (openclaw#117544)
  fix(ui): harden Talk transcript marker bounds
  test(openai): parse realtime websocket frames safely
  fix(openai): keep embedding identity stable across upgrades (openclaw#117557)
  fix(googlechat): drop invalid thread resource names before send (openclaw#108324)
  test(ui): cover bounded realtime Talk entries
  fix(ui): bound realtime Talk conversation text
  test(ui): cover reentrant Talk meter cleanup
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main:
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  test(openai): parse realtime websocket frames safely
  test(ui): cover reentrant Talk meter cleanup
  fix(ui): reclaim reentrant Talk audio meters
  fix(openai): own queued realtime audio buffer snapshots
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (28 commits)
  refactor(ui): consolidate cron form control rendering (openclaw#117576)
  fix(memory): recover restored session freshness (openclaw#117548)
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  fix(tasks): sanitize every human task and flow detail (openclaw#117568)
  fix(feishu): cancel unread streaming-card error bodies before release (openclaw#117312)
  fix(status): honor explicit local RPC fallback timeouts (openclaw#117519)
  fix(ui): preserve Talk transcript surrogate bounds
  fix(tasks): validate notification policy before persistence (openclaw#117554)
  refactor: consolidate full release child workflows (openclaw#117385)
  refactor(policy): centralize doctor health-check descriptors (openclaw#117578)
  perf(gateway): mark recovery before model preparation (openclaw#117544)
  fix(ui): harden Talk transcript marker bounds
  test(openai): parse realtime websocket frames safely
  fix(openai): keep embedding identity stable across upgrades (openclaw#117557)
  fix(googlechat): drop invalid thread resource names before send (openclaw#108324)
  fix(skills): preserve profile in ClawHub command hints (openclaw#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (openclaw#117556)
  fix(irc): strip markdown from outbound text (openclaw#112961)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (53 commits)
  fix(whatsapp): normalize future-proof QA poll and video note ingress (openclaw#117579)
  fix(perf): separate warm and first-device health probes (openclaw#117525)
  fix(ci): repair plugin prerelease validation (openclaw#117562)
  fix(tasks): sanitize every human task and flow detail (openclaw#117568)
  fix(feishu): cancel unread streaming-card error bodies before release (openclaw#117312)
  fix(status): honor explicit local RPC fallback timeouts (openclaw#117519)
  fix(tasks): validate notification policy before persistence (openclaw#117554)
  refactor: consolidate full release child workflows (openclaw#117385)
  refactor(policy): centralize doctor health-check descriptors (openclaw#117578)
  perf(gateway): mark recovery before model preparation (openclaw#117544)
  test(openai): parse realtime websocket frames safely
  fix(openai): keep embedding identity stable across upgrades (openclaw#117557)
  fix(googlechat): drop invalid thread resource names before send (openclaw#108324)
  fix(skills): preserve profile in ClawHub command hints (openclaw#117555)
  fix(cli): explain filtered plugin policy without unsafe recovery (openclaw#117556)
  fix(irc): strip markdown from outbound text (openclaw#112961)
  refactor(plugins): consolidate registry snapshots (openclaw#117561)
  test(ui): cover reentrant Talk meter cleanup
  fix(plugins): fail blocked enable commands (openclaw#117536)
  fix(ui): reclaim reentrant Talk audio meters
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: whatsapp-web Channel integration: whatsapp-web maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant