Skip to content

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

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

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>
@adriannoes

Copy link
Copy Markdown
Collaborator

Superseded by #122: consolidated into the operator-authored branch fix/cron-schedule-and-sqlite (same fixes, re-validated with make test_cron, GATEWAY=1 make test_gateway_db_lock, CI=true make test, make static). Closing in favor of the consolidation.

@adriannoes adriannoes closed this Oct 16, 2026
@adriannoes
adriannoes deleted the cursor/high-severity-issues-cc27 branch October 16, 2026 03:08
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.

2 participants