elsa-core/test/unit/Elsa.Scheduling.UnitTests/Services
Sipke Schoorstra 2138f0997b
fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup (#8161)
* fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup

Reconcile stored scheduling bookmarks against the workflow-instance store
during CreateSchedulesStartupTask so missing and finished instances are
skipped and deleted instead of being re-scheduled on every rebuild.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(scheduling): add missing WorkflowStatus using in bookmark reconciler

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(scheduling): revalidate orphan bookmarks immediately before purge

Collect only bookmark IDs during paged rebuild, reload those rows, and
re-run classification so a candidate whose instance became Running is
not deleted. Still purge missing/blank/terminal bookmarks only.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(scheduling): schedule revived bookmarks and bound reconcile batches

Revalidation now schedules bookmarks whose instance became Running,
chunks reload/classify/delete by StartupSchedulePageSize, and skips
reconcile when IWorkflowInstanceStore or IBookmarkManager is absent.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-14 21:03:54 +02:00
..
CronosCronParserTests.cs Add extensive unit and component tests for scheduling activities (#7036) 2025-11-07 21:54:50 +01:00
DefaultTriggerSchedulerTests.cs address greptile review feedback (greploop iteration 1) 2026-06-21 19:43:09 +02:00
PastDueScheduleStaggererTests.cs address greptile review feedback (greploop iteration 1) 2026-06-21 19:43:09 +02:00
SchedulingBookmarkReconcilerTests.cs fix(scheduling): purge orphan Delay/Timer/Cron/StartAt bookmarks on startup (#8161) 2026-09-14 21:03:54 +02:00