Skip to content

Add internal services for report output runs#3428

Merged
anth-volk merged 5 commits intomasterfrom
feat/report-output-run-stage-2
Apr 15, 2026
Merged

Add internal services for report output runs#3428
anth-volk merged 5 commits intomasterfrom
feat/report-output-run-stage-2

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

Fixes #3427

Summary

This PR implements stage 2 of the report-output run migration plan.

It adds internal services and tests for:

  • typed report specs
  • typed simulation specs
  • explicit legacy report alias resolution
  • report run creation and selection
  • simulation run creation and selection

What changes for consumers

Nothing yet.

This is an internal service-layer PR only. Routes, response shapes, and runtime behavior stay the same.

What does not change

  • no endpoint contract changes
  • no route integration yet
  • no backfill
  • no dual-write
  • no rerun behavior change

Safety

  • isolated internal service layer
  • no production behavior changes
  • focused unit coverage for every new service

Verification

FLASK_DEBUG=1 uv run pytest --confcutdir=tests/unit \
  tests/unit/services/test_report_spec_service.py \
  tests/unit/services/test_simulation_spec_service.py \
  tests/unit/services/test_report_output_alias_service.py \
  tests/unit/services/test_report_run_service.py \
  tests/unit/services/test_simulation_run_service.py

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 77.41117% with 89 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.56%. Comparing base (3bd5d4f) to head (5e15e2f).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/services/report_spec_service.py 68.83% 28 Missing and 20 partials ⚠️
policyengine_api/data/data.py 48.33% 27 Missing and 4 partials ⚠️
...licyengine_api/services/simulation_spec_service.py 88.37% 2 Missing and 3 partials ⚠️
...olicyengine_api/services/simulation_run_service.py 94.00% 2 Missing and 1 partial ⚠️
policyengine_api/services/report_run_service.py 96.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3428      +/-   ##
==========================================
+ Coverage   73.03%   73.56%   +0.53%     
==========================================
  Files          56       61       +5     
  Lines        2629     3015     +386     
  Branches      463      538      +75     
==========================================
+ Hits         1920     2218     +298     
- Misses        622      680      +58     
- Partials       87      117      +30     

☔ View full report in Codecov by Sentry.
📢 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 April 15, 2026 22:53
@anth-volk anth-volk merged commit c85ed87 into master Apr 15, 2026
7 checks passed
@anth-volk anth-volk deleted the feat/report-output-run-stage-2 branch April 15, 2026 22:54
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.

Add internal services for report-output runs

1 participant