molecule-core/workspace-server/internal/scheduler
molecule-ai[bot] 09b5a444d3 fix(scheduler): use context.Background() in panic-recovery defer UPDATE (F1089) (#1211)
F1089: PR #1032's panic-recovery defers used the outer `ctx` passed into
fireSchedule/tick. If that ctx was cancelled during the panic window
(HTTP timeout, graceful shutdown), ExecContext returned early and the
next_run_at UPDATE was silently skipped — leaving the schedule stuck.

Fix: both panic defers now call ExecContext(context.Background()) so the
recovery UPDATE is independent of the outer ctx's lifecycle.

Refs: #1201 (F1089, security audit 2026-04-21)

Co-authored-by: Molecule AI CP-BE <cp-be@agents.moleculesai.app>
2026-04-21 02:08:00 +00:00
..
scheduler_test.go test: trigger CI with file change 2026-04-21 00:48:52 +00:00
scheduler.go fix(scheduler): use context.Background() in panic-recovery defer UPDATE (F1089) (#1211) 2026-04-21 02:08:00 +00:00