Skip to content

Add Cloud Run runtime guard alerts#118

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

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

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

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 f57db4f 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: 202c18cb46

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

message_lines.append(f"Workflow: {run_url}")
message = "\n".join(message_lines)
print(message)
_send_telegram(message[:3900])

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 failed Telegram sends before exiting cleanly

When Telegram credentials are missing or the POST fails, _send_telegram() returns False, but this call ignores that result. In environments using the supported RUNTIME_GUARD_FAIL_WORKFLOW_ON_ALERT=false input/variable, the guard exits 0 even though no Telegram alert was delivered, so Cloud Run/Scheduler failures can be completely unreported except in the workflow log; please make send failures affect the exit status or otherwise surface them reliably.

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