Repository navigation
fix: prevent collisions in internal edge keys - #268
Open
Aschenbath wants to merge 1 commit into
Open
Aschenbath wants to merge 1 commit into
Aschenbath wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Edges such as
(a\u0001b, c)and(a, b\u0001c)currently share an internal key, so the second write overwrites the first edge and can omit its endpoints. An explicitly NUL-named edge also aliases an unnamed edge. Encode the normalized endpoint/name tuple unambiguously while retaining endpoint ordering and name coercion. Regressions cover directed and undirected storage, lookup/removal, adjacency, filtering, and JSON round trips.Validation on Windows / Node 24: the new regression file has 8 failing cases on unchanged master and 8 passing cases after the fix. The full applicable suite passes 289 tests;
npm run build, ESLint, TypeScript--noEmit, andgit diff --checkpass. One existing Windows ESM smoke test is excluded because it imports a drive path instead of a file URL; this was reproduced independently on the same unchanged baseline and is already addressed in #258. Generated bundles were tested before restoring checked-in distribution files.Prepared and validated with OpenAI Codex; AI assistance disclosed.