Skip to content

[Fix] Disabled automations no longer launch from stale scheduler scans - #2187

Open
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/disabled-automation-launch-claim
Open

[Fix] Disabled automations no longer launch from stale scheduler scans#2187
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/disabled-automation-launch-claim

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. View the task or mention @roomote-roomote for follow-up asks.

What changed

The scheduler's atomic launch claim now requires the persisted automation to still be enabled. A stale scheduler snapshot can no longer claim and launch an automation after a user disables it.

Database-backed regression coverage captures an enabled automation, disables it, and verifies the stale launch claim is rejected. Existing coverage continues to verify that enabled automations can be claimed.

Why this change was made

The scheduler lists enabled automations before processing them individually. Previously, the later atomic claim checked only launch fencing and lastRunAt, so a disable committed between the list and claim could still permit one unwanted run.

Impact

Disabling an automation now prevents pending scheduler snapshots from launching it. The targeted database suite passes all 9 tests, and the database package type-check, lint, and formatting checks pass.

Related PRs

@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review September 4, 2026 05:22
@roomote-community

roomote-community Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed 6c0f55b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant