Add engine-neutral execution receipts to API v1#3750
Open
MaxGhenis wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3750 +/- ##
==========================================
- Coverage 79.92% 79.12% -0.80%
==========================================
Files 70 71 +1
Lines 4338 4815 +477
Branches 808 937 +129
==========================================
+ Hits 3467 3810 +343
- Misses 652 709 +57
- Partials 219 296 +77 ☔ View full report in Codecov by Harness. 🚀 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.
Summary
POST /{country}/calculateandGET /{country}/household/{household_id}/policy/{policy_id}while preserving the existing top-level result shapeCompatibility and failure behavior
Execution provenance is additive and fail-open. A completed household or economy result still returns when receipt construction or verification fails, and legacy cached results are never assigned fabricated provenance. The cache envelope uses the existing JSON column, so this change does not require a database migration.
Optional migration-contract fields protect the receipt shape when it is present without making provenance mandatory for workers or historical rows that cannot prove their execution identity.
Axiom and Populace migration
The receipt contract separates requested aliases from resolved engine, model, ruleset, and population artifacts. Economy enrichment preserves valid Axiom-native receipts and removes contradictory PolicyEngine metadata. Population provenance is emitted only for a concrete URI plus data version/build identity, providing a truthful handoff point for Populace-backed workers rather than treating a dataset selector as an artifact identity.
Validation
git diff --check