Dev#698
Conversation
Verified: frozen install, focused tests 89/0, package typechecks, Biome, pre-push full suite 3962/0, GitHub CI green.
fix(homolog): propagate KHAL session ids through Gupshup dispatch
…-spans-20260531T215628Z feat(observability): add Omni curated lifecycle spans
…-spans-20260531T215628Z fix(api): propagate active trace context for lifecycle waterfall
…-target-dev fix(whatsapp): resolve reaction UUID targets
…p-identities-dev fix(persons): search WhatsApp participant identities
fix(api): repair voice notes and Veo requests
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces several enhancements across the platform, including OpenTelemetry-based human lifecycle observability tracing in the agent dispatcher with PII and secret redaction. It also updates the Gemini video generation provider to omit the unsupported generateAudio option, improves WhatsApp media sending by forwarding voice notes as an audio buffer, and resolves reaction target UUIDs to native external IDs. Additionally, the person search service has been rewritten to query chat participants and platform identities, resolving sparse contact names on WhatsApp LID DMs. Feedback is provided regarding a bug in the PII redaction logic where WhatsApp JIDs are incorrectly classified as emails due to regex ordering.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| function redactLifecycleText(value: string): string { | ||
| return value | ||
| .replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, '[EMAIL]') | ||
| .replace(/\b\+?\d[\d\s().-]{5,}\d\b/g, '[PHONE]') | ||
| .replace(/\b\d{6,}\b/g, '[NUMBER]') | ||
| .replace(/\b[^\s@]+@(s\.whatsapp\.net|g\.us|lid|newsletter)\b/gi, '[JID]'); | ||
| } |
There was a problem hiding this comment.
In redactLifecycleText, the email regex runs before the JID regex. Because WhatsApp JIDs (e.g., 5511999887766@s.whatsapp.net) match the email regex pattern, they are incorrectly redacted as [EMAIL] instead of [JID]. Reordering the replacements so that the JID regex runs first resolves this issue.
| function redactLifecycleText(value: string): string { | |
| return value | |
| .replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, '[EMAIL]') | |
| .replace(/\b\+?\d[\d\s().-]{5,}\d\b/g, '[PHONE]') | |
| .replace(/\b\d{6,}\b/g, '[NUMBER]') | |
| .replace(/\b[^\s@]+@(s\.whatsapp\.net|g\.us|lid|newsletter)\b/gi, '[JID]'); | |
| } | |
| function redactLifecycleText(value: string): string { | |
| return value | |
| .replace(/\b[^\s@]+@(s\.whatsapp\.net|g\.us|lid|newsletter)\b/gi, '[JID]') | |
| .replace(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, '[EMAIL]') | |
| .replace(/\b\+?\d[\d\s().-]{5,}\d\b/g, '[PHONE]') | |
| .replace(/\b\d{6,}\b/g, '[NUMBER]'); | |
| } |
There was a problem hiding this comment.
💡 Codex Review
omni/packages/api/src/routes/v2/messages.ts
Lines 528 to 531 in 64e7f9c
This route now accepts and uses mimeType, but the separate OpenAPI SendMediaSchema in packages/api/src/schemas/openapi/messages.ts still omits that field, and the generated SDK media request models likewise have no mimeType property. Clients using the documented/generated API therefore cannot set the new field needed for cases like image/gif playback or custom audio MIME handling.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (data.type === 'audio' && data.voiceNote === true && data.base64) { | ||
| return { audioBuffer: Buffer.from(data.base64, 'base64'), ptt: true }; |
There was a problem hiding this comment.
Preserve base64 until voice-note conversion runs
For base64 voice notes that are not already OGG/Opus (for example an MP3/WAV upload with voiceNote: true), this now replaces metadata.base64 with audioBuffer before the WhatsApp plugin sees it. The plugin's processAudioForVoiceNote path still only looks at message.metadata.base64 or message.content.mediaUrl before calling the converter, so these uploads skip conversion and are sent as PTT with the original codec/mimetype, which WhatsApp voice notes do not reliably accept.
Useful? React with 👍 / 👎.
Replacement for PR #698 using a clean commit history. PR #698 includes an older dev commit body that violates commitlint body-max-line-length. This branch keeps the current origin/dev tree but places it as one compliant sync commit on top of origin/homolog. Evidence before creating this branch: - PR #698 became mergeable after syncing homolog workflow changes into dev. - Local frozen install passed. - Local version verification passed. - Local packages/api typecheck passed. - Local focused API tests passed: 81 pass, 0 fail. - Dev pre-push full monorepo typecheck and test passed: 3972 pass, 0 fail. - GitHub PR #698 Quality Gate and Smoke Test passed. Scope: - Contains the current origin/dev tree as of 351c678. - Excludes unrelated local Gupshup multiline checkout changes. Co-authored-by: Drogo Hermes <genie@namastex.ai>
|
Superseded by clean sync PR #699.\n\nI reviewed #698 comments first:\n- CodeRabbit skipped review on non-default base; no blocker.\n- Gemini's PII/JID redaction note is worth tracking but inherited dev payload, not a sync blocker.\n- Codex P2 OpenAPI mimeType schema gap is real follow-up API/SDK debt, but not included here to keep sync pure.\n\nWhy superseded: after syncing homolog into dev, #698 became mergeable and Quality Gate/Smoke passed, but Commit Messages still failed on historical commit 31aecaf body-max-line-length. Rather than force-rewriting shared dev or bypassing checks, #699 applies the current origin/dev tree onto homolog as one compliant commit. CI green and merged. |
|
Closed as superseded by merged clean sync PR #699; avoids rewriting shared dev history or bypassing failed commitlint on old commit history. |
No description provided.