(Dec. 9th 2024) Flawless Beta 3 is here. Try it out!
  Flawless Logo, a beautiful woman with freckles head illustration. flawless.dev docs replay discord

Flawless Replay

Time traveling debugger for Rust workflows.

Check out this video for a Flawless Replay demo!

YouTube demo of Flawless Replay

Flawless Replay allows you to take any workflow that finished executing, failed executing or is still running and replay it locally. The replay is a deterministic re-run of the original execution.

This means that you can reproduce any bug that happened in production or just get more insight from a specific execution.

Flawless Replay also has the ability to patch the code during a re-run. This allows you to inject new statements into the workflow code, giving you the ability to perform "printf() debugging" on past executions.

Running a replay

You can play back a workflow with:

$ flawless replay <workflow_id>

This command is not that useful on its own because replays can't perform any side effects and the result of the execution is going to be completely identical to the original run. However, we can pass in the path to the new code with:

$ flawless replay <workflow_id> --patch-module="<path_to_module>"

The new code is not allowed to perform any new side effects during a replay. Even trying to get a new random number or writing something to the log will cause an error. The only "side effect" that is allowed is the operation flawless::replay_debug!(), that prints out to stdout for the purposes of debugging.

We can even attach a debugger to the replay, but in the case of Rust the compiler often optimizes out local variables, and the ability to nicely format the output instead of just getting a pointer to a memory location is much more useful. The patched module can even contain new dependencies and helper functions to help you better understand the past execution.

Get started with flawless

Check out the docs to get started with flawless!

If you would like to stay up to date with the latest development and features coming to flawless, follow me on bsky.