Skip to content

[codex] reconcile cloud runtime drift#305

Merged
Pigbibi merged 1 commit into
mainfrom
codex/cloud-runtime-reconcile-20260707
Jul 6, 2026
Merged

[codex] reconcile cloud runtime drift#305
Pigbibi merged 1 commit into
mainfrom
codex/cloud-runtime-reconcile-20260707

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Cloud Run traffic reconciler for multi-service IBKR targets
  • move legacy scheduler cleanup into an explicit whitelist-based script
  • cover latest-ready revision, commit label, and IBKR backup job cleanup

Validation

  • python3 -m unittest tests/test_reconcile_cloud_runtime.py -v
  • bash tests/test_sync_cloud_run_env_workflow.sh
  • python3 YAML parse for .github/workflows/sync-cloud-run-env.yml
  • git diff --check

Co-Authored-By: Codex <noreply@openai.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pigbibi Pigbibi merged commit 415a44d into main Jul 6, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/cloud-runtime-reconcile-20260707 branch July 6, 2026 22:47

@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: f121122eff

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

Comment on lines +116 to +120
raw_services = str(env.get("CLOUD_RUN_SERVICES") or env.get("CLOUD_RUN_SERVICE") or "").strip()
for chunk in raw_services.replace(";", ",").replace("\n", ",").split(","):
service_name = chunk.strip()
if service_name:
targets.append(RuntimeTarget(service_name=service_name))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not reconcile services outside the resolved sync plan

When both SYNC_PLAN_JSON and a legacy CLOUD_RUN_SERVICE/CLOUD_RUN_SERVICES value are set, this falls through and appends the legacy services even though the workflow has already resolved the authoritative plan. In .github/workflows/sync-cloud-run-env.yml the new reconciler is invoked with SYNC_PLAN_JSON while those job-level legacy env vars are still present, so a stale fallback service that is not in the plan can still have traffic moved by --ensure-latest-traffic and its legacy scheduler jobs deleted.

Useful? React with 👍 / 👎.

Comment on lines +966 to +970
python3 scripts/reconcile_cloud_runtime.py \
--platform=ibkr \
--project="${GCP_PROJECT_ID}" \
--region="${CLOUD_RUN_REGION}" \
--ensure-latest-traffic

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 Verify plugin mounts before shifting traffic

When a service's traffic is pinned to an older revision—the drift this step is meant to repair—this command moves 100% traffic to the latest revision before the immediately following Verify strategy plugin mounts step has checked that the synced IBKR_STRATEGY_PLUGIN_MOUNTS_JSON is present, valid, and allowed. If that verification then fails, the workflow stops only after the potentially bad latest revision has already been made live, so the traffic reconciliation should run after the verifier succeeds.

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