Hi, obviously infinite loops will become an issue we will have to deal with as the service grows. Especially if we start running tasks at a much faster clip and not just every 15 minutes.
It's probably not too hard to solve the problem. You could create a directed graph where the nodes are triggers and the edges are actions and make sure there are no cycles created whenever a user turns on or creates a task.
Caveats to the above are that you'd need to make sure that accounts in the channels are tied to single users (or join together the graphs of multiple users where they share channel accounts). You'd also need to handle odd edge cases with trigger fields and addins - such as a user @mentioning themselves and triggering an action to reply to the user who mentioned them.
Or if there were a way to leave the site and come back again - say a similar service starts up with any compatible inverse pair of inputs and outputs.
I have to admit, I look at stuff like this and my first reaction is "hmm, what could possibly go wrong... could we somehow use this to calculate prime numbers perhaps?"
Caveats to the above are that you'd need to make sure that accounts in the channels are tied to single users (or join together the graphs of multiple users where they share channel accounts). You'd also need to handle odd edge cases with trigger fields and addins - such as a user @mentioning themselves and triggering an action to reply to the user who mentioned them.