Skip to content

Codex/fix inbox sync - #2

Closed
maruise237 wants to merge 4 commits into
zernio-dev:mainfrom
maruise237:codex/fix-inbox-sync
Closed

maruise237 wants to merge 4 commits into
zernio-dev:mainfrom
maruise237:codex/fix-inbox-sync

Conversation

@maruise237

Copy link
Copy Markdown

No description provided.

@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Zernio Team on Vercel.

A member of the Team first needs to authorize it.

@maruise237 maruise237 closed this May 31, 2026
khilta added a commit to khilta/zernflow that referenced this pull request Aug 14, 2026
…ers, dm_sent verification

Bug zernio-dev#1 (Phantom DM Lockout):
- comment-processor.ts: Pre-write dm_sent=false (not true) before flow runs
- After executeFlow, query messages table to verify DM actually sent
- Dedup now blocks only on dm_sent=true (not reply_sent=true)
- Failed DMs no longer permanently lock users out

Bug zernio-dev#2 (Wrong API for Returning Users):
- engine.ts: Comment-triggered flows ALWAYS use sendPrivateReplyToComment
  (7-day window) instead of falling back to sendInboxMessage (24h window)
- This was the root cause of Bhashkar's DM failure on Post zernio-dev#5
- sendFirstMessageAsPrivateReply now re-throws on failure

Data fixes:
- Reset Bhashkar dm_sent=false on Post zernio-dev#5 (Follow)
- Reset Trupti dm_sent=false (Crack)
khilta added a commit to khilta/zernflow that referenced this pull request Aug 14, 2026
…rsation_id from overwrite

Bug zernio-dev#1 (engine.ts): executePrivateReply swallowed errors — caught the
exception but never re-threw, so the flow continued as if the DM succeeded.
Now logs message_failed analytics event and re-throws, matching the pattern
already used in sendFirstMessageAsPrivateReply.

Bug zernio-dev#2 (webhook late/route.ts): upsert unconditionally set
late_conversation_id on every incoming message, which could overwrite a
valid conversation ID for existing contacts. Now uses two-step insert-
then-update: INSERT for new contacts (sets conv.id), UPDATE for existing
contacts (leaves late_conversation_id untouched).
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.

1 participant