Skip to content

Record scheduled automation runs atomically#325294

Merged
ulugbekna merged 3 commits into
mainfrom
ulugbekna/scheduler-catch-up-audit
Jul 10, 2026
Merged

Record scheduled automation runs atomically#325294
ulugbekna merged 3 commits into
mainfrom
ulugbekna/scheduler-catch-up-audit

Conversation

@ulugbekna

@ulugbekna ulugbekna commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • create the pending run row and advance Last run/Next run in one ledger commit
  • avoid reporting that an overdue automation ran before the runner actually claimed it
  • retain normal startup catch-up and delayed scheduled-tick behavior

Fixes #325277

Validation

  • npm run typecheck-client
  • npm run gulp compile-client
  • focused AutomationScheduler, AutomationService, and AutomationRunner tests (49 passing)
  • npm run valid-layers-check
  • hygiene and pre-commit checks

merging; can revert if we don't like the fix

cc @benvillalobos

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 10, 2026 12:58
@ulugbekna ulugbekna enabled auto-merge (squash) July 10, 2026 12:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves schedule advancement into run claiming so run records and schedule metadata commit atomically.

Changes:

  • Advances scheduled/catch-up timestamps during recordRunStart.
  • Removes scheduler-side preemptive advancement.
  • Adds regression coverage for claim and delayed-tick behavior.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/automations/automationService.ts Updates the service contract.
src/vs/sessions/contrib/automations/browser/automationService.ts Atomically records claims and advances schedules.
src/vs/sessions/contrib/automations/browser/automationScheduler.ts Removes pre-dispatch advancement.
src/vs/sessions/contrib/automations/test/browser/automationService.test.ts Tests schedule advancement during claims.
src/vs/sessions/contrib/automations/test/browser/automationScheduler.test.ts Tests claim-dependent reporting and scheduling.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Medium

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
sandy081
sandy081 previously approved these changes Jul 10, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ulugbekna ulugbekna merged commit d96ffdd into main Jul 10, 2026
80 of 83 checks passed
@ulugbekna ulugbekna deleted the ulugbekna/scheduler-catch-up-audit branch July 10, 2026 18:22
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 10, 2026
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.

Scheduled automation seems it ran but not sure if true AND can't open the session

4 participants