Skip to content

Add Cloud Run runtime guard alerts#59

Merged
Pigbibi merged 1 commit into
mainfrom
codex/runtime-guard
Jun 2, 2026
Merged

Add Cloud Run runtime guard alerts#59
Pigbibi merged 1 commit into
mainfrom
codex/runtime-guard

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Runtime Guard workflow that checks Cloud Scheduler and Cloud Run logs without invoking trading routes
  • send Telegram alerts directly for Cloud Scheduler, Cloud Run, or optional missed-run heartbeat issues
  • document setup and heartbeat behavior in English and Chinese

Validation

  • python -m py_compile scripts/cloud_run_runtime_guard.py
  • local dry run with scheduler check disabled
  • real read-only Cloud Logging smoke with Telegram disabled
  • git diff --check

@Pigbibi Pigbibi merged commit 8927190 into main Jun 2, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/runtime-guard branch June 2, 2026 10:15

@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: 344e3ebc08

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

issues.append(f"{len(failures)} Cloud Run failure log(s) for {service}")
details.extend(_summarize(entry) for entry in failures[:5])

if services and require_success and success_count == 0:

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 Check heartbeat success per service

When RUNTIME_GUARD_REQUIRE_SUCCESS=true and RUNTIME_GUARD_CLOUD_RUN_SERVICES lists more than one service, this global success_count lets any one service's 2xx/3xx request suppress the missed-run alert for all the others. In that configuration, a scheduler failure or missed invocation for service B is not reported if service A had a recent successful request, so the heartbeat guard can miss exactly the per-service outage it is meant to catch.

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