Add reproduction for Trie issue - #6856
Conversation
🦋 Changeset detectedLatest commit: f91954f The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — adds one reproduction test for the Trie undefined value bug.
stores undefined valuestest inTrie.test.ts: inserts["a", undefined]viaTrie.make, asserts size is 1, and correctly fails onOption.isSome(Trie.get(trie, "a"))— confirming thatundefinedvalues are counted but not retrievable.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one new commit (afa0879f5) fixes the Trie undefined value bug by boxing Node.value in { readonly value: V } so the internal presence check (value !== undefined) is independent of the stored value itself.
Node<V>.valuewrapped in{ readonly value: V }: distinguishes absent (no wrapper) fromundefinedvalue (wrapper exists, inner value isundefined).- Five access sites updated:
insertwraps on write;get,TrieIterator,modify, andlongestPrefixOfunwrap on read. Presence checks inremoveandmodifyremain correct — they test the wrapper, not the inner value. - Reproduction test passes:
Trie.get(trie, "a")now correctly returnsOption.some(undefined).
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|

Reproduction only
This PR adds reproduction tests only. No implementation fix is included. CI is expected to fail until the underlying issue is fixed.
Covered audit issues
1.
core-s-z-testing-trie-undefined-value: undefined values are not represented as presentModule:
TrieExpected contract: Trie accepts every Value, including undefined, and an inserted entry must remain retrievable and iterable.
Observed result: Option.isSome is false at size 1
Reproduction command:
Closes EFF-298