test(ui-server): the web broker's calls() helper reads calls.jsonl mid-write and throws
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
- 87/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- testing
Direzione di ricerca
Inizia dall’helper calls() in packages/ui-server/tests/web-tools-broker.test.ts e dal writer dei fixture in packages/ui-server/tests/fixtures/web-executor.ts. Cerca in packages/ui-server/tests/ altri lettori di calls.jsonl, poi verifica l’helper con un file vuoto e uno che termina con una riga incompleta. Il lavoro è terminato quando tutti i lettori ignorano le righe incomplete e i controlli di accettazione passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
packages/ui-server/tests/web-tools-broker.test.ts "no result returns after the turn stops being current, and a late answer to cancel is discarded" failed in CI with:
SyntaxError: JSON Parse error: Unexpected EOF
at until (web-tools-broker.test.ts:43:11)
at web-tools-broker.test.ts:179:9
This was hosted candidate run 44198693229, job unit (3), for PR #4240. That PR touches only ui-react markdown rendering.
Cause
The test helper calls (calls, packages/ui-server/tests/web-tools-broker.test.ts:36-37) reads calls.jsonl whenever the file exists, and parses each line of the trimmed text.
The executor fixture appends from another process with appendFileSync (packages/ui-server/tests/fixtures/web-executor.ts:58). That opens the file with create and append, then writes. So the poll inside until(() => calls().length === 1) can read the file after it is created and before the line is written: "".trim().split("\n") is [""], and JSON.parse("") throws. A partly written line throws the same way. until does not catch, so the test fails instead of polling again.
Acceptance criteria
-
calls()ignores an empty or unterminated last line, so a read in the middle of a write gives the calls already complete. For example, parse only lines ended by\n. - A test or a mutation shows the helper returns
[]for an empty file and drops an unterminated last line. - Check the other
calls.jsonlreaders inpackages/ui-server/tests/for the same race, and fix them the same way.
- 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: 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
-
ui-server: run-session's error-result test waits only 200 one-millisecond ticks for the first promptApertaagent-ready area: ui-server priority: p3 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
schlessera/brain-kit#4066 ·
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