Skip to content

fix: separate compound roots from string node IDs - #269

Open
Aschenbath wants to merge 1 commit into
dagrejs:masterfrom
Aschenbath:fix/oss-20-more-20261125-77d1-graphlib-compound-root-id
Open

Aschenbath wants to merge 1 commit into
dagrejs:masterfrom
Aschenbath:fix/oss-20-more-20261125-77d1-graphlib-compound-root-id

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Adding a node named \u0000 to a compound graph currently replaces the root child list and makes that node appear as its own child. Parenting beneath that ID also hides the real parent from queries and serialization. Use an internal symbol for the graph root, keeping all string IDs available to nodes. Tests cover reparenting, cycle rejection, removal, filtering, JSON round trips, and non-compound child queries.

Validation on Windows / Node 24: the new regression file has 6 failing cases on unchanged master and 6 passing cases after the fix. The full applicable suite passes 287 tests; npm run build, ESLint, TypeScript --noEmit, and git diff --check pass. 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.

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