Add robust AI runtime validation, retries and email coverage; harden model client and ingest logic#43
Merged
Rohan5commit merged 2 commits intoMay 19, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
.github/workflows/daily_trading_bot.yml) enhancements include a newdisable_core_tradinginput, added core and AI retry steps, explicit Cerebrium configuration validation, predict preflight (Verify Cerebrium predict endpoint), expanded runtime planning to considerTRAINED_MODEL_INFERENCE_URL, new retry/backoff envs, distilled fallback/emergency retry paths, better fallback routing logic, and a newEnsure Daily Email Coverageguard to emit failure emails if expected reports were not produced.trained_model_client.pychanges add support for provider name variants, include extra candidate envs for inference URLs and API keys, try alternate prediction URL shapes on 404s, handle transient HTTP errors with backoff, and tolerate missing/healthby treating certain 404s as a skipped health probe.llm_trader.pyupdates implement neutral-breakout logic that can convert neutral predictions into directional soft-cash deployments when enabled and when there are no open positions, and track related counters to report behavior.ingest_prices.pynow parses Stooq CSV responses withon_bad_lines="skip", validates required columns and logs per-attempt warnings instead of failing the whole lookup, and continues trying alternative ticker shapes.positions.py,main.py, andemail_notifier.pyinclude aget_performance_period_startaccessor, attachingperformance_period_startto Core and AI reports, suppressing AI rotation closes when the manager explicitly skipped actions, simplifying manager-provided reasons in emails, and enriching AI runtime metadata in email bodies.Testing
Codex Task