[BUG] Two queued messages sent in the same tick: the second overwrites the first unread ask response
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend-api-design
Direzione di ricerca
Start by reading src/core/task/Task.ts, especially handleWebviewAskResponse, processQueuedMessages, and the ask() polling path; trace how unread responses reach conversation content. Add a test that sends two queued responses before one ask() poll and asserts both payloads appear in the conversation content. The issue is done when neither response is overwritten and both reach the conversation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Two queued messages that leave the queue in the same tick can lose one. The second message overwrites the first message in the unread ask response.
Cause (from reading the code, not yet shown by a failing test)
Task.handleWebviewAskResponsewrites one response slot:askResponse,askResponseText,askResponseImagesandaskResponseSegments.Task.processQueuedMessages()dequeues one message. It then callssetTimeout, which callssubmitUserMessage, which callshandleWebviewAskResponse.- Each tool call can call
processQueuedMessages(). A multi-fileapply_patchcalls it once for each changed file. - If two calls run before
ask()polls, the second write replaces the first. The first message has already left the queue, so it never reaches the conversation.
main has the same path. PR #2421 adds no new loss. It adds one more way to reach the slot: a blocked drain can send a message when an edit ends.
Expected result
Each queued message that leaves the queue reaches the conversation content.
Fix ideas
- Keep each queued message pending until the task consumes it.
- Or combine unread responses and do not replace an unread one.
- Related: #21 (extract the ask and say flow from
Task.ts).
Test wanted
Send two queued responses before one ask() poll. Assert that both payloads reach the conversation content. A test that only counts two submitUserMessage calls does not detect the loss.
Found in
Review of PR #2421, bot comment on src/core/task/Task.ts (submitQueuedMessage).
- Lingua principale
- TypeScript
- Stelle
- 2k
- Fork
- 301
- Merge medio
- 3g 14h
- PR unite (30g)
- 103
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Zoo-Code-Org/Zoo-Code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
I maintainer di solito rispondono entro 3 giorni
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on WindowsForse già presa @easonLiangWorldedtech l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
I maintainer di solito rispondono entro 3 giorni
-
[BUG] search_files hides matching text on long linesForse già presa @DananjayaNadun l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di Zoo-Code-Org/Zoo-Code
Issue simili
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
tashfeenahmed/freellmapi#2169 ·
I maintainer di solito rispondono entro 1 giorno
-
via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
vercel-labs/ui#1563 ·
I maintainer di solito rispondono entro 1 giorno