Skip to content

Make IBKR heartbeat scheduler aware#145

Merged
Pigbibi merged 1 commit into
mainfrom
codex/scheduler-aware-ibkr-heartbeat
Jun 6, 2026
Merged

Make IBKR heartbeat scheduler aware#145
Pigbibi merged 1 commit into
mainfrom
codex/scheduler-aware-ibkr-heartbeat

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make Execution Report Heartbeat derive required services from Cloud Scheduler due times when no explicit override is set
  • ignore probe/precheck scheduler jobs and only treat root strategy-run schedulers as report-producing
  • keep RUNTIME_HEARTBEAT_REQUIRED_SERVICES as a manual override
  • add tests for daily-vs-monthly scheduler filtering

Root cause

The previous fix required a manually curated heartbeat service list. That works, but it drifts from Cloud Scheduler. The smarter behavior should require a report only for services whose main scheduler was expected to run inside the heartbeat lookback window.

Validation

  • timeout 120 python -m ruff check scripts/execution_report_heartbeat.py tests/test_execution_report_heartbeat.py
  • timeout 120 pytest -q tests/test_execution_report_heartbeat.py
  • git diff --check
  • real Scheduler dry check returned only u1599/u1660 for the current 36h window

@Pigbibi Pigbibi merged commit c754272 into main Jun 6, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/scheduler-aware-ibkr-heartbeat branch June 6, 2026 02:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6df0840622

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


now = dt.datetime.now(dt.timezone.utc)
since = now - dt.timedelta(hours=lookback_hours)
required_services = _load_required_services(project=project, since=since, now=now)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle empty due service sets as success

When scheduler-aware filtering determines that none of the configured services has a main scheduler due in the lookback window (for example a repo with only monthly schedulers on an ordinary weekday, or a skipped holiday window), this assignment leaves required_services as an empty list. The rest of main() then treats that the same as “no service filter configured” and still scans for any acceptable recent report, so it can emit a missing-report alert even though no scheduler was expected to produce one. Preserve the distinction between “no services configured” and “configured services, but none due” and short-circuit the latter as OK.

Useful? React with 👍 / 👎.

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