Skip to content

fix: validate extracted path endpoints and predecessor chains - #264

Open
Aschenbath wants to merge 1 commit into
dagrejs:masterfrom
Aschenbath:fix/oss-20-20261125-77d1-graphlib-extract-path
Open

Aschenbath wants to merge 1 commit into
dagrejs:masterfrom
Aschenbath:fix/oss-20-20261125-77d1-graphlib-extract-path

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

extractPath() rejects a valid empty-string source, accepts an unreachable vertex as a source, and can return a partial path when a predecessor is missing. Validate the source distance and destination reachability, follow empty-string node IDs normally, and reject missing or cyclic predecessor chains. The existing helper remains in its current module; this change does not add an export.

Validation: 285 Jest tests pass, plus package build, TypeScript checking, and ESLint on Windows / Node 24.22.0. The pre-existing Windows ESM smoke test fails on the unchanged base with ERR_UNSUPPORTED_ESM_URL_SCHEME; only that test was excluded (tracked separately in #258). New failing behavior was reproduced on the unchanged base.

Developed with AI assistance; changes and regression results were reviewed before submission.

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