ui-server: run-session's error-result test waits only 200 one-millisecond ticks for the first prompt
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bun, typescript
- Ambito
- testing
Direzione di ricerca
Leggi prima l'helper until in packages/ui-server/tests/run-session.test.ts:80-86: esegue polling con 200 setTimeout da un millisecondo, che è il budget che si esaurisce sotto carico. Poi guarda il caso che fallisce in run-session.test.ts:452-458 per vedere cosa attende e se il prompt espone una promise che può essere attesa al suo posto. Sostituisci il conteggio dei tick con una scadenza wall-clock o quella promise, mantenendo un percorso di fallimento per un prompt che non arriva mai. Fatto significa che bun run test packages/ui-server/tests/run-session.test.ts passa 20 esecuzioni consecutive sotto un ciclo di CPU-burn e continua a fallire quando il primo prompt viene soppresso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
runSession > an error result fails its turn and is cleared before the next queued turn (packages/ui-server/tests/run-session.test.ts:452-458) waits for the backend's first prompt with until (run-session.test.ts:80-86). until polls 200 times with a 1 ms setTimeout, so its whole budget is roughly 200 ms of timer ticks.
Observed once locally, 2026-11-15, during a 124-file bun run test of ui-server files running alongside other worktrees' suites. It failed with error: condition was not reached at run-session.test.ts:458. The same file passes alone (16/16) on the same tree, and the change under test there (#3733) does not touch runSession. This is a timing budget under CPU load, not a product failure.
Scope
- Give the wait a budget that does not depend on how quickly 1 ms timers fire under load, for example a deadline in wall time or awaiting the prompt's own promise.
Out of scope
runSessionbehaviour.
Acceptance criteria
- The test passes under a CPU-burn loop across 20 consecutive runs, and still fails if the first prompt never arrives.
Verification
bun run test packages/ui-server/tests/run-session.test.ts, under load.
Contract impact
None.
2026-11-16 triage at main 3b104890f8: Verified until (packages/ui-server/tests/run-session.test.ts:80-86) and the prompt wait in the named case. This is a scoped test synchronization repair: wait on the observable prompt or a finite elapsed deadline, record the chosen bound, and retain a prompt-never-arrives negative control within the test’s existing outer timeout. Preserve all run-session outcome/queue assertions and meaningful cleanup. No production or UX choice is open. Preserve p3, add agent-ready, and keep standalone because the matching keyless epic #736 already has 100 direct children.
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 0
- Merge medio
- 6h 5m
- PR unite (30g)
- 730
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 schlessera/brain-kit
-
agent-ready area: ui-server priority: p3 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
schlessera/brain-kit#4249 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-ready area: ui-server priority: p3 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
schlessera/brain-kit#4247 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-ready area: ci area: docs priority: p2 type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
schlessera/brain-kit#4144 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-ready area: ci area: ui-sdk priority: p2 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
schlessera/brain-kit#4047 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-ready area: ci priority: p2 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
schlessera/brain-kit#4003 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di schlessera/brain-kit
Issue simili
-
documentation tool triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
can1357/oh-my-pi#19608 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bcgov/nr-waste-plus#1549 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-tx-parse#18 ·
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100