Skip to content

Correct DST-aware app schedule evaluation - #339

Merged
hamzamerzic merged 3 commits into
mobius-os:mainfrom
hamzamerzic:fix/pr314-dst-scheduler-correction-20260728
Jul 28, 2026
Merged

Correct DST-aware app schedule evaluation#339
hamzamerzic merged 3 commits into
mobius-os:mainfrom
hamzamerzic:fix/pr314-dst-scheduler-correction-20260728

Conversation

@hamzamerzic

@hamzamerzic hamzamerzic commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • resolve each IANA schedule in its own timezone before deciding whether it is due
  • compute the following run from the local wall-clock target, including DST transitions
  • keep legacy fixed-offset schedules working while avoiding stale-offset arithmetic
  • cover spring-forward, fall-back, invalid timezone, and compatibility cases

Context

This is the reviewed correction discussed on #314. That PR establishes the right durable IANA identity but still evaluates future runs through the offset captured at the last execution, which is wrong across daylight-saving transitions. This branch keeps its data model and replaces only the schedule arithmetic that must be timezone-aware.

Testing

  • pytest -q backend/tests/test_cron_jobs.py backend/tests/test_cron_scheduler.py
  • full corrected diff review against current main

Related: #314

Integration verification

  • refreshed onto the merged app-job authority contract (Make app-job authority explicit #311)
  • retained both scheduler and authority regression suites in the only overlapping test file
  • 240 targeted scheduler, job, install, and app-route tests passed (3 skipped)

miljanm and others added 2 commits July 28, 2026 11:16
Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
The scheduler now owns gap/fold policy and commits durable declarations before live cron updates.

Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com>
@hamzamerzic hamzamerzic added bug Something isn't working area: backend Server and API behavior labels Jul 28, 2026
@hamzamerzic
hamzamerzic added this pull request to the merge queue Jul 28, 2026
Merged via the queue into mobius-os:main with commit 5c5e4fa Jul 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Server and API behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants