Skip to content

fix(cron): reject interval schedules that overflow next_run - #105

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/high-severity-issues-cc27
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/high-severity-issues-cc27

Conversation

@cursor

@cursor cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

An interval whose seconds do not fit in now + seconds wrapped next_run into the past. cron_ack_delivery recomputes that sum from the stored schedule, so the job stayed due and the agent ran it on every poll.

interval_next_run now rejects ERANGE and any span that would overflow long long. A row that already has this schedule is pushed out by the existing one-year ack fallback instead of being re-armed in the past.

Validation: make test_cron (all tests passed), including test_interval_overflow_does_not_stay_due. src/tools/cron.c also builds with -Werror.

Open in Web聽View Automation聽

An interval whose seconds do not fit in now+sec wrapped next_run into
the past. Delivery ack recomputed the same sum, so the job stayed due
and the agent ran it on every poll.

Co-authored-by: esadrianno <esadrianno@gmail.com>

This branch has not been deployed

No deployments
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