Skip to content

fix: retry startup and use Jiff for DST-safe scheduling - #46

Merged
ErikBjare merged 2 commits into
masterfrom
fix/startup-retry-and-dst
Oct 15, 2026
Merged

ErikBjare merged 2 commits into
masterfrom
fix/startup-retry-and-dst

Conversation

@0xbrayo

@0xbrayo 0xbrayo commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Daemon startup exits if ActivityWatch is not ready, and unwrapping local-time conversions can abort the process during DST transitions.

  • Retry daemon readiness requests up to five times with 1/2/4/8-second backoff. Read shared opt-in settings only after readiness succeeds; manual check-ins remain fail-fast.
  • Use Jiff for local scheduling and resolve each daily query boundary at 04:00 local, allowing 23/25-hour days. Use calendar arithmetic for yesterday and wall-clock arithmetic for new-day detection.
  • Schedule the next civil hour using Jiff’s default gap/fold resolution, rounding forward after half-hour gaps. During fall-back, the repeated hour gets one scheduled check-in. Scheduling errors are logged and retried without panicking.

Chrono remains at the ActivityWatch API boundary. Jiff replaces the custom DST searches and the chrono-tz test dependency.

Validation: workspace tests, Clippy with warnings denied, formatting, and the opt-in/startup/heartbeat integration suite. DST regressions cover spring-forward, fall-back, half-hour transitions, fractional-offset zones, and 04:00 boundaries across 23/24/25-hour days.

@0xbrayo

0xbrayo commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

🤖 Claude, on behalf of @0xbrayo

@greptile review

@0xbrayo 0xbrayo changed the title fix: tolerate server startup delays and DST transitions fix: retry daemon startup while ActivityWatch server becomes ready Oct 13, 2026
@0xbrayo
0xbrayo force-pushed the fix/startup-retry-and-dst branch from 0704bc0 to 1554548 Compare October 13, 2026 16:21
@0xbrayo 0xbrayo changed the title fix: retry daemon startup while ActivityWatch server becomes ready fix: retry startup and use Jiff for DST-safe scheduling Oct 13, 2026
@ErikBjare
ErikBjare merged commit 87e83cc into master Oct 15, 2026
5 checks passed
@ErikBjare

Copy link
Copy Markdown
Member

@TimeToBuildBob review

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