fix: retry failed analyses (no silent drops) + bump Bun to 1.4.2 #2
Loading…
Reference in a new issue
No description provided.
Delete branch "bugfix/retry-failed-analyses"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A file whose analysis FAILED (LLM timeout, download error, …) was marked processed with NO record row and was never re-analyzed — the 2026-09-23 WhatsApp appointment screenshot was dropped this way (26 files total, root cause: transient LLM TimeoutError).
What this does
processed_files(NULL=done,a:<n>=retry-pending,ae:<n>=exhausted): a failed file is NOT marked done and is re-analyzed on every poll tick until it succeeds orFILE_RETRY_MAX_ATTEMPTS(default 3) is used up.rec_<id>, statuserror, "analysis failed (attempt n): …") — new Errors filter in the dashboard.onedrive-poll: marker-driven, re-fetches each file's current Graph state by id (delta never re-delivers unchanged items); 404 → done + row retired.POST /records/repending, re-arms the marker; double-clicks don't consume budget) and "Give up" (POST /records/giveup).kv): processed-but-rowless analyzable files are re-queued — this recovers the 26 silently dropped files, including the WhatsApp screenshot, on deploy..mise.toml): the 2026-09-23 container segfaults were on musl/alpine; 1.4.2 fixes a rare JIT crash and a GC crash on musl.bun test --parallelin the test script (per-file worker isolation; the process-globalmock.moduleleaked across files).Tests
test/file-retry.test.ts(10 new): marker state machine, repending/giveup, auto-reject sweep skip, backfill, fail → retry-fail → retry-success and exhaustion end-to-end.tsc --noEmitclean.Spec updated:
specs/appointment_detection.md("Failed-analysis retry (no silent drops)").