Sort the scanned-errors map so the catalog is reproducible - #78
Merged
estebanzimanyi merged 1 commit intoJul 28, 2026
Merged
Conversation
The objectModel errors "raises" map is keyed by iterating the public function set, whose order is hash-seed dependent, so run.py emitted the catalog with a different key order each run: two runs over the same input were byte-different, and any regenerate-and-check-byte-identical flow saw spurious diffs. Sort the iteration so the map keys are stable; a test asserts the scanned-errors keys come out sorted.
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.
Makes run.py catalog output byte-reproducible. The
objectModel.errors.raisesmap is keyed by iterating thepublicfunction set; a set's iteration order is hash-seed dependent, so the emittedmeos-idl.jsonkey order varies per run, which breaks any regenerate-and-check-byte-identical flow (e.g. MobilityDuck's committed-surface refresh). Sorting the iteration (for fn in sorted(public)) stabilizes the keys; the per-function error lists are already sorted. A regression test asserts the scanned-errors keys come out sorted. Two runs with different PYTHONHASHSEED now yield byte-identical output (11,352,486 bytes). The onetest_struct_layoutfailure is pre-existing and env-only (it needs a compiled libmeos for real struct offsets, which CI provides).