Skip to main content

async-dedup-race-in-streaming-pipelines

Estrelas9
Forks2
Atualizado10 de março de 2026 às 08:02

Fix invisible/broken rendering when streaming deduplicated results through SSE or WebSocket pipelines with async enrichment. Use when: (1) a counter/count shows items exist but UI renders nothing or fewer items than expected, (2) Svelte keyed {#each} or React key-based lists show blank despite array having items, (3) streaming pipeline uses async processing per item with a dedup Map/Set check before the await, (4) fire-and-forget async calls with Promise.then() lose results when parent stream closes. Root cause: dedup check happens before async gap, allowing concurrent calls for the same key to all pass, producing duplicate emissions. Secondary cause: onDone/stream-close fires before all async promises resolve, silently dropping late results.

Instalação

Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.

SKILL.md
readonly