Skip to content

Fix solve endpoint accepting disconnected directed graphs - #3

Merged
R3Dzf merged 2 commits into
mainfrom
fix/disconnected-graph-validation-20261012
Oct 12, 2026
Merged

R3Dzf merged 2 commits into
mainfrom
fix/disconnected-graph-validation-20261012

Conversation

@R3Dzf

@R3Dzf R3Dzf commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Closes #2.

Root cause

/validate checks nx.has_path(input, output) while /solve enumerates no forward paths and can return a misleading success (T=0).

Fix

  • Reject graphs without a directed input-to-output path in /solve, matching /validate.
  • Cover disconnected targets and backward-only edges with regression tests.

Verification

GitHub Actions Python 3.11/3.12 required to pass before merging.

@R3Dzf
R3Dzf merged commit 30bc335 into main Oct 12, 2026
2 checks passed
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.

Solve endpoint incorrectly succeeds when no input-to-output path exists

1 participant