Skip to content

Generate simulation telemetry envelopes for Modal requests#3405

Merged
anth-volk merged 4 commits intomasterfrom
pr/simulation-telemetry-envelope
Apr 13, 2026
Merged

Generate simulation telemetry envelopes for Modal requests#3405
anth-volk merged 4 commits intomasterfrom
pr/simulation-telemetry-envelope

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

Fixes #3404

Summary

  • generate the internal _telemetry envelope alongside the existing _metadata payload for Modal simulation submissions
  • include run_id, process_id, geography classification, config hash, requested timestamp, and traceparent when available
  • propagate run_id through the Modal client response object and submission/error logs without regressing current bundle metadata behavior
  • add fixtures and unit coverage for the new telemetry envelope flow

Validation

  • uv run ruff check policyengine_api/libs/simulation_api_modal.py policyengine_api/services/economy_service.py tests/fixtures/libs/simulation_api_modal.py tests/fixtures/services/economy_service.py tests/unit/libs/test_simulation_api_modal.py tests/unit/services/test_economy_service.py
  • uv run pytest --noconftest tests/unit/libs/test_simulation_api_modal.py

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.06%. Comparing base (39d6550) to head (62a6096).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
policyengine_api/services/economy_service.py 77.41% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3405      +/-   ##
==========================================
+ Coverage   72.97%   73.06%   +0.09%     
==========================================
  Files          56       56              
  Lines        2598     2629      +31     
  Branches      460      463       +3     
==========================================
+ Hits         1896     1921      +25     
- Misses        617      622       +5     
- Partials       85       86       +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 marked this pull request as ready for review April 13, 2026 21:09
@anth-volk anth-volk merged commit 5d0f3a3 into master Apr 13, 2026
7 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.

Generate and propagate simulation telemetry envelopes for Modal simulation requests

1 participant