Skip to content

Dev#698

Closed
namastex888 wants to merge 20 commits into
homologfrom
dev
Closed

Dev#698
namastex888 wants to merge 20 commits into
homologfrom
dev

Conversation

@namastex888
Copy link
Copy Markdown
Contributor

No description provided.

namastex888 and others added 19 commits May 31, 2026 14:39
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
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fdf9d5a3-c9a1-4629-b02d-b8fc77ce7385

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +139 to +145
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]');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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]');
}

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

mimeType: z
.string()
.optional()
.describe('MIME type of the media (e.g. image/gif enables GIF playback for video type)'),

P2 Badge Add mimeType to the OpenAPI media schema

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".

Comment on lines +545 to +546
if (data.type === 'audio' && data.voiceNote === true && data.base64) {
return { audioBuffer: Buffer.from(data.base64, 'base64'), ptt: true };
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

namastex888 added a commit that referenced this pull request Jun 3, 2026
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>
@namastex888
Copy link
Copy Markdown
Contributor Author

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.

@namastex888
Copy link
Copy Markdown
Contributor Author

Closed as superseded by merged clean sync PR #699; avoids rewriting shared dev history or bypassing failed commitlint on old commit history.

@namastex888 namastex888 closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants