Stage 6 backend: canonical report identity and run metadata#3500
Draft
anth-volk wants to merge 15 commits into
Draft
Stage 6 backend: canonical report identity and run metadata#3500anth-volk wants to merge 15 commits into
anth-volk wants to merge 15 commits into
Conversation
b729a84 to
f89400d
Compare
f89400d to
11fcff3
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3500 +/- ##
==========================================
- Coverage 77.81% 77.46% -0.36%
==========================================
Files 65 66 +1
Lines 3877 4402 +525
Branches 697 807 +110
==========================================
+ Hits 3017 3410 +393
- Misses 683 772 +89
- Partials 177 220 +43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Fixes #3499
Summary
Rollout
60d38593ddc3, then upgrade to558935decda5.report_outputsrows can remain accessible during and after migration. New normal create traffic is still routed through canonical identity lookup and should reuse an existing report row plus create/reuse run records rather than minting new duplicate reports.legacy_report_output_id_mapand the report identity columns/index.Notes
Verification
FLASK_DEBUG=1 uv run pytest tests/unit/data/test_run_schema.py tests/unit/services/test_report_output_id_map_service.py tests/unit/test_stage5_routes.py::test_get_report_output_legacy_id_wrong_country_returns_not_found tests/unit/test_stage5_routes.py::test_patch_simulation_explicit_run_id_response_uses_that_runuv run ruff check alembic/versions/20260511_558935decda5_add_report_run_canonical_schema.py policyengine_api/data/alembic_metadata.py policyengine_api/services/report_output_id_map_service.py policyengine_api/services/simulation_service.py policyengine_api/routes/simulation_routes.py tests/unit/data/test_run_schema.py tests/unit/services/test_report_output_id_map_service.py tests/unit/test_stage5_routes.py