Skip to content

fix(core): make mapping identity order-independent - #52

Merged
krafczyk merged 1 commit into
mainfrom
fix/frozendict-order-independent
Oct 2, 2026
Merged

krafczyk merged 1 commit into
mainfrom
fix/frozendict-order-independent

Conversation

@krafczyk

@krafczyk krafczyk commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

CDefs containing mapping-valued parameters now remain equal after Store persistence canonicalizes key order. FrozenDict hashes now honor mapping equality, so equal values remain interchangeable as set members and dictionary keys; list and tuple identity remains order-sensitive. Stable hashes and persistent formats are unchanged.

Validation: 79 focused definition and codec tests passed, followed by the good-enough representative suite with 3,641 passing tests and 30 expected skips.

Fixes #51.

Compare structural mapping keys by membership rather than insertion order and hash FrozenDict values from their logical item set. This restores CDef equality after canonical Store round trips without changing stable hashes or persistent formats.

Verified with focused definition/codec tests and the good-enough representative suite.
@krafczyk
krafczyk merged commit 7d49f70 into main Oct 2, 2026
28 checks passed
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.

Make FrozenDict and CDef mapping identity order-independent

1 participant