Skip to content

Fix nil presence checks in maps and sets - #28

Closed
codeboost wants to merge 1 commit into
masterfrom
codex/fix-nil-presence
Closed

codeboost wants to merge 1 commit into
masterfrom
codex/fix-nil-presence

Conversation

@codeboost

Copy link
Copy Markdown
Owner

A stored nil can be mistaken for a missing entry: (get m :present :missing) returns :missing for {:present nil}, and membership checks miss a nil hash-map key or hash-set member. Sorted-map membership and find also miss entries whose value is nil.

Check the containing entry instead of relying on a non-NONE key/value cursor. This fixes get, contains?, and find in hash maps, sorted maps, and hash sets. The change retains the existing file format, public collection types, and xitdb-java dependency.

Regression coverage exercises raw committed, transaction, frozen, and reopened views in memory and on disk. Both new tests failed before their corresponding fixes.

Validation: clojure -M:test — 244 tests, 3,472 assertions, zero failures or errors. git diff --check passes.

@codeboost codeboost closed this Sep 16, 2026
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