Preserve canonical SPM settings and receipts across API calculations - #3827
Draft
MaxGhenis wants to merge 22 commits into
Draft
Preserve canonical SPM settings and receipts across API calculations#3827MaxGhenis wants to merge 22 commits into
MaxGhenis wants to merge 22 commits into
Conversation
…-migration Implement Stage 11 API v2 household migration
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3827 +/- ##
===========================================
+ Coverage 46.26% 87.83% +41.56%
===========================================
Files 135 179 +44
Lines 7963 10765 +2802
Branches 1326 1901 +575
===========================================
+ Hits 3684 9455 +5771
+ Misses 3990 781 -3209
- Partials 289 529 +240 ☔ 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.
Canonical SPM calculations need reproducible measurement inputs and saved results. This adds typed SPM settings and receipts to household calculations, saved simulations, annual economy and budget-window requests. Selections enter household identity and cache keys; typed worker failures persist their original terminal code/message across polling and service recreation. Strict numeric household aliases preserve historical simulation/report spelling and output.
This branch integrates actual upstream
ea4ca114fb959e5951e3fa28375790e9f3085b05(the API3.54.0 release of Stage11 household migration) with canonical sourced1d3518dea8b69ff62997f0ea29c0a09cf97e70athrough a merge commit. It preserves Stage 11's immutable households and removal of household PUT, durable create events, migration selectors, and safe persistence failures. Changed inputs, labels or selections require a replacement household. Saved US SPM selections survive MySQL event translation into v2household_data.spmand participate in its canonical content hash without resolving current bundle defaults. Historical documents without SPM retain their shape and identity.Compute stays on Flask/API v1; native v2 household storage and read schemas accept the optional US selection. Query contracts and cutover flags are unchanged. There is no new DDL: the upstream MySQL
7811e0c49301and PostgreSQL724b1b11a33eheads remain intact. Stage 11 supersedes PR3826's policy persisted-JSON repair; its missing float/retry regressions and real MySQL CI setup are retained. Protective image changes in PR3824 remain independent. Client/OpenAPI documentation links to the worker handoff in PR677.Current-source validation: 575 SPM tests passed with 37 dependency-gated skips; all 37 passed in a separate authenticated installed scientific-source run (166 passed, zero skips). Stage 11 tests passed 417 cases, policy/migration tests 225, and contracts/OpenAPI 74. These groups overlap. All tested runtime/test bytes match current head
83ec1710b540f55849deee865ad6a64dc605023b; the later merge only incorporates upstream release metadata and a real-generated root lock refresh. All non-root resolved dependency versions are preserved. Formatting, changed-Python lint, configured mypy (83 files), migration guards and export (13 workflows / 50 requests) pass.Fresh real MySQL8.4/PostgreSQL17 qualification passed 186 executions with zero failures or skips: 93 cases under each of utf8mb4_0900_ai_ci and utf8mb4_unicode_ci. These exercise migration lifecycles, persisted JSON float/retry behavior, immutable household creation and mirroring, saved SPM identity, historical report/run replay, and actual row-lock/rollback races. All seven new cross-database household cases and five policy cases passed per collation. All214 API/migration source hashes remained unchanged, and the containers were removed after testing. Earlier receipts remain evidence only for their original sources.
A fresh240-case focused suite passes with zero failures/skips on this exact head; all440 Python files are formatted and migration guards/export pass. The actual unpublished3.54.0 wheel contains204 API files matching source.
Keep this draft unmerged pending final-head review, required CI and the separately gated production release sequence. The installed-source run uses authenticated retained scientific files with the existing API dependency environment and explicit test certification; it does not qualify a coherent released wheel set, deployed worker, managed cache, staging or production release.