fix(shaders_lab): cycle check uses real reachability, not vector index

Previously the cycle validator rejected any link whose source had a
vector index >= target's, which silently killed legitimate connections
between nodes added in the wrong drop order.

Switch to a DFS over source_ids: an edge from->to creates a cycle iff
`from` already (transitively) depends on `to`. topo_sort runs after
each topology change so the vector ends up in a consistent order
regardless of how nodes were inserted.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 01:37:50 +02:00
parent c2e4f6a9e1
commit 144b15f0ce
2 changed files with 32 additions and 7 deletions
Binary file not shown.