Drop MemoHash's std Hash impl and route cache-identity hashing through CacheHash#4209
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors hashing and comparison behavior for node inputs and memoized hashes. Specifically, it removes the standard Hash derivation from NodeInput and MemoHash, and manually implements PartialEq, Eq, PartialOrd, and Ord for MemoHash to compare the underlying value rather than the cache hash. Additionally, it updates ConstructionArgs to use cache_hash and fixes a documentation code block format. The review feedback suggests optimizing the manual PartialOrd and Ord implementations for MemoHash by checking Arc::ptr_eq first to avoid expensive value comparisons when the underlying Arc pointers are identical.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
1 issue found across 4 files
Confidence score: 3/5
- There is a concrete regression risk in
node-graph/graph-craft/src/proto.rs:ConstructionArgsnow uses cache identity for hashing while equality remains value-based, which violates theEq/Hashcontract. - This mismatch can cause incorrect behavior in hash-based collections (e.g., failed lookups or inconsistent deduplication), so the impact is user-facing if
ConstructionArgsis used as a key. - Given the high severity/confidence on this issue, this is not a low-risk merge until hash/equality semantics are aligned.
- Pay close attention to
node-graph/graph-craft/src/proto.rs-ConstructionArgshash and equality semantics are inconsistent and may trigger subtle logic errors.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
266aba7 to
126a0fa
Compare
126a0fa to
74ed44b
Compare
No description provided.