Skip to content

Agents: fix joining (broken create_direct_conversation), full rollback (0.7.1) - #296

Merged
ralyodio merged 1 commit into
masterfrom
fix/agent-redeem-conversation
Oct 6, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/agent-redeem-conversation

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Live test of agent joining failed with "Could not open the conversation". create_direct_conversation() inserts the creator as a participant after the auto_add_conversation_creator trigger already did, so it always hits the unique key. Nothing else had ever called it. Redemption now inserts the conversation and upserts both participants.

The rollback also missed the public.users row, because deleting the auth user doesn't cascade. It now deletes the users row, its trigger-made note-to-self, the key and the conversation. The orphan from the failed test was removed by hand.

Tests: agent tests updated (no RPC; rollback deletes the users row).

🤖 Generated with Claude Code

…(0.7.1)

create_direct_conversation() inserts the creator as a participant after a
trigger already did, so it always failed on the unique key and agent joins
rolled back. Insert the conversation and upsert both participants instead.
The rollback now also deletes the users row (deleting the auth user does not
cascade), its trigger-made note-to-self, the key and the conversation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

13 finding(s)

MEDIUM: 9 | LOW: 4

Severity Rule Location
MEDIUM js-unescaped-html-sink src/app/blog/[slug]/page.jsx:38
MEDIUM js-unescaped-html-sink src/app/blog/[slug]/page.jsx:66
MEDIUM js-unescaped-html-sink src/app/faq/page.jsx:57
MEDIUM js-unescaped-html-sink src/app/layout.jsx:137
MEDIUM js-unescaped-html-sink src/app/layout.jsx:141
MEDIUM js-unescaped-html-sink src/app/page.jsx:47
MEDIUM redos-nested-quantifier src/lib/auth/dns-name.js:88
MEDIUM js-unescaped-html-sink src/lib/components/chat/MessageItem.jsx:84
MEDIUM js-unescaped-html-sink src/lib/components/chat/MessageItem.jsx:129
LOW secret-generic-credential src/app/api/auth/register-anon/route.test.js:32
LOW secret-jwt tests/debug-sms.js:10
LOW secret-generic-credential tests/private-key-import-export.test.js:252
LOW secret-generic-credential tests/private-key-import-export.test.js:264

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 2c3bf47 into master Oct 6, 2026
11 checks passed
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