fix(ops): make scheduler policy target-driven - #347
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review🚫 Merge blocked: 2 serious issue(s) found in high-risk files 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🟠 [HIGH] Logic in
|
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b38fb7ba66
ℹ️ 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".
| if not has_attempt_deadline and str(runtime_target.get("execution_mode") or "").strip() == "live": | ||
| attempt_deadline = DEFAULT_LIVE_RUN_ATTEMPT_DEADLINE |
There was a problem hiding this comment.
Derive live deadlines from dry_run_only too
For valid runtime targets that omit execution_mode, this branch never applies the 330s default even when dry_run_only is false. The pinned QuantPlatformKit resolve_runtime_target_from_env treats execution_mode as optional and derives live/paper from dry_run_only, so a live target JSON with dry_run_only: false but no execution_mode now produces no scheduler.attempt_deadline; the workflow then emits an empty deadline and skips --attempt-deadline for the live /run scheduler, reintroducing the scheduler deadline being shorter than the 300s Cloud Run timeout. Please normalize/derive the live mode from dry_run_only as well as the explicit string.
Useful? React with 👍 / 👎.
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eebac97373
ℹ️ 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".
| is_live = execution_mode == "live" or ( | ||
| not execution_mode and type(dry_run_only) is bool and not dry_run_only |
There was a problem hiding this comment.
Normalize live detection before defaulting deadlines
Fresh evidence: the pinned resolve_runtime_target_from_env accepts string booleans such as "false" for dry_run_only and compares execution_mode case-insensitively. For a valid live target that omits execution_mode but has "dry_run_only":"false" (or uses "LIVE"), this check treats the target as non-live, so the plan omits scheduler.attempt_deadline and the workflow skips --attempt-deadline for the /run scheduler even though the Cloud Run timeout is 300s.
Useful? React with 👍 / 👎.
|
PERMANENT_FREEZE: the current runtime-target contract has no single validated field that safely distinguishes live from paper for scheduler deadline defaults. |
Summary
execution_mode=liveat the existing 330s safe default while leaving paper targets unchanged unless configuredOpen-source boundary
0/1/N)Verification
80 passed312 passed, 5 skipped, 11 failed; failures are in untouched existing test areas and are outside this PR's scheduler/config scope