mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 01:29:51 +08:00
* fix: log singleton reset failures instead of swallowing them _reset_runtime_singletons() (deeptutor_cli/init_cmd.py and deeptutor/runtime/launcher.py) swallowed every exception while dropping cached PathService/RuntimeSettings/ModelCatalog singletons. A failed PathService reset leaves the previous home's cached paths in place, so deeptutor init --home / launcher start silently keep writing into the old workspace. Log PathService failures at ERROR and cache-clear failures at WARNING so the misdirection is observable. * fix(launcher): log handoff failure when mark_failed fails too _handoff_pending_update wrapped the fallback store.mark_failed in a bare 'except Exception: pass'. When the handoff itself failed and recording the failure failed again (corrupt state, IO error), the launcher shut down with no persistent trace of either error. Keep the minimal fix: emit a fallback log naming the update job, the handoff error and the recording error before returning False. * fix(update): log and skip recovery when job state is unreadable The update worker's recovery path wrapped store.load() in a bare except-pass: with a corrupt state.json the failed-update bookkeeping and the app restore were skipped silently, leaving the job stuck and no trace in worker.log. Load failures now append a durable record (load error plus the original failure) to the store log and skip the round without touching the damaged state. * test(codebuddy): make credential fixture expiry relative to now test_load_credentials_parses_session wrote a hard-coded expiresAt of 1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is False. Once that instant passed the assertion flipped, so the test now fails on every Python version for every branch. Derive expiresAt / refreshExpiresAt from time.time() so the fixture always describes a live session, and assert against the value written. --------- Co-authored-by: XZH <cto@xzh.ai>