Immediately after switching the page, it will work with CSR.
Please reload your browser to see how it works.
All responses and completed delays are stored in a table with an auto-incremented id, so the `-await-next` will always resolve to the same value.
As you mention, putting a persistent sleep and a child execution into the same join set is not yet implemented.
The actual order in which child workflows finish and their results hit the persistence layer is indeed nondeterministic in real-time execution. Trying to force deterministic completion order would likely be complex and defeat the purpose of parallelism, as you noted.
However, this external nondeterminism is outside the scope of the workflow execution's determinism required for replay.
When the workflow replays, it doesn't re-run the race. It consumes events from the log. The `-await-next` operation during replay simply reads the next recorded result, based on the fixed order. Since the log provides the same sequence of results every time, the workflow's internal logic proceeds identically, making the same decisions based on that recorded history.
Determinism is maintained within the replay context by reading the persisted, ordered outcomes of those nondeterministic races.
Although I don't expect to be an issue practically speaking, Obelisk checks that the replay is deterministic and fails the workflow when an unexpected event is triggered. It should be also be possible to add an automatic replay of each finished execution to verify the determinism e.g. while testing.
[1] https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#...
Edit: Enabling the flags here: https://github.com/obeli-sk/obelisk/pull/67
Obelisk has a concept called join sets [3], where child executions are submitted and awaited. In the future I plan on adding cancellation and allow custom cleanup functions.
[1] https://github.com/WebAssembly/component-model/blob/main/des...
[2] https://github.com/WebAssembly/component-model/blob/main/des...
[3] https://obeli.sk/docs/latest/concepts/workflows/join-sets/