Skip to content

Expose report run timestamps#3546

Merged
anth-volk merged 14 commits intomasterfrom
codex/report-run-timestamps
May 5, 2026
Merged

Expose report run timestamps#3546
anth-volk merged 14 commits intomasterfrom
codex/report-run-timestamps

Conversation

@MaxGhenis
Copy link
Copy Markdown
Collaborator

@MaxGhenis MaxGhenis commented May 5, 2026

Summary

  • Stamp report output runs with requested_at on creation.
  • Stamp started_at and finished_at when a report run reaches a terminal status.
  • Surface the selected display run timestamps on report output responses.

Root cause

The report_output_runs schema had timestamp columns, but report run creation and synchronization left them null and report responses did not expose selected run timestamps. The frontend therefore had no reliable backend run time to display.

Validation

  • FLASK_DEBUG=1 PYTHONPATH=/Users/maxghenis/PolicyEngine/policyengine-api-report-run-timestamps uv run --extra dev pytest tests/unit/services/test_report_output_service.py tests/unit/services/test_report_run_service.py -q
  • FLASK_DEBUG=1 uv run --extra dev ruff check policyengine_api/services/report_output_service.py policyengine_api/services/report_run_service.py tests/unit/services/test_report_output_service.py tests/unit/services/test_report_run_service.py
  • FLASK_DEBUG=1 uv run --extra dev ruff format --check policyengine_api/services/report_output_service.py policyengine_api/services/report_run_service.py tests/unit/services/test_report_output_service.py tests/unit/services/test_report_run_service.py

Deployment note

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 84.82759% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.81%. Comparing base (5f71127) to head (1fd9618).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/services/report_output_service.py 86.40% 8 Missing and 6 partials ⚠️
policyengine_api/endpoints/household.py 42.85% 4 Missing ⚠️
policyengine_api/routes/report_output_routes.py 33.33% 1 Missing and 1 partial ⚠️
policyengine_api/services/run_sync_utils.py 90.47% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3546      +/-   ##
==========================================
- Coverage   78.94%   77.81%   -1.13%     
==========================================
  Files          65       65              
  Lines        3762     3877     +115     
  Branches      662      697      +35     
==========================================
+ Hits         2970     3017      +47     
- Misses        614      683      +69     
+ Partials      178      177       -1     

☔ 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 force-pushed the codex/report-run-timestamps branch from 9e29d34 to 4bd5911 Compare May 5, 2026 21:44
@anth-volk anth-volk marked this pull request as ready for review May 5, 2026 21:57
@anth-volk anth-volk merged commit 799ce7c into master May 5, 2026
6 of 7 checks passed
@anth-volk anth-volk deleted the codex/report-run-timestamps branch May 5, 2026 22:10
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.

2 participants