Preserve policy mirror identity across MySQL JSON storage and retries - #3826
Closed
MaxGhenis wants to merge 2 commits into
Closed
Preserve policy mirror identity across MySQL JSON storage and retries#3826MaxGhenis wants to merge 2 commits into
MaxGhenis wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3826 +/- ##
===========================================
+ Coverage 46.26% 87.32% +41.05%
===========================================
Files 135 150 +15
Lines 7963 8937 +974
Branches 1326 1543 +217
===========================================
+ Hits 3684 7804 +4120
+ Misses 3990 692 -3298
- Partials 289 441 +152 ☔ 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.
Superseded by the merged Stage11 implementation and canonical SPM integration PR3827. Stage11 already refreshes persisted JSON for both new and existing source rows; PR3827 preserves all missing numeric-identity/retry regressions and the real MySQL/PostgreSQL CI path. Independent comparison found all43 prior test functions/classes preserved, and46 focused tests passed. Closing this duplicate leaves its review and evidence available; no branch is deleted.
A new policy and an equivalent retry could receive different v2 identities because the first mirror used the request JSON while the retry used JSON read back from MySQL. MySQL can change a floating-point value by one representable step during JSON storage; this reproduces the failure in the existing Phase 10 staging deployment exercise.
Refresh newly inserted policies inside the v1 transaction before taking the mirror snapshot. Both paths then use the same persisted values. Exact content hashing, label independence, country/version separation, and the post-commit failure/retry contract remain intact. Existing divergent mappings are not rewritten.
Validation: 349 policy/mirroring/compatibility tests, a 54-file type check, formatting and migration guards pass. New regressions fail against the original service and pass with the fix. Real disposable MySQL 8.4 and PostgreSQL 17 verification passed all 6 migration-lifecycle and 22 persistence/mirroring tests. These exercise the actual stored-number conversion, first write/retry/relabel identity, PostgreSQL rollback, distinct native values, and rejection of historical divergent mappings without repair. The PR adds the real MySQL regression suite to CI. Staging deployment verification remains required; no production database was changed.