Skip to content

Fix workflow AI gating logic and add retries to Cerebrium preflight#69

Merged
Rohan5commit merged 1 commit into
mainfrom
codex/handoff-prompt-for-next-agent-to-continue-work-f06pin
May 23, 2026
Merged

Fix workflow AI gating logic and add retries to Cerebrium preflight#69
Rohan5commit merged 1 commit into
mainfrom
codex/handoff-prompt-for-next-agent-to-continue-work-f06pin

Conversation

@Rohan5commit
Copy link
Copy Markdown
Owner

Motivation

  • Correct inconsistent if conditionals in the daily trading GitHub Actions workflow so AI steps are executed or skipped reliably when running via workflow_dispatch and when inputs.disable_ai_trading is set.
  • Make the Cerebrium preflight/predict check in run_ai_daily_cerebrium.py more resilient to transient network/server errors by adding retry/backoff and better diagnostic details.

Description

  • Updated multiple if: expressions in .github/workflows/daily_trading_bot.yml to use ((github.event_name != 'workflow_dispatch') || !inputs.disable_ai_trading) instead of the previous conjunction pattern to ensure the intended short-circuit logic for workflow_dispatch runs and the disable_ai_trading input.
  • Normalized AI-path gating across steps such as Install Lightning dependencies, Plan AI runtime, Validate Cerebrium primary configuration, Enforce AI routing invariants, Emit AI runtime decision, Warm Cerebrium inference, Verify Cerebrium predict, AI run and retry steps, Lightning studio launch/run, distilled fallbacks, and AI failure reporting by applying the updated conditional.
  • Enhanced _preflight_predict in run_ai_daily_cerebrium.py by adding import time, implementing up to 3 attempts, handling transient HTTP statuses (429, 500, 502, 503, 504), sleeping with simple backoff between attempts, and returning aggregated attempt details for diagnostics.

Testing

  • No automated tests were added or executed as part of this change.

Codex Task

@Rohan5commit Rohan5commit merged commit f269080 into main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant