Skip to content

fix(positron): dedup chat projection by (sender, content) — kill the #16 doubled-turns bug - #1808

Merged
joelteply merged 1 commit into
canaryfrom
fix/positron-multihop-replay-dedup
Jul 5, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/positron-multihop-replay-dedup

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The bug hurting every interface: personas' turns rendered TWICE (Asha-A, Solenne-B, Asha-A,
Solenne-B) on web, terminal, and RAG. Root-caused empirically: the live persona conversation is
airc-native (continuum main.db held only 4 human test messages), and the same logical block replays
through the bus with a FRESH message_id each hop (#16 multi-hop). apply_message deduped only on
message_id, so the fresh-id replay slipped through and double-appended.

Fix: apply_message is now idempotent on message_id AND on (sender_id, content) — the same content
identity the cognition admission dedup already uses (content_hash, cognition_io.rs). One (sender,
content) is one message however many ids the bus mints for it; a genuinely new message still appends.

Verified: 13/13 positron_source tests green incl. the new multi_hop_replay_with_fresh_id regression
(3 fresh-id copies → 1 message; new content → 2). Live effect lands on next core boot — the projection
collapses the replayed block. Fixes the visible duplication behind the desktop love-pass caveat.

Co-Authored-By: Claude Opus 4.8 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

 doubled-turns bug

The bug hurting every interface: personas' turns rendered TWICE (Asha-A, Solenne-B, Asha-A,
Solenne-B) on web, terminal, and RAG. Root-caused empirically: the live persona conversation is
airc-native (continuum main.db held only 4 human test messages), and the same logical block replays
through the bus with a FRESH message_id each hop (#16 multi-hop). apply_message deduped only on
message_id, so the fresh-id replay slipped through and double-appended.

Fix: apply_message is now idempotent on message_id AND on (sender_id, content) — the same content
identity the cognition admission dedup already uses (content_hash, cognition_io.rs). One (sender,
content) is one message however many ids the bus mints for it; a genuinely new message still appends.

Verified: 13/13 positron_source tests green incl. the new multi_hop_replay_with_fresh_id regression
(3 fresh-id copies → 1 message; new content → 2). Live effect lands on next core boot — the projection
collapses the replayed block. Fixes the visible duplication behind the desktop love-pass caveat.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit c50932f into canary Jul 5, 2026
@joelteply
joelteply deleted the fix/positron-multihop-replay-dedup branch July 5, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant