fix(formulus): better reset handling#601
Merged
r0ssing merged 12 commits intoOpenDataEnsemble:devfrom Apr 12, 2026
Merged
Conversation
najuna-brian
approved these changes
Apr 12, 2026
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.
Description
Adds a defensive client check in Formulus so that after a successful sync pull, push, or attachment manifest response, if
repository_generationin the response does not match the epoch the client sent, the app throwsRepositoryResetRequiredErrorinstead of persisting the server epoch—preventing silent advancement (e.g. 4→5) when an empty pull leaves stale local rows. Pull/push/manifest requests also sendrepository_generationin the JSON body (alongside the header) per OpenAPI, so the server can resolve the epoch if headers are stripped.On Synkronus, adds unit tests that assert
ParseClientRepositoryGenerationbehavior (header vs body, invalid header) and handler-level tests that Pull/Push return HTTP 409 withrepository_reset_requiredandx-repository-generationwhen the client epoch does not match the mock server epoch, plus a case proving the header wins over a conflicting body.Type of Change
Component(s) Affected
Related Issue(s)
Closes/Fixes/Resolves:
Testing
Breaking Changes
If breaking changes, please describe migration steps:
Documentation Updates
Checklist
Thank you for contributing to Open Data Ensemble (ODE)!