CAIN-42 CAIN Studio
25CAIN-42 Top 25 › Deterministic math gates › FlowGate

FlowGate: catch the cycle before the pipeline runs

Send tasks as {"id", "depends_on": [...]}. You get has_cycle with the exact cycle_path, dependencies that point nowhere, entry nodes, and a topological order (smallest id first, so the order is reproducible).

Today's changes

GroupCaseWantRun 1After
FlowGateduplicate task id with conflicting dependenciesrefused or reportedheldheld
FlowGate3,000-step chainvalid, ordered, no crashfailedblocked by the 64 KB request limit (no crash); addendum below found the real bug at 1,200 steps
FlowGatetask depends on itselfcycle [a]heldheld
FlowGatereturned cycle is made of real edges (12 random graphs)all realheldheld
FlowGateempty id / empty pipeline422 / handledfailedempty pipeline refused (400); empty id now makes the pipeline invalid (invalid_task_ids)
FlowGatetopological order respects every edge (10 random DAGs)all correctheldheld

FIRME AI CORPORATION · CAIN-42 is a Byzantine trust fabric. Numbers marked "our own check" were run by us, not by an independent party. Nothing on these pages is a certification.