Skip to content

fix(scheduler): skip runs missed while unlicensed, log license expiry once - #209

Merged
caioricciuti merged 1 commit into
mainfrom
fix/pro-gating-followups
Oct 1, 2026
Merged

caioricciuti merged 1 commit into
mainfrom
fix/pro-gating-followups

Conversation

@caioricciuti

Copy link
Copy Markdown
Owner

Pro-gating follow-ups from WORK_LOG §0.1 item 4.

  1. Missed slots are skipped on resume. While no Pro license allows it, the scheduler ticks do nothing. Before, the first tick after a license was activated ran every overdue schedule once. Now that tick moves each overdue schedule to its next slot without running it (SetScheduleNextRun, logged as "Skipped schedule run missed while paused"). A schedule a person disabled and re-enabled already recomputed its next run, so that path is unchanged.
  2. Editing or creating a schedule no longer rewrites its last run. Both used UpdateScheduleStatus, which set last_run_at to now and cleared last_status and last_error. They now move only next_run_at.
  3. License expiry is logged once per state. Workers validate the license every tick, so an expired license wrote a warning on every call. Now it logs once when a license enters grace and once when it is fully expired.

Docs: schedules and license pages say missed runs are skipped.

Checked

make vet test passes, including the updated TestTickFollowsLicense (resume tick: 0 runs, next_run_at in the future, last_run_at unset) and a new TestLogExpiryOnce. Site builds. No schema or dependency change.

@caioricciuti
caioricciuti merged commit f2c926a into main Oct 1, 2026
3 of 6 checks passed
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