Skip to content

Add API TRACE artifact builders#3509

Draft
MaxGhenis wants to merge 1 commit intomigrate-to-policyengine-v4from
trace-api-tro-builder
Draft

Add API TRACE artifact builders#3509
MaxGhenis wants to merge 1 commit intomigrate-to-policyengine-v4from
trace-api-tro-builder

Conversation

@MaxGhenis
Copy link
Copy Markdown
Collaborator

Summary

  • add a TRACE artifact builder for policyengine-api simulation runs
  • bind bundle, results, reform, input, request, runtime payloads, and runtime environment when policyengine.py supports the richer simulation TRO signature
  • fail closed on older policyengine.py releases instead of emitting incomplete institution-backed TROs

Stack

Tests

  • FLASK_DEBUG=1 uv run pytest tests/unit/libs/test_trace_artifacts.py -q
  • FLASK_DEBUG=1 uv run ruff format --check policyengine_api/libs/trace_artifacts.py tests/unit/libs/test_trace_artifacts.py
  • FLASK_DEBUG=1 uv run ruff check policyengine_api/libs/trace_artifacts.py tests/unit/libs/test_trace_artifacts.py

@MaxGhenis MaxGhenis force-pushed the trace-api-tro-builder branch 2 times, most recently from 15feec0 to ed390d3 Compare April 26, 2026 11:28
@MaxGhenis MaxGhenis force-pushed the trace-api-tro-builder branch from ed390d3 to 6a9aff1 Compare April 26, 2026 11:39
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

❌ Patch coverage is 79.54545% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.62%. Comparing base (4679fed) to head (6a9aff1).

Files with missing lines Patch % Lines
policyengine_api/libs/trace_artifacts.py 79.54% 7 Missing and 11 partials ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           migrate-to-policyengine-v4    #3509      +/-   ##
==============================================================
+ Coverage                       77.57%   77.62%   +0.04%     
==============================================================
  Files                              65       66       +1     
  Lines                            3581     3669      +88     
  Branches                          642      662      +20     
==============================================================
+ Hits                             2778     2848      +70     
- Misses                            621      628       +7     
- Partials                          182      193      +11     

☔ 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.

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.

1 participant