Skip to content

Fix runtime heartbeat review gaps - #282

Merged
Pigbibi merged 1 commit into
mainfrom
codex/runtime-hardening-schwab-review-20260730
Jul 30, 2026
Merged

Fix runtime heartbeat review gaps#282
Pigbibi merged 1 commit into
mainfrom
codex/runtime-hardening-schwab-review-20260730

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve per-target defaults and skip fully disabled target sets
  • resolve incomplete schedules from the deployed Cloud Scheduler five-field cron
  • add a configurable report publication grace and retain cron cutoffs when calendar lookup fails
  • require exact Scheduler job-name matching and exclude disabled services from guard success checks

Validation

  • python -m pytest -q (226 passed)
  • python -m ruff check --exclude external .
  • uv lock --check
  • actionlint .github/workflows/execution-report-heartbeat.yml .github/workflows/runtime-guard.yml

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 54ae202 into main Jul 30, 2026
1 check passed
@Pigbibi
Pigbibi deleted the codex/runtime-hardening-schwab-review-20260730 branch July 30, 2026 05:35

@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: 86b7f04a47

ℹ️ 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".

RUNTIME_HEARTBEAT_MARKET_TIMEZONE: ${{ vars.SCHWAB_MARKET_TIMEZONE }}
RUNTIME_HEARTBEAT_PUBLICATION_GRACE_MINUTES: ${{ vars.RUNTIME_HEARTBEAT_PUBLICATION_GRACE_MINUTES || '30' }}
RUNTIME_HEARTBEAT_SCHEDULER_AWARE: ${{ vars.RUNTIME_HEARTBEAT_SCHEDULER_AWARE || 'true' }}
RUNTIME_HEARTBEAT_SCHEDULER_LOCATION: ${{ vars.RUNTIME_HEARTBEAT_SCHEDULER_LOCATION || vars.CLOUD_RUN_REGION || 'us-central1' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use the configured Cloud Scheduler location

When CLOUD_SCHEDULER_LOCATION differs from CLOUD_RUN_REGION, the deployment workflow creates or updates jobs in the former, but this heartbeat passes only the latter as the scheduler-location fallback. Any target with a two-field schedule then looks for its deployed job in the wrong region, reports an unable to resolve effective five-field scheduler cron policy error, and fails every scheduled heartbeat. Include vars.CLOUD_SCHEDULER_LOCATION in this fallback, consistent with .github/workflows/sync-cloud-run-env.yml.

Useful? React with 👍 / 👎.

Comment on lines +312 to +319
enabled_value = _target_field(
item,
defaults,
"runtime_target_enabled",
"RUNTIME_TARGET_ENABLED",
)
if enabled_value is None:
enabled_value = item.get("RUNTIME_TARGET_ENABLED")
enabled_value = runtime_target.get("runtime_target_enabled")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Let nested target enablement override defaults

For configurations with defaults.runtime_target_enabled=false and a target opting in through its nested runtime_target.runtime_target_enabled=true, _target_field returns the default before the nested value is consulted. Consequently this function reports that no targets are enabled, main() silently skips the heartbeat, and the analogous precedence in cloud_run_runtime_guard.py also excludes the service. Treat the per-target nested runtime value as an override of defaults, just as top-level per-target fields are.

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