Skip to content

Route API v1 through the certified PolicyEngine bundle#3708

Merged
anth-volk merged 4 commits into
masterfrom
codex/api-v1-bundle-routing-4183
Jun 29, 2026
Merged

Route API v1 through the certified PolicyEngine bundle#3708
anth-volk merged 4 commits into
masterfrom
codex/api-v1-bundle-routing-4183

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Fixes #3706

Summary

  • replace separate US/UK/core model pins with policyengine[models]==4.18.3
  • derive API v1 model versions from the installed .py bundle manifest
  • send policyengine_version to the simulation gateway while preserving legacy model_version compatibility
  • omit default dataset values so the simulation gateway resolves the certified bundle dataset
  • update deployment guards and automated bundle-update workflow for .py bundle routing

Testing

  • UV_CACHE_DIR=/private/tmp/uv-cache uv run ruff format --check .
  • UV_CACHE_DIR=/private/tmp/uv-cache uv run python scripts/run_quality_guards.py
  • UV_CACHE_DIR=/private/tmp/uv-cache POLICYENGINE_DB_PASSWORD=test FLASK_DEBUG=1 uv run pytest tests/unit/test_constants.py tests/unit/libs/test_simulation_api_modal.py tests/contract/test_simulation_gateway_contract.py tests/unit/services/test_economy_service.py tests/unit/test_cloud_run_deploy_scripts.py -q
  • .github/request-simulation-model-versions.sh -py 4.18.3 -us 1.729.0 -uk 2.89.2
  • LATEST_OVERRIDE=4.18.4 .github/scripts/update-policyengine-package.sh --dry-run

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.87%. Comparing base (84d1a0f) to head (0fc959c).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/constants.py 73.33% 5 Missing and 7 partials ⚠️
policyengine_api/services/economy_service.py 87.17% 2 Missing and 3 partials ⚠️
policyengine_api/libs/simulation_api_modal.py 81.25% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3708      +/-   ##
==========================================
- Coverage   78.98%   78.87%   -0.11%     
==========================================
  Files          72       71       -1     
  Lines        4269     4318      +49     
  Branches      790      804      +14     
==========================================
+ Hits         3372     3406      +34     
- Misses        693      698       +5     
- Partials      204      214      +10     

☔ 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 June 29, 2026 18:59
@anth-volk anth-volk merged commit 242ee4b into master Jun 29, 2026
9 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.

Route API v1 through the certified PolicyEngine bundle

1 participant