Skip to content

fix(schedule): bound interval conversion and next firing - #461

Draft
bloodf wants to merge 6 commits into
mainfrom
recovery/beans-schedule-overflow-20261105
Draft

bloodf wants to merge 6 commits into
mainfrom
recovery/beans-schedule-overflow-20261105

Conversation

@bloodf

@bloodf bloodf commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Intervals such as every 9223372036854775807d can overflow conversion to seconds, and a valid interval added to a timestamp near i64::MAX can overflow its next firing. Use checked multiplication to reject oversized input and checked addition to return no next firing when the timestamp is unrepresentable. Keep the five-minute minimum, 366-day maximum and current scheduling authority unchanged.

Recovers isolated arithmetic from the legacy schedule work (fe0b79bf1c306271519237d29f73df5f2a81d064 and 3afacb5b). The follow-up extends this existing draft rather than creating a duplicate routine PR. Original source remains preserved; timezone, missed-run policy and roster pending-intent changes are excluded because they need composition with the task-store authority.

Validation at df9b8fde1e84cbd221580d01ab4cfb2d8905e2cd: all six schedule tests passed using default CLI features; docs budgets/links and whitespace passed. Tests cover maximum i64 minute/hour/day inputs, an input that would wrap to one day in release arithmetic, accepted 366-day/rejected 367-day boundaries, and next-firing timestamp limits. A negative control on main with the two new regressions failed on multiplication and addition overflow; both pass with the recovered fixes. Changed source and docs were reviewed and a credential-pattern scan found no matches.

Hosted CI passed for the previous head 21b634873199374c9150a5054aee5429a61febe7; results for this updated head are pending and must be checked separately. Commits were created through the GitHub API and are unsigned. Draft only; no merge or deployment.

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
beans Ready Ready Preview Nov 7, 2026 9:56pm UTC

Request Review

@bloodf bloodf changed the title Reject routine interval overflow before converting to seconds fix(schedule): bound interval conversion and next firing Nov 6, 2026

This branch was successfully deployed

1 active deployment
Preview — d0966ef9 Deployed Nov 7, 2026 by vercel[bot]
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