Commit 57c9e23
committed
[bugf][graph-workflow][report cycles as an explicit error instead of silently flattening]
topological_generations() hits the cyclic case and falls back to a Kahn
layering that tolerates cycles, so a cycle collapses into one parallel layer:
the nodes run once, concurrently, and the declared edge ordering between them
is discarded. The only signals were a validate() warning and a compile() line
gated on verbose, so a default run printed 'compiled successfully'.
Cycles are now an error naming the offending nodes and the consequence.
compile() logs errors unconditionally, so a non-verbose run says so.
The cheap path uses a Kahn peel to name the nodes on a cycle without
enumerating every simple cycle, which is exponential in the cycle count.
validate()'s enumerate_cycles path keeps listing the cycles themselves.
Rebased onto kyegomez#2017, which consolidated validate() and _fast_validate() behind
_structural_checks() — the original two edit sites are now one.1 parent 27c47f1 commit 57c9e23
1 file changed
Lines changed: 56 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1140 | 1149 | | |
1141 | 1150 | | |
1142 | 1151 | | |
1143 | 1152 | | |
1144 | | - | |
1145 | | - | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1146 | 1166 | | |
1147 | | - | |
1148 | | - | |
1149 | 1167 | | |
1150 | 1168 | | |
1151 | 1169 | | |
| |||
1199 | 1217 | | |
1200 | 1218 | | |
1201 | 1219 | | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1202 | 1251 | | |
1203 | 1252 | | |
1204 | 1253 | | |
| |||
3629 | 3678 | | |
3630 | 3679 | | |
3631 | 3680 | | |
| 3681 | + | |
| 3682 | + | |
3632 | 3683 | | |
3633 | | - | |
3634 | | - | |
| 3684 | + | |
3635 | 3685 | | |
3636 | 3686 | | |
3637 | 3687 | | |
| |||
0 commit comments