Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Flaky test: tests/migrate/test_memory_import.py::test_routes sees the import still running on Windows CI

Aperta Adatta ai principianti
#422 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
76/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Leggi tests/migrate/test_memory_import.py, in particolare test_routes intorno alla riga 497, e controlla come interroga GET /api/import/memory/job dopo aver applicato l’importazione. Esegui il test e verifica che attenda in modo affidabile il completamento invece di fallire quando il processo in background impiega più tempo su Windows. Il risultato atteso è che il test passi senza doverlo rieseguire in modo intermittente.

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

Descrizione

area: memory bug flaky

tests/migrate/test_memory_import.py::test_routes failed once on Windows CI and passed on a re-run.

Where: branch feat/386-outcome-checks-2, run 38908685415 attempt 1, Engine tests (windows-latest): 1 failed, 2304 passed in 20:11.

What failed: line 497, assert now["id"] == job["id"] and now["status"] == "done" and now["facts"] == 3: the import job was still running.

Likely cause: after POST /api/import/chatgpt/apply the test polls GET /api/import/memory/job at most 200 times with time.sleep(0.02), about 4 seconds plus request time. The import runs in the background on the app's event loop and writes memories to SQLite; on a busy Windows runner with -n auto that took longer than the polling budget. Nothing was wrong with the result, only the wait.

Possible fix: poll against a deadline (e.g. 30 s) rather than a fixed number of 20 ms sleeps, or wait on the job's completion event.

Until fixed it is marked @pytest.mark.flaky(reruns=2), and CI's rerun summary lists it whenever it needs a rerun.

Lingua principale
Python
Stelle
710
Fork
125
Merge medio
8h 24m
PR unite (30g)
183

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 existence-master/Sentient

Tutte le issue di existence-master/Sentient

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.