Skip to content

Sort the scanned-errors map so the catalog is reproducible - #78

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/deterministic-catalog-ordering
Jul 28, 2026
Merged

Sort the scanned-errors map so the catalog is reproducible#78
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/deterministic-catalog-ordering

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Makes run.py catalog output byte-reproducible. The objectModel.errors.raises map is keyed by iterating the public function set; a set's iteration order is hash-seed dependent, so the emitted meos-idl.json key 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 one test_struct_layout failure is pre-existing and env-only (it needs a compiled libmeos for real struct offsets, which CI provides).

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.
@estebanzimanyi
estebanzimanyi merged commit 26c3023 into MobilityDB:master Jul 28, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/deterministic-catalog-ordering branch July 28, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant