test(ui-server): the files_changed workspaces/ case outruns the 30 s test limit on a loaded unit worker

Aperta Adatta ai principianti
#4,249 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing

Direzione di ricerca

Leggi packages/ui-server/tests/turn-scope.test.ts:85-104 e confronta le impostazioni di timeout per i fixture pesanti presenti altrove in packages/ui-server/tests/. Modifica il budget del test o il numero di file, mantenendo le asserzioni sui cloni di riferimento, sui percorsi esterni e sugli elementi adiacenti a workspaces-old/. Esegui il test mirato sotto carico e conferma che termina entro il budget senza che si verifichi in seguito un errore di asserzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent-ready area: ui-server priority: p3 type: test

What happens

packages/ui-server/tests/turn-scope.test.ts "files_changed leaves out a reference clone under workspaces/ but counts every path outside it (#3793)" timed out at the 30 s per-test limit, [30000.20ms]. This was hosted candidate run 44207608156, job unit (8), for PR #4240, which touches only ui-react markdown rendering.

After the timeout, the test body was still running. Its final assertion then failed as an unhandled error between tests: BRAIN_PATHS_PAST_THE_CAP_STILL_PAUSE, with the expected count: 1001 in the diff.

Cause

The test (packages/ui-server/tests/turn-scope.test.ts:85-104) writes 1500 files under workspaces/argo/src and 1000 more in the brain, one writeFileSync at a time. Then it runs journal observations over them. That takes a few seconds on an idle machine. On the shared hosted unit worker, it ran next to the test-invocation rebuild cases, and the memory log shows the cgroup near its peak, so it ran past 30 s. Nothing in the test is wrong except its budget: the 30 s limit is a hang catch-all, not a timing claim.

Acceptance criteria

  • The test gives itself a budget that fits its file volume under load. Either pass an explicit timeout that scales with the work (as other heavy fixtures in packages/ui-server/tests/ do), or cut the file count to what the cap needs, for example by lowering max_files_changed.
  • Its assertions are unchanged: a reference clone under workspaces/ does not count, and a path outside it does, including a workspaces-old/ sibling.
  • The timed-out test no longer surfaces its last assertion as an unhandled error in a later test.
Lingua principale
TypeScript
Stelle
4
Fork
0
Merge medio
6h 5m
PR unite (30g)
730

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di schlessera/brain-kit

Tutte le issue di schlessera/brain-kit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.