wulf-pulse/lib
lorentz 378e68ad8a fix(analyzer): reset stale in-flight jobs on worker boot
A container restart leaves analyzer_jobs rows stuck in
fetching/triaging/itglue/analyzing/deep_review forever — the worker's
claimQueuedJob only picks up status='queued', so a job mid-pipeline
when the process died gets orphaned.

resetStaleJobsToQueued() reverts any active-state row whose started_at
is older than 10 min back to 'queued' with started_at=NULL. The worker
calls it once on start() before scheduling the first poll. 10 min is
3x the realistic pipeline ceiling — well past Sonnet+Opus combined.

Logs the count when nonzero so restarts that recover work are visible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:56:00 -04:00
..
hooks Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
services fix(analyzer): reset stale in-flight jobs on worker boot 2026-04-29 14:56:00 -04:00
types feat(analyzer): Phase 2 — full stage persistence, fingerprints, aggregate reports, cost guards 2026-04-29 14:00:22 -04:00
utils feat: AI ticket analyzer (phases 1-6) 2026-04-29 10:59:40 -04:00
auth-client.ts feat: add authentication, user management, and admin features 2026-01-31 12:43:14 -05:00
auth-utils.ts feat: add authentication, user management, and admin features 2026-01-31 12:43:14 -05:00
auth.ts feat: add Autotask tags sync (tag groups, tags, ticket tag associations) 2026-03-20 09:22:40 -04:00
bootstrap.ts feat: add authentication, user management, and admin features 2026-01-31 12:43:14 -05:00
permissions.ts feat: add authentication, user management, and admin features 2026-01-31 12:43:14 -05:00
utils.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00