Skip to content

Cut API v1 simulations over to the Cloud Run entrypoint - #3784

Merged
anth-volk merged 1 commit into
masterfrom
agent/stage5-simulation-entrypoint-cutover
Jul 31, 2026
Merged

Cut API v1 simulations over to the Cloud Run entrypoint#3784
anth-volk merged 1 commit into
masterfrom
agent/stage5-simulation-entrypoint-cutover

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Fixes #3783

Summary

  • add the changelog fragment for the Stage 5 simulation-path cutover;
  • add an auditable historical record of the qualified path, release gates, and Git-based rollback; and
  • use this intentionally non-functional merge commit to trigger the normal API v1 staging-to-production workflow after the external environment selectors are verified.

Why

PR #3776 introduced the selectable Cloud Run Simulation Entrypoint while keeping API v1 on direct Modal. The canonical Cloud Run path has now passed health, readiness, authentication, comparison, one-year budget-window, unchanged-ID cross-polling, request-ID/log correlation, backend-identity, and paired runtime qualification. Stage 5 now needs a small, independently reviewed commit to trigger the actual release without coupling the cutover to another client refactor.

Impact

This PR does not change application code or the public API contract. Immediately before merge, both existing API v1 GitHub environment variables must be changed from old_gateway_direct to cloud_run_simulation_entrypoint. The already-qualified canonical URL remains environment-scoped configuration, and the direct Modal URL remains configured for rollback.

Merging then runs the existing release sequence: the complete staging calculation, economy, and budget-window suite must pass before production begins; production deploys automatically and assigns stable API v1 traffic to the exact tested revision.

Migration scope

  • Covered workflow: API v1 outbound simulation submission and polling.
  • Still on API v1/Flask: every public route and response contract; no native route ownership changes here.
  • Prepared boundary: the already-deployed Cloud Run Simulation Entrypoint remains an authenticated proxy to the existing Modal gateway and executor.
  • Not included: SQLAlchemy/Alembic, Supabase, durable job state, Modal compute, DNS, API v2 route migration, or percentage traffic ramping.
  • Intentional user-visible API changes: none.

Validation

  • make format (205 files left unchanged)
  • python scripts/export_migration_contracts.py (generated artifacts unchanged)
  • python scripts/run_quality_guards.py (migration-contracts: passed)
  • python -m pytest tests/unit/test_migration_contract_artifacts.py -q
  • .github/scripts/check_changelog_fragment.sh
  • git diff --check

Pre-merge gate

Keep this PR in draft until both GitHub environment selectors are set to cloud_run_simulation_entrypoint and read back immediately before merge. The URL secrets and direct-Modal rollback variable must also still exist.

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.84%. Comparing base (fe7f66e) to head (3fff2ef).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3784   +/-   ##
=======================================
  Coverage   80.84%   80.84%           
=======================================
  Files          75       75           
  Lines        4448     4448           
  Branches      825      825           
=======================================
  Hits         3596     3596           
  Misses        622      622           
  Partials      230      230           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anth-volk
anth-volk marked this pull request as ready for review July 31, 2026 20:32
@anth-volk
anth-volk merged commit 2284323 into master Jul 31, 2026
10 checks passed
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.

Cut API v1 simulations over to the Cloud Run entrypoint

1 participant