This is a system for player input management I created for several purposes. Initially it was made to create an input buffer system that was frame independent so that any game I made using this system did not need to worry about high/low inputs causing unintended consequences.
Once I got the basics of this system working, I continued developing it and realized that this could also be used as a way to replay players inputs in a consistent way, creating a system similar to old Doom WAD files. The system records all inputs pressed by the player each frame and stores it in a serialized file with each frame being a key. When the file is played back and deserialized, each frame checks for the inputs it has (and the direction the player was looking) and plays those inputs manually. The code in the physics update simply checks to see the flags of these inputs, so it doesn't matter if the player set the flags or if they were set by the program itself. In addition, a constant delta value is passed into this function rather than using a variable/changing time delta, so all of the physics and movement are consistent regardless of hardware.
The end goal for this system is to create a headless "server" for the game that would take in level playthrough data from a "client" and check whether the inputs used would be a valid run of the level or not, serving as a sort of anti-cheat for speedruns or score runs.